]> git.sur5r.net Git - u-boot/blobdiff - board/tqc/tqm8272/tqm8272.c
Merge branch 'next' of git://git.denx.de/u-boot-mpc83xx
[u-boot] / board / tqc / tqm8272 / tqm8272.c
index 92f74a39cca9b2e8183e144923cc261011f29e59..334fd6d74b3852b7f86d6d3f433b894e0779596c 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>
@@ -180,7 +164,7 @@ const iop_conf_t iop_conf_tab[4][32] = {
        /* PD18 */ {   0,   0,   0,   1,   0,   0   }, /* PD19 */
        /* PD17 */ {   0,   1,   0,   0,   0,   0   }, /* FCC1 ATMRXPRTY */
        /* PD16 */ {   0,   1,   0,   1,   0,   0   }, /* FCC1 ATMTXPRTY */
-#if defined(CONFIG_SOFT_I2C)
+#if defined(CONFIG_SYS_I2C_SOFT)
        /* PD15 */ {   1,   0,   0,   1,   1,   1   }, /* I2C SDA */
        /* PD14 */ {   1,   0,   0,   1,   1,   1   }, /* I2C SCL */
 #else
@@ -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);
@@ -858,7 +845,7 @@ int board_early_init_r(void)
 }
 #endif
 
-int do_hwib_dump (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_hwib_dump (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 {
        dump_hwib ();
        return 0;