diff options
author | Wolfgang Denk | 2005-10-15 18:23:43 +0200 |
---|---|---|
committer | Wolfgang Denk | 2005-10-15 18:23:43 +0200 |
commit | 84bd92bdda05e6aaae3150ed6ef957b3a67398b7 (patch) | |
tree | ea5e3abbeff7e3f8412a2e34645b9773f50578e8 /common | |
parent | 77ddac9480d63a80b6bb76d7ee4dcc2d1070867e (diff) | |
parent | 36247821ef77cc13d5f9fdbf7771564f9f8386bd (diff) |
Merge with /home/m8/git/u-boot
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_bootm.c | 4 | ||||
-rw-r--r-- | common/cmd_flash.c | 8 | ||||
-rw-r--r-- | common/cmd_jffs2.c | 4 | ||||
-rw-r--r-- | common/cmd_mii.c | 2 | ||||
-rw-r--r-- | common/flash.c | 2 |
5 files changed, 14 insertions, 6 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 558922c1030..8599a49d057 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -88,7 +88,7 @@ static int image_info (unsigned long addr); #if (CONFIG_COMMANDS & CFG_CMD_IMLS) #include <flash.h> -extern flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ +extern flash_info_t flash_info[]; /* info for FLASH chips */ static int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); #endif @@ -1124,7 +1124,7 @@ int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) for (i=0, info=&flash_info[0]; i<CFG_MAX_FLASH_BANKS; ++i, ++info) { if (info->flash_id == FLASH_UNKNOWN) goto next_bank; - for (j=0; j<CFG_MAX_FLASH_SECT; ++j) { + for (j=0; j<info->sector_count; ++j) { if (!(hdr=(image_header_t *)info->start[j]) || (ntohl(hdr->ih_magic) != IH_MAGIC)) diff --git a/common/cmd_flash.c b/common/cmd_flash.c index d5be30c54dd..0aa478306b8 100644 --- a/common/cmd_flash.c +++ b/common/cmd_flash.c @@ -404,7 +404,11 @@ int flash_sect_erase (ulong addr_first, ulong addr_last) { flash_info_t *info; ulong bank; +#ifdef CFG_MAX_FLASH_BANKS_DETECT + int s_first[CFG_MAX_FLASH_BANKS_DETECT], s_last[CFG_MAX_FLASH_BANKS_DETECT]; +#else int s_first[CFG_MAX_FLASH_BANKS], s_last[CFG_MAX_FLASH_BANKS]; +#endif int erased = 0; int planned; int rcode = 0; @@ -617,7 +621,11 @@ int flash_sect_protect (int p, ulong addr_first, ulong addr_last) { flash_info_t *info; ulong bank; +#ifdef CFG_MAX_FLASH_BANKS_DETECT + int s_first[CFG_MAX_FLASH_BANKS_DETECT], s_last[CFG_MAX_FLASH_BANKS_DETECT]; +#else int s_first[CFG_MAX_FLASH_BANKS], s_last[CFG_MAX_FLASH_BANKS]; +#endif int protected, i; int planned; int rcode; diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c index fda0c955f48..34920b1abd3 100644 --- a/common/cmd_jffs2.c +++ b/common/cmd_jffs2.c @@ -316,7 +316,7 @@ static int part_validate_nor(struct mtdids *id, struct part_info *part) { #if (CONFIG_COMMANDS & CFG_CMD_FLASH) /* info for FLASH chips */ - extern flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; + extern flash_info_t flash_info[]; flash_info_t *flash; int offset_aligned; u32 end_offset; @@ -711,7 +711,7 @@ static int device_validate(u8 type, u8 num, u32 *size) if (type == MTD_DEV_TYPE_NOR) { #if (CONFIG_COMMANDS & CFG_CMD_FLASH) if (num < CFG_MAX_FLASH_BANKS) { - extern flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; + extern flash_info_t flash_info[]; *size = flash_info[num].size; return 0; } diff --git a/common/cmd_mii.c b/common/cmd_mii.c index 722b9f04c0e..f93232c3294 100644 --- a/common/cmd_mii.c +++ b/common/cmd_mii.c @@ -91,7 +91,7 @@ int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) * Look for any and all PHYs. Valid addresses are 0..31. */ if (argc >= 3) { - start = addr; end = addr + 1; + start = addrlo; end = addrhi + 1; } else { start = 0; end = 32; } diff --git a/common/flash.c b/common/flash.c index 295fea2b83c..a64bc985299 100644 --- a/common/flash.c +++ b/common/flash.c @@ -28,7 +28,7 @@ #if !defined(CFG_NO_FLASH) -extern flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ +extern flash_info_t flash_info[]; /* info for FLASH chips */ /*----------------------------------------------------------------------- * Functions |