]> git.sur5r.net Git - u-boot/blobdiff - drivers/mtd/cfi_flash.c
p1022ds: use weak CFI flash accessors when DIU is enabled
[u-boot] / drivers / mtd / cfi_flash.c
index 49a2b5ea747f0aa8932e2c775f9e2a81d24da98b..02dd27ffb1f9154305bae578682cb08af4f26925 100644 (file)
  * reading and writing ... (yes there is such a Hardware).
  */
 
-#ifndef CONFIG_SYS_FLASH_BANKS_LIST
-#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
-#endif
-
 static uint flash_offset_cfi[2] = { FLASH_OFFSET_CFI, FLASH_OFFSET_CFI_ALT };
 static uint flash_verbose = 1;
 
-/* use CONFIG_SYS_MAX_FLASH_BANKS_DETECT if defined */
-#ifdef CONFIG_SYS_MAX_FLASH_BANKS_DETECT
-# define CFI_MAX_FLASH_BANKS   CONFIG_SYS_MAX_FLASH_BANKS_DETECT
-#else
-# define CFI_MAX_FLASH_BANKS   CONFIG_SYS_MAX_FLASH_BANKS
-#endif
-
 flash_info_t flash_info[CFI_MAX_FLASH_BANKS];  /* FLASH chips info */
 
 /*
@@ -85,6 +74,10 @@ flash_info_t flash_info[CFI_MAX_FLASH_BANKS];        /* FLASH chips info */
 #define CONFIG_SYS_FLASH_CFI_WIDTH     FLASH_CFI_8BIT
 #endif
 
+#if defined(CONFIG_SYS_MAX_FLASH_BANKS_DETECT)
+int cfi_flash_num_flash_banks = CONFIG_SYS_MAX_FLASH_BANKS_DETECT;
+#endif
+
 static phys_addr_t __cfi_flash_bank_addr(int i)
 {
        return ((phys_addr_t [])CONFIG_SYS_FLASH_BANKS_LIST)[i];