X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fhymod%2Fbsp.c;h=e54640f2d2d63992edbc33b10947cab7e666cad1;hb=1a4596601fd395f3afb8f82f3f840c5e00bdd57a;hp=092d3684402a2cb02b571c734160be0644ae569b;hpb=2fb2604d5c20beb061b0a94282b7f6eb14d00cb8;p=u-boot diff --git a/board/hymod/bsp.c b/board/hymod/bsp.c index 092d368440..e54640f2d2 100644 --- a/board/hymod/bsp.c +++ b/board/hymod/bsp.c @@ -2,23 +2,7 @@ * (C) Copyright 2000 * Wolfgang Denk, DENX Software Engineering, wd@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+ * * hacked for Hymod FPGA support by Murray.Jensen@csiro.au, 29-Jan-01 */ @@ -75,14 +59,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 +125,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 +184,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,8 +256,7 @@ do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) break; } - cmd_usage(cmdtp); - return 1; + return cmd_usage(cmdtp); } U_BOOT_CMD( fpga, 6, 1, do_fpga, @@ -297,11 +280,11 @@ 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 = CONFIG_SYS_I2C_EEPROM_ADDR; @@ -324,8 +307,7 @@ do_eecl (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) /* fall through ... */ default: - cmd_usage(cmdtp); - return 1; + return cmd_usage(cmdtp); } memset (data, 0, HYMOD_EEPROM_SIZE); @@ -340,13 +322,13 @@ U_BOOT_CMD( "[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;