From 8bde7f776c77b343aca29b8c7b58464d915ac245 Mon Sep 17 00:00:00 2001 From: wdenk Date: Fri, 27 Jun 2003 21:31:46 +0000 Subject: * Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) --- board/cu824/Makefile | 2 +- board/cu824/README | 2 +- board/cu824/flash.c | 46 +++++++++++++++++++++++----------------------- board/cu824/u-boot.lds | 6 +++++- 4 files changed, 30 insertions(+), 26 deletions(-) (limited to 'board/cu824') diff --git a/board/cu824/Makefile b/board/cu824/Makefile index 35b8428..7a2014d 100644 --- a/board/cu824/Makefile +++ b/board/cu824/Makefile @@ -28,7 +28,7 @@ LIB = lib$(BOARD).a OBJS = $(BOARD).o flash.o $(LIB): .depend $(OBJS) - $(AR) crv $@ $^ + $(AR) crv $@ $(OBJS) ######################################################################### diff --git a/board/cu824/README b/board/cu824/README index d38c48e..cc0d207 100644 --- a/board/cu824/README +++ b/board/cu824/README @@ -38,7 +38,7 @@ run - run commands in an environment variable bootm - boot application image from memory bootp - boot image via network using BootP/TFTP protocol tftpboot- boot image via network using TFTP protocol - and env variables ipaddr and serverip + and env variables ipaddr and serverip rarpboot- boot image via network using RARP/TFTP protocol bootd - boot default, i.e., run 'bootcmd' loads - load S-Record file over serial line diff --git a/board/cu824/flash.c b/board/cu824/flash.c index 61b759e..7368176 100644 --- a/board/cu824/flash.c +++ b/board/cu824/flash.c @@ -76,7 +76,7 @@ unsigned long flash_init(void) DEBUGF("Write protect is: 0x%02X\n", *bcr); for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) { - vu_long *addr = (vu_long *)(CFG_FLASH_BASE + i * FLASH_BANK_SIZE); + vu_long *addr = (vu_long *)(CFG_FLASH_BASE + i * FLASH_BANK_SIZE); addr[0] = 0x00900090; @@ -91,7 +91,7 @@ unsigned long flash_init(void) (addr[2] == addr[3]) && (addr[2] == INTEL_ID_28F160F3B)) { flash_info[i].flash_id = (FLASH_MAN_INTEL & FLASH_VENDMASK) | - (INTEL_ID_28F160F3B & FLASH_TYPEMASK); + (INTEL_ID_28F160F3B & FLASH_TYPEMASK); } else { flash_info[i].flash_id = FLASH_UNKNOWN; addr[0] = 0xFFFFFFFF; @@ -108,12 +108,12 @@ unsigned long flash_init(void) for (j = 0; j < flash_info[i].sector_count; j++) { if (j <= 7) { flash_info[i].start[j] = CFG_FLASH_BASE + - i * FLASH_BANK_SIZE + - j * PARAM_SECT_SIZE; + i * FLASH_BANK_SIZE + + j * PARAM_SECT_SIZE; } else { flash_info[i].start[j] = CFG_FLASH_BASE + - i * FLASH_BANK_SIZE + - (j - 7)*MAIN_SECT_SIZE; + i * FLASH_BANK_SIZE + + (j - 7)*MAIN_SECT_SIZE; } } size += flash_info[i].size; @@ -124,28 +124,28 @@ unsigned long flash_init(void) #if CFG_MONITOR_BASE >= CFG_FLASH_BASE #if CFG_MONITOR_BASE >= CFG_FLASH_BASE + FLASH_BANK_SIZE flash_protect(FLAG_PROTECT_SET, - CFG_MONITOR_BASE, - CFG_MONITOR_BASE + monitor_flash_len - 1, - &flash_info[1]); + CFG_MONITOR_BASE, + CFG_MONITOR_BASE + monitor_flash_len - 1, + &flash_info[1]); #else flash_protect(FLAG_PROTECT_SET, - CFG_MONITOR_BASE, - CFG_MONITOR_BASE + monitor_flash_len - 1, - &flash_info[0]); + CFG_MONITOR_BASE, + CFG_MONITOR_BASE + monitor_flash_len - 1, + &flash_info[0]); #endif #endif #if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR) #if CFG_ENV_ADDR >= CFG_FLASH_BASE + FLASH_BANK_SIZE flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, - &flash_info[1]); + CFG_ENV_ADDR, + CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + &flash_info[1]); #else flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, - &flash_info[0]); + CFG_ENV_ADDR, + CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + &flash_info[0]); #endif #endif @@ -268,7 +268,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) while (((addr[0] & 0x00800080) != 0x00800080) || ((addr[1] & 0x00800080) != 0x00800080) ) { if ((now=get_timer(start)) > - CFG_FLASH_ERASE_TOUT) { + CFG_FLASH_ERASE_TOUT) { printf ("Timeout\n"); addr[0] = 0x00B000B0; /* suspend erase */ addr[0] = 0x00FF00FF; /* to read mode */ @@ -328,7 +328,7 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) for (i = 0, cp = wp; i < l; i++, cp++) { if (i >= 4) { *datah = (*datah << 8) | - ((*datal & 0xFF000000) >> 24); + ((*datal & 0xFF000000) >> 24); } *datal = (*datal << 8) | (*(uchar *)cp); @@ -342,7 +342,7 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) if (i >= 4) { *datah = (*datah << 8) | - ((*datal & 0xFF000000) >> 24); + ((*datal & 0xFF000000) >> 24); } *datal = (*datal << 8) | tmp; @@ -353,7 +353,7 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) for (; cnt == 0 && i < FLASH_WIDTH; ++i, ++cp) { if (i >= 4) { *datah = (*datah << 8) | - ((*datal & 0xFF000000) >> 24); + ((*datal & 0xFF000000) >> 24); } *datal = (*datah << 8) | (*(uchar *)cp); @@ -394,7 +394,7 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) for (i = 0, cp = wp; i < FLASH_WIDTH && cnt > 0; ++i, ++cp) { char tmp; - tmp = *src; + tmp = *src; src++; diff --git a/board/cu824/u-boot.lds b/board/cu824/u-boot.lds index 401a9aa..7e6053a 100644 --- a/board/cu824/u-boot.lds +++ b/board/cu824/u-boot.lds @@ -103,6 +103,11 @@ SECTIONS _edata = .; PROVIDE (edata = .); + __u_boot_cmd_start = .; + .u_boot_cmd : { *(.u_boot_cmd) } + __u_boot_cmd_end = .; + + __start___ex_table = .; __ex_table : { *(__ex_table) } __stop___ex_table = .; @@ -126,4 +131,3 @@ SECTIONS _end = . ; PROVIDE (end = .); } - -- cgit v1.1