X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Ficecube%2Fflash.c;h=15e86d34f394446925b786a05ea8f10c43cd9288;hb=efa013df333fb680eedfcad22283083614dad418;hp=07879ffb07d122587b88988bbf516f8f9b7f6ec2;hpb=7152b1d0b3f8beec8c297d64664e41b4c4ef610a;p=u-boot diff --git a/board/icecube/flash.c b/board/icecube/flash.c index 07879ffb07..15e86d34f3 100644 --- a/board/icecube/flash.c +++ b/board/icecube/flash.c @@ -23,6 +23,7 @@ #include +#ifndef CFG_FLASH_CFI_DRIVER flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ /* NOTE - CONFIG_FLASH_16BIT means the CPU interface is 16-bit, it @@ -123,7 +124,7 @@ static flash_info_t *flash_get_info(ulong base) for (i = 0; i < CFG_MAX_FLASH_BANKS; i ++) { info = & flash_info[i]; - if (info->size && + if (info->size && info->start[0] <= base && base <= info->start[0] + info->size - 1) break; } @@ -139,7 +140,7 @@ void flash_print_info (flash_info_t *info) int i; uchar *boottype; uchar *bootletter; - uchar *fmt; + char *fmt; uchar botbootletter[] = "B"; uchar topbootletter[] = "T"; uchar botboottype[] = "bottom boot sector"; @@ -260,7 +261,7 @@ ulong flash_get_size (FPWV *addr, flash_info_t *info) addr2 = (FPW *)((ulong)addr | 0x800000); if (addr2 != addr && ((addr2[0] & 0xff) == (addr[0] & 0xff)) && ((FPW)addr2[1] == (FPW)addr[1])) { - /* Seems 2 banks are the same space (8Mb chip is installed, + /* Seems 2 banks are the same space (8Mb chip is installed, * J24 in default position (CS0)). Disable this (first) bank. */ info->flash_id = FLASH_UNKNOWN; @@ -489,3 +490,4 @@ static int write_word_amd (flash_info_t *info, FPWV *dest, FPW data) return (res); } +#endif /*CFG_FLASH_CFI_DRIVER*/