]> git.sur5r.net Git - u-boot/blobdiff - board/prodrive/pdnb3/pdnb3.c
Merge git://git.denx.de/u-boot-arm
[u-boot] / board / prodrive / pdnb3 / pdnb3.c
index 69f8f9bbcad8dea2312cb2c904cc6552fa0f2715..fa320da2d483fad3bd6d3cb66adfcf195c701adb 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2006
  * Stefan Roese, DENX Software Engineering, sr@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>
@@ -28,9 +12,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-/* Prototypes */
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-
 /* predefine these here for FPGA programming (before including fpga.c) */
 #define SET_FPGA(data) *IXP425_GPIO_GPOUTR = (data)
 #define FPGA_DONE_STATE (*IXP425_GPIO_GPINR & CONFIG_SYS_FPGA_DONE)
@@ -49,9 +30,6 @@ static unsigned long old_val = 0;
  */
 int board_init(void)
 {
-       /* arch number of PDNB3 */
-       gd->bd->bi_arch_number = MACH_TYPE_PDNB3;
-
        /* adress of boot parameters */
        gd->bd->bi_boot_params = 0x00000100;
 
@@ -104,13 +82,14 @@ int board_init(void)
  */
 int checkboard(void)
 {
-       char *s = getenv("serial#");
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
 
        puts("Board: PDNB3");
 
-       if (s != NULL) {
+       if (i > 0) {
                puts(", serial# ");
-               puts(s);
+               puts(buf);
        }
        putc('\n');
 
@@ -210,14 +189,12 @@ int do_fpga_boot(unsigned char *fpgadata)
        return (0);
 }
 
-int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        ulong addr;
 
-       if (argc < 2) {
-               cmd_usage(cmdtp);
-               return 1;
-       }
+       if (argc < 2)
+               return cmd_usage(cmdtp);
 
        addr = simple_strtoul(argv[1], NULL, 16);