ppc4xx: Add missing APC405 to MAKEALL
[oweals/u-boot.git] / board / hymod / bsp.c
index f131e51d4e2281e4c08436e53b65b9ee9c1b8198..262070fdff7f4b0174a3790fe718496185578251 100644 (file)
 #include <command.h>
 #include <net.h>
 #include <asm/iopin_8260.h>
-#include <cmd_bsp.h>
+
+DECLARE_GLOBAL_DATA_PTR;
 
 /*-----------------------------------------------------------------------
  * Board Special Commands: FPGA load/store, EEPROM erase
  */
 
-#if (CONFIG_COMMANDS & CFG_CMD_BSP)
+#if defined(CONFIG_CMD_BSP)
 
 #define LOAD_SUCCESS           0
 #define LOAD_FAIL_NOCONF       1
@@ -76,8 +77,6 @@
 int
 fpga_load (int mezz, uchar *addr, ulong size)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        hymod_conf_t *cp = &gd->bd->bi_hymod_conf;
        xlx_info_t *fp;
        xlx_iopins_t *fpgaio;
@@ -273,12 +272,12 @@ do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                break;
        }
 
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
 }
-cmd_tbl_t U_BOOT_CMD(fpga) = MK_CMD_ENTRY(
-       "fpga", 6,      1,      do_fpga,
-       "fpga    - FPGA sub-system\n",
+U_BOOT_CMD(
+       fpga,   6,      1,      do_fpga,
+       "FPGA sub-system",
        "load [type] addr size\n"
        "  - write the configuration data at memory address `addr',\n"
        "    size `size' bytes, into the FPGA of type `type' (either\n"
@@ -298,14 +297,14 @@ cmd_tbl_t U_BOOT_CMD(fpga) = MK_CMD_ENTRY(
        "fpga info\n"
        "  - print information about the Hymod FPGA, namely the\n"
        "    memory addresses at which the four FPGA local bus\n"
-       "    address spaces appear in the physical address space\n"
+       "    address spaces appear in the physical address space"
 );
 /* ------------------------------------------------------------------------- */
 int
 do_eecl (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 {
        uchar data[HYMOD_EEPROM_SIZE];
-       uint addr = CFG_I2C_EEPROM_ADDR;
+       uint addr = CONFIG_SYS_I2C_EEPROM_ADDR;
 
        switch (argc) {
 
@@ -325,7 +324,7 @@ do_eecl (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                /* fall through ... */
 
        default:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -335,13 +334,13 @@ do_eecl (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 
        return 0;
 }
-cmd_tbl_t U_BOOT_CMD(eec) = MK_CMD_ENTRY(
-       "eeclear",      1,      0,      do_eecl,
-       "eeclear - Clear the eeprom on a Hymod board \n",
+U_BOOT_CMD(
+       eeclear,        1,      0,      do_eecl,
+       "Clear the eeprom on a Hymod board",
        "[type]\n"
        "  - write zeroes into the EEPROM on the board of type `type'\n"
        "    (`type' is either `main' or `mezz' - default `main')\n"
-       "    Note: the EEPROM write enable jumper must be installed\n"
+       "    Note: the EEPROM write enable jumper must be installed"
 );
 
 /* ------------------------------------------------------------------------- */
@@ -403,6 +402,4 @@ do_htest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        return 0;
 }
 
-#endif /* CFG_CMD_BSP */
-
-/* ------------------------------------------------------------------------- */
+#endif