]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - board/tqc/tqm8272/tqm8272.c
Add GPL-2.0+ SPDX-License-Identifier to source files
[karo-tx-uboot.git] / board / tqc / tqm8272 / tqm8272.c
index 96ec078fd93e896067deea2208181a29218aa36a..b9dd4fa6b780f38e9e17c91598accdc9714dcb46 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2006
  * Heiko Schocher, DENX Software Engineering, hs@denx.de.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+ 
  */
 
 #include <common.h>
@@ -459,10 +443,9 @@ phys_size_t initdram (int board_type)
 #ifndef CONFIG_SYS_RAMBOOT
        long size8, size9;
 #endif
-       long psize, lsize;
+       long psize;
 
        psize = 16 * 1024 * 1024;
-       lsize = 0;
 
        memctl->memc_psrt = CONFIG_SYS_PSRT;
        memctl->memc_mptpr = CONFIG_SYS_MPTPR;
@@ -514,12 +497,16 @@ static inline int scanChar (char *p, int len, unsigned long *number)
 static int dump_hwib(void)
 {
        HWIB_INFO       *hw = &hwinf;
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
        volatile immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
-       char *s = getenv("serial#");
+
+       if (i < 0)
+               buf[0] = '\0';
 
        if (hw->OK) {
                printf ("HWIB on %x\n", HWIB_INFO_START_ADDR);
-               printf ("serial : %s\n", s);
+               printf ("serial : %s\n", buf);
                printf ("ethaddr: %s\n", hw->ethaddr);
                printf ("FLASH  : %x nr:%d\n", hw->flash, hw->flash_nr);
                printf ("RAM    : %x cs:%d\n", hw->ram, hw->ram_cs);