X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fhymod%2Fbsp.c;h=cd9c4e2076524a80c6c76c9dd6936a4f82e7fc54;hb=e4bf0c5cfe1d7b2059a6802c9e11d567c928dbb1;hp=12f14020172f3b03c58654585c6388719656920c;hpb=93f798346033a1f6d22090b47abad4be88243b04;p=u-boot diff --git a/board/hymod/bsp.c b/board/hymod/bsp.c index 12f1402017..cd9c4e2076 100644 --- a/board/hymod/bsp.c +++ b/board/hymod/bsp.c @@ -75,14 +75,14 @@ DECLARE_GLOBAL_DATA_PTR; */ int -fpga_load (int mezz, uchar *addr, ulong size) +fpga_load(int mezz, const uchar *addr, ulong size) { hymod_conf_t *cp = &gd->bd->bi_hymod_conf; xlx_info_t *fp; xlx_iopins_t *fpgaio; volatile uchar *fpgabase; volatile uint cnt; - uchar *eaddr = addr + size; + const uchar *eaddr = addr + size; int result; if (mezz) @@ -141,7 +141,7 @@ fpga_load (int mezz, uchar *addr, ulong size) /* ------------------------------------------------------------------------- */ int -do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { uchar *addr, *save_addr; ulong size; @@ -200,7 +200,7 @@ do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) load_addr = simple_strtoul (argv[3], NULL, 16); NetBootFileXferSize = 0; - if (NetLoop (TFTP) <= 0) { + if (NetLoop(TFTPGET) <= 0) { printf ("tftp transfer failed - aborting " "fgpa load\n"); return 1; @@ -272,12 +272,11 @@ do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) break; } - printf ("Usage:\n%s\n", cmdtp->usage); - return 1; + return cmd_usage(cmdtp); } U_BOOT_CMD( fpga, 6, 1, do_fpga, - "fpga - FPGA sub-system\n", + "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" @@ -297,14 +296,14 @@ U_BOOT_CMD( "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[]) +do_eecl (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { uchar data[HYMOD_EEPROM_SIZE]; - uint addr = CFG_I2C_EEPROM_ADDR; + uint addr = CONFIG_SYS_I2C_EEPROM_ADDR; switch (argc) { @@ -324,8 +323,7 @@ do_eecl (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) /* fall through ... */ default: - printf ("Usage:\n%s\n", cmdtp->usage); - return 1; + return cmd_usage(cmdtp); } memset (data, 0, HYMOD_EEPROM_SIZE); @@ -336,17 +334,17 @@ do_eecl (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) } U_BOOT_CMD( eeclear, 1, 0, do_eecl, - "eeclear - Clear the eeprom on a Hymod board \n", + "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" ); /* ------------------------------------------------------------------------- */ int -do_htest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_htest (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { #if 0 int rc;