From: Stelian Pop Date: Wed, 26 Mar 2008 21:52:35 +0000 (+0100) Subject: Fix CFG_NO_FLASH compilation. X-Git-Tag: v1.3.3-rc1~111^2~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=880cc4381ea8360248cddcdf87a64566745a5724;p=u-boot Fix CFG_NO_FLASH compilation. Many Atmel boards have no "real" (NOR) flash on board, and rely only on DataFlash and NAND memories. This patch enables CFG_NO_FLASH to be present in a board configuration file, while still enabling flash commands like 'flinfo', 'protect', etc. Signed-off-by: Stelian Pop --- diff --git a/common/cmd_flash.c b/common/cmd_flash.c index f56443e25e..db5dec9049 100644 --- a/common/cmd_flash.c +++ b/common/cmd_flash.c @@ -41,6 +41,7 @@ int find_dev_and_part(const char *id, struct mtd_device **dev, u8 *part_num, struct part_info **part); #endif +#ifndef CFG_NO_FLASH extern flash_info_t flash_info[]; /* info for FLASH chips */ /* @@ -275,15 +276,19 @@ flash_fill_sect_ranges (ulong addr_first, ulong addr_last, return rcode; } +#endif /* CFG_NO_FLASH */ int do_flinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { +#ifndef CFG_NO_FLASH ulong bank; +#endif #ifdef CONFIG_HAS_DATAFLASH dataflash_print_info(); #endif +#ifndef CFG_NO_FLASH if (argc == 1) { /* print info for all FLASH banks */ for (bank=0; bank