NAND: rename NAND_MAX_CHIPS to CONFIG_SYS_NAND_MAX_CHIPS
authorWolfgang Grandegger <wg@grandegger.com>
Fri, 16 Jan 2009 17:55:54 +0000 (18:55 +0100)
committerScott Wood <scottwood@freescale.com>
Fri, 23 Jan 2009 16:32:51 +0000 (10:32 -0600)
This patch renames NAND_MAX_CHIPS to CONFIG_SYS_NAND_MAX_CHIPS and
changes the default from 8 to 1 for the legacy and the new MTD
NAND layer. This allows to remove all NAND_MAX_CHIPS definitions
in the board config files because none of the boards use multi
chip support (NAND_MAX_CHIPS > 1) so far. The bamboo and the DU440
define

 #define NAND_MAX_CHIPS          CONFIG_SYS_MAX_NAND_DEVICE

but that's bogus and did not work anyhow.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
66 files changed:
doc/README.nand
drivers/mtd/nand/nand_base.c
drivers/mtd/nand_legacy/nand_legacy.c
include/configs/ASH405.h
include/configs/CATcenter.h
include/configs/CMS700.h
include/configs/DU440.h
include/configs/G2000.h
include/configs/HH405.h
include/configs/HUB405.h
include/configs/IDS8247.h
include/configs/M5329EVB.h
include/configs/M5373EVB.h
include/configs/MPC8313ERDB.h
include/configs/MPC8315ERDB.h
include/configs/MPC8360ERDK.h
include/configs/MPC837XEMDS.h
include/configs/MPC8536DS.h
include/configs/MPC8572DS.h
include/configs/NC650.h
include/configs/NETPHONE.h
include/configs/NETTA.h
include/configs/NETTA2.h
include/configs/NETVIA.h
include/configs/PLU405.h
include/configs/PMC440.h
include/configs/PPChameleonEVB.h
include/configs/SXNI855T.h
include/configs/TQM8272.h
include/configs/TQM85xx.h
include/configs/VCMA9.h
include/configs/VOH405.h
include/configs/WUH405.h
include/configs/acadia.h
include/configs/afeb9260.h
include/configs/alpr.h
include/configs/at91cap9adk.h
include/configs/at91rm9200dk.h
include/configs/at91sam9260ek.h
include/configs/at91sam9261ek.h
include/configs/at91sam9263ek.h
include/configs/at91sam9rlek.h
include/configs/bamboo.h
include/configs/bf537-stamp.h
include/configs/canyonlands.h
include/configs/csb637.h
include/configs/davinci_dvevm.h
include/configs/davinci_schmoogie.h
include/configs/davinci_sffsdr.h
include/configs/davinci_sonata.h
include/configs/delta.h
include/configs/kilauea.h
include/configs/netstar.h
include/configs/omap2420h4.h
include/configs/pdnb3.h
include/configs/quad100hd.h
include/configs/sbc2410x.h
include/configs/sc3.h
include/configs/sequoia.h
include/configs/smdk6400.h
include/configs/socrates.h
include/configs/stxxtc.h
include/configs/zylonite.h
include/linux/mtd/bbm.h
include/linux/mtd/nand.h
include/linux/mtd/nand_legacy.h

index bf80bc0..fc62f92 100644 (file)
@@ -172,7 +172,7 @@ More Definitions:
    #define ADDR_COLUMN_PAGE 3
    #define NAND_ChipID_UNKNOWN 0x00
    #define NAND_MAX_FLOORS 1
-   #define NAND_MAX_CHIPS 1
+   #define CONFIG_SYS_NAND_MAX_CHIPS 1
 
    #define CONFIG_SYS_DAVINCI_BROKEN_ECC
       Versions of U-Boot <= 1.3.3 and Montavista Linux kernels
index 94a65d4..ef37f97 100644 (file)
@@ -2144,7 +2144,7 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
 {
        int page, len, status, pages_per_block, ret, chipnr;
        struct nand_chip *chip = mtd->priv;
-       int rewrite_bbt[NAND_MAX_CHIPS]={0};
+       int rewrite_bbt[CONFIG_SYS_NAND_MAX_CHIPS]={0};
        unsigned int bbt_masked_page = 0xffffffff;
 
        MTDDEBUG (MTD_DEBUG_LEVEL3, "nand_erase: start = 0x%08x, len = %i\n",
index 407e901..441780a 100644 (file)
@@ -457,7 +457,7 @@ static void NanD_ScanChips(struct nand_chip *nand)
 {
        int floor, chip;
        int numchips[NAND_MAX_FLOORS];
-       int maxchips = NAND_MAX_CHIPS;
+       int maxchips = CONFIG_SYS_NAND_MAX_CHIPS;
        int ret = 1;
 
        nand->numchips = 0;
index a694083..a11a9b8 100644 (file)
  *-----------------------------------------------------------------------
  */
 #define CONFIG_SYS_NAND_BASE_LIST      { CONFIG_SYS_NAND_BASE }
-#define NAND_MAX_CHIPS          1
 #define CONFIG_SYS_MAX_NAND_DEVICE     1         /* Max number of NAND devices */
 #define NAND_BIG_DELAY_US      25
 
index a44f3e1..1e36660 100644 (file)
 
 #define NAND_ChipID_UNKNOWN    0x00
 #define NAND_MAX_FLOORS 1
-#define NAND_MAX_CHIPS 1
 
 #define CONFIG_SYS_NAND0_CE  (0x80000000 >> 1)  /* our CE is GPIO1 */
 #define CONFIG_SYS_NAND0_CLE (0x80000000 >> 2)  /* our CLE is GPIO2 */
index d0e2464..eebce38 100644 (file)
  *-----------------------------------------------------------------------
  */
 #define CONFIG_SYS_NAND_BASE_LIST      { CONFIG_SYS_NAND_BASE }
-#define NAND_MAX_CHIPS          1
 #define CONFIG_SYS_MAX_NAND_DEVICE     1         /* Max number of NAND devices */
 #define NAND_BIG_DELAY_US      25
 
index 729153c..85c0e61 100644 (file)
@@ -411,7 +411,6 @@ int du440_phy_addr(int devnum);
  * NAND FLASH
  */
 #define CONFIG_SYS_MAX_NAND_DEVICE     2
-#define NAND_MAX_CHIPS         CONFIG_SYS_MAX_NAND_DEVICE
 #define CONFIG_SYS_NAND_SELECT_DEVICE  1       /* nand driver supports mutipl. chips */
 #define CONFIG_SYS_NAND_BASE_LIST      {CONFIG_SYS_NAND0_ADDR + CONFIG_SYS_NAND0_CS, \
                                 CONFIG_SYS_NAND1_ADDR + CONFIG_SYS_NAND1_CS}
index d299044..b445fae 100644 (file)
 
 #define NAND_ChipID_UNKNOWN    0x00
 #define NAND_MAX_FLOORS 1
-#define NAND_MAX_CHIPS 1
 
 #define CONFIG_SYS_NAND_CE  (0x80000000 >> 1)  /* our CE is GPIO1 */
 #define CONFIG_SYS_NAND_CLE (0x80000000 >> 2)  /* our CLE is GPIO2 */
index 80e59bb..e5de8ef 100644 (file)
  *-----------------------------------------------------------------------
  */
 #define CONFIG_SYS_NAND_BASE_LIST      { CONFIG_SYS_NAND_BASE }
-#define NAND_MAX_CHIPS          1
 #define CONFIG_SYS_MAX_NAND_DEVICE     1         /* Max number of NAND devices */
 #define NAND_BIG_DELAY_US      25
 
index b3c7046..1106b0d 100644 (file)
  *-----------------------------------------------------------------------
  */
 #define CONFIG_SYS_NAND_BASE_LIST      { CONFIG_SYS_NAND_BASE }
-#define NAND_MAX_CHIPS          1
 #define CONFIG_SYS_MAX_NAND_DEVICE     1         /* Max number of NAND devices */
 #define NAND_BIG_DELAY_US      25
 
index a610ac9..fbcbddb 100644 (file)
 
 #define NAND_ChipID_UNKNOWN     0x00
 #define NAND_MAX_FLOORS 1
-#define NAND_MAX_CHIPS 1
 
 #define NAND_DISABLE_CE(nand) do \
 { \
index c207947..1f1586a 100644 (file)
 #      define CONFIG_SYS_NAND_BASE             CONFIG_SYS_CS2_BASE
 #      define CONFIG_SYS_NAND_SIZE             1
 #      define CONFIG_SYS_NAND_BASE_LIST        { CONFIG_SYS_NAND_BASE }
-#      define NAND_MAX_CHIPS           1
 #      define NAND_ALLOW_ERASE_ALL     1
 #      define CONFIG_JFFS2_NAND        1
 #      define CONFIG_JFFS2_DEV         "nand0"
index a1bc32a..1991687 100644 (file)
 #      define CONFIG_SYS_NAND_BASE             CONFIG_SYS_CS2_BASE
 #      define CONFIG_SYS_NAND_SIZE             1
 #      define CONFIG_SYS_NAND_BASE_LIST        { CONFIG_SYS_NAND_BASE }
-#      define NAND_MAX_CHIPS           1
 #      define NAND_ALLOW_ERASE_ALL     1
 #      define CONFIG_JFFS2_NAND        1
 #      define CONFIG_JFFS2_DEV         "nand0"
index fc3fa13..58a26e1 100644 (file)
 #endif
 
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define NAND_MAX_CHIPS         1
 #define CONFIG_MTD_NAND_VERIFY_WRITE
 #define CONFIG_CMD_NAND 1
 #define CONFIG_NAND_FSL_ELBC 1
index 48043c4..e4ada65 100644 (file)
  */
 #define CONFIG_SYS_NAND_BASE           0xE0600000      /* 0xE0600000 */
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define NAND_MAX_CHIPS                 1
 #define CONFIG_MTD_NAND_VERIFY_WRITE   1
 #define CONFIG_CMD_NAND                        1
 #define CONFIG_NAND_FSL_ELBC           1
index a4f2862..c20f86a 100644 (file)
 #define CONFIG_CMD_NAND                1
 #define CONFIG_NAND_FSL_UPM    1
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define NAND_MAX_CHIPS         1
 #define CONFIG_MTD_NAND_VERIFY_WRITE
 
 #define CONFIG_SYS_LBLAWBAR1_PRELIM    CONFIG_SYS_NAND_BASE
index d49155f..dbffb71 100644 (file)
 #define CONFIG_CMD_NAND                1
 #define CONFIG_MTD_NAND_VERIFY_WRITE   1
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define NAND_MAX_CHIPS         1
 #define CONFIG_NAND_FSL_ELBC   1
 
 #define CONFIG_SYS_NAND_BASE           0xE0600000      /* 0xE0600000 */
index 532c3df..505c48b 100644 (file)
@@ -248,7 +248,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
                                CONFIG_SYS_NAND_BASE + 0x80000, \
                                CONFIG_SYS_NAND_BASE + 0xC0000}
 #define CONFIG_SYS_MAX_NAND_DEVICE     4
-#define NAND_MAX_CHIPS         1
 #define CONFIG_MTD_NAND_VERIFY_WRITE
 #define CONFIG_CMD_NAND                1
 #define CONFIG_NAND_FSL_ELBC   1
index 6c7a364..f84cc7e 100644 (file)
@@ -267,7 +267,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
                                CONFIG_SYS_NAND_BASE + 0x80000,\
                                CONFIG_SYS_NAND_BASE + 0xC0000}
 #define CONFIG_SYS_MAX_NAND_DEVICE    4
-#define NAND_MAX_CHIPS         1
 #define CONFIG_MTD_NAND_VERIFY_WRITE
 #define CONFIG_CMD_NAND                1
 #define CONFIG_NAND_FSL_ELBC   1
index 423ca71..0b97f0c 100644 (file)
  * NAND flash support
  */
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define NAND_MAX_CHIPS         1
 
 /*-----------------------------------------------------------------------
  * SYPCR - System Protection Control                                   11-9
index 34de947..2d04d89 100644 (file)
 #define ADDR_COLUMN_PAGE       3
 #define NAND_ChipID_UNKNOWN    0x00
 #define NAND_MAX_FLOORS                1
-#define NAND_MAX_CHIPS         1
 
 /* ALE = PD17, CLE = PE18, CE = PE20, F_RY_BY = PE31 */
 #define NAND_DISABLE_CE(nand) \
index 004b3c8..34fdba5 100644 (file)
 #define ADDR_COLUMN_PAGE       3
 #define NAND_ChipID_UNKNOWN    0x00
 #define NAND_MAX_FLOORS                1
-#define NAND_MAX_CHIPS         1
 
 /* ALE = PD3, CLE = PD4, CE = PD5, F_RY_BY = PC13 */
 #define NAND_DISABLE_CE(nand) \
index 70995fa..4a27027 100644 (file)
 #define ADDR_COLUMN_PAGE       3
 #define NAND_ChipID_UNKNOWN    0x00
 #define NAND_MAX_FLOORS                1
-#define NAND_MAX_CHIPS         1
 
 /* ALE = PD17, CLE = PE18, CE = PE20, F_RY_BY = PE31 */
 #define NAND_DISABLE_CE(nand) \
index 87c920f..f97bdcb 100644 (file)
 #define ADDR_COLUMN_PAGE       3
 #define NAND_ChipID_UNKNOWN    0x00
 #define NAND_MAX_FLOORS                1
-#define NAND_MAX_CHIPS         1
 
 #define NAND_DISABLE_CE(nand) \
        do { \
index 11ce008..e9f1646 100644 (file)
  * NAND-FLASH stuff
  */
 #define CONFIG_SYS_NAND_BASE_LIST      {CONFIG_SYS_NAND_BASE}
-#define NAND_MAX_CHIPS          1
 #define CONFIG_SYS_MAX_NAND_DEVICE     1         /* Max number of NAND devices */
 #define NAND_BIG_DELAY_US      25
 
index f9f1002..fc48bc1 100644 (file)
  * NAND FLASH
  *----------------------------------------------------------------------*/
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define NAND_MAX_CHIPS         1
 #define CONFIG_SYS_NAND_BASE           (CONFIG_SYS_NAND_ADDR + CONFIG_SYS_NAND_CS)
 #define CONFIG_SYS_NAND_SELECT_DEVICE  1 /* nand driver supports mutipl. chips */
 #define CONFIG_SYS_NAND_QUIET_TEST     1
index 09a9641..d4322b6 100644 (file)
 #define NAND_BIG_DELAY_US      25
 #define CONFIG_SYS_MAX_NAND_DEVICE     2       /* Max number of NAND devices */
 
-#define NAND_MAX_CHIPS 1
-
 #define CONFIG_SYS_NAND0_CE  (0x80000000 >> 1)  /* our CE is GPIO1 */
 #define CONFIG_SYS_NAND0_RDY (0x80000000 >> 4)  /* our RDY is GPIO4 */
 #define CONFIG_SYS_NAND0_CLE (0x80000000 >> 2)  /* our CLE is GPIO2 */
index 7fc455b..9857bf6 100644 (file)
 
 #define NAND_ChipID_UNKNOWN    0x00
 #define NAND_MAX_FLOORS 1
-#define NAND_MAX_CHIPS 1
 
 /* DFBUSY is available on Port C, bit 12; 0 if busy */
 #define NAND_WAIT_READY(nand)  \
index 1915a73..9cac696 100644 (file)
 #define CONFIG_SYS_NAND3_BASE (CONFIG_SYS_NAND2_BASE + CONFIG_SYS_NAND_CS_DIST)
 
 #define CONFIG_SYS_MAX_NAND_DEVICE     4       /* Max number of NAND devices           */
-#define NAND_MAX_CHIPS 1
 
 #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND0_BASE, \
                             CONFIG_SYS_NAND1_BASE, \
index 6d205a7..f5831eb 100644 (file)
 #define CONFIG_SYS_NAND3_BASE          (CONFIG_SYS_NAND2_BASE + CONFIG_SYS_NAND_CS_DIST)
 
 #define CONFIG_SYS_MAX_NAND_DEVICE     2       /* Max number of NAND devices   */
-#define NAND_MAX_CHIPS         1
 
 #if (CONFIG_SYS_MAX_NAND_DEVICE == 1)
 #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND0_BASE }
index 0bc2f68..83d0d56 100644 (file)
 
 #define NAND_ChipID_UNKNOWN    0x00
 #define NAND_MAX_FLOORS 1
-#define NAND_MAX_CHIPS 1
 
 #define NAND_WAIT_READY(nand)  NF_WaitRB()
 
index 10ef620..f173bcc 100644 (file)
  *-----------------------------------------------------------------------
  */
 #define CONFIG_SYS_NAND_BASE_LIST      { CONFIG_SYS_NAND_BASE }
-#define NAND_MAX_CHIPS          1
 #define CONFIG_SYS_MAX_NAND_DEVICE     1         /* Max number of NAND devices */
 #define NAND_BIG_DELAY_US      25
 
index 01cdf3a..de6e12f 100644 (file)
  *-----------------------------------------------------------------------
  */
 #define CONFIG_SYS_NAND_BASE_LIST      { CONFIG_SYS_NAND_BASE }
-#define NAND_MAX_CHIPS          1
 #define CONFIG_SYS_MAX_NAND_DEVICE     1         /* Max number of NAND devices */
 #define NAND_BIG_DELAY_US      25
 
index 52ccdb5..9ffd86b 100644 (file)
  * NAND FLASH
  *----------------------------------------------------------------------*/
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define NAND_MAX_CHIPS         1
 #define CONFIG_SYS_NAND_BASE           (CONFIG_SYS_NAND_ADDR + CONFIG_SYS_NAND_CS)
 #define CONFIG_SYS_NAND_SELECT_DEVICE  1       /* nand driver supports mutipl. chips   */
 
index d63a1a0..e996bbd 100644 (file)
@@ -97,7 +97,6 @@
 #define DATAFLASH_TCHS                 (0x1 << 24)
 
 /* NAND flash */
-#define NAND_MAX_CHIPS                 1
 #define CONFIG_SYS_MAX_NAND_DEVICE             1
 #define CONFIG_SYS_NAND_BASE                   0x40000000
 #define CONFIG_SYS_NAND_DBW_8                  1
index 7ce8205..e6248e9 100644 (file)
  * NAND-FLASH stuff
  *-----------------------------------------------------------------------*/
 #define CONFIG_SYS_MAX_NAND_DEVICE     4
-#define NAND_MAX_CHIPS         CONFIG_SYS_MAX_NAND_DEVICE
 #define CONFIG_SYS_NAND_BASE           0xF0000000      /* NAND FLASH Base Address      */
 #define CONFIG_SYS_NAND_BASE_LIST      { CONFIG_SYS_NAND_BASE + 0, CONFIG_SYS_NAND_BASE + 2,   \
                                  CONFIG_SYS_NAND_BASE + 4, CONFIG_SYS_NAND_BASE + 6 }
index b2baf1b..f1c5526 100644 (file)
 #define CONFIG_SYS_MAX_FLASH_BANKS             1
 
 /* NAND flash */
-#define NAND_MAX_CHIPS                 1
 #define CONFIG_SYS_MAX_NAND_DEVICE             1
 #define CONFIG_SYS_NAND_BASE                   0x40000000
 #define CONFIG_SYS_NAND_DBW_8                  1
index c7e83cc..5a980d3 100644 (file)
 
 #define NAND_ChipID_UNKNOWN    0x00
 #define NAND_MAX_FLOORS 1
-#define NAND_MAX_CHIPS 1
 
 #define AT91_SMART_MEDIA_ALE (1 << 22) /* our ALE is AD22 */
 #define AT91_SMART_MEDIA_CLE (1 << 21) /* our CLE is AD21 */
index 1538929..4501cae 100644 (file)
 #define DATAFLASH_TCHS                 (0x1 << 24)
 
 /* NAND flash */
-#define NAND_MAX_CHIPS                 1
 #define CONFIG_SYS_MAX_NAND_DEVICE             1
 #define CONFIG_SYS_NAND_BASE                   0x40000000
 #define CONFIG_SYS_NAND_DBW_8                  1
index 0016b4f..668fe3b 100644 (file)
 #define DATAFLASH_TCHS                 (0x1 << 24)
 
 /* NAND flash */
-#define NAND_MAX_CHIPS                 1
 #define CONFIG_SYS_MAX_NAND_DEVICE             1
 #define CONFIG_SYS_NAND_BASE                   0x40000000
 #define CONFIG_SYS_NAND_DBW_8                  1
index d9ebc87..c6603ff 100644 (file)
 #endif
 
 /* NAND flash */
-#define NAND_MAX_CHIPS                 1
 #define CONFIG_SYS_MAX_NAND_DEVICE             1
 #define CONFIG_SYS_NAND_BASE                   0x40000000
 #define CONFIG_SYS_NAND_DBW_8                  1
index 35fefc4..5bef1fe 100644 (file)
 #define CONFIG_SYS_NO_FLASH                    1
 
 /* NAND flash */
-#define NAND_MAX_CHIPS                 1
 #define CONFIG_SYS_MAX_NAND_DEVICE             1
 #define CONFIG_SYS_NAND_BASE                   0x40000000
 #define CONFIG_SYS_NAND_DBW_8                  1
index f3ffe1c..8c4127d 100644 (file)
  * NAND FLASH
  *----------------------------------------------------------------------*/
 #define CONFIG_SYS_MAX_NAND_DEVICE     2
-#define NAND_MAX_CHIPS         CONFIG_SYS_MAX_NAND_DEVICE
 #define CONFIG_SYS_NAND_BASE           (CONFIG_SYS_NAND_ADDR + CONFIG_SYS_NAND_CS)
 #define CONFIG_SYS_NAND_BASE_LIST      { CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_ADDR + 2 }
 #define CONFIG_SYS_NAND_SELECT_DEVICE  1       /* nand driver supports mutipl. chips   */
index 1b54d3b..ac5aaa5 100644 (file)
 #define ADDR_COLUMN_PAGE       3
 #define NAND_ChipID_UNKNOWN    0x00
 #define NAND_MAX_FLOORS                1
-#define NAND_MAX_CHIPS         1
 #define BFIN_NAND_READY                PF3
 
 #define NAND_WAIT_READY(nand)                  \
index faf6304..d814012 100644 (file)
  * NAND-FLASH related
  *----------------------------------------------------------------------*/
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define NAND_MAX_CHIPS         1
 #define CONFIG_SYS_NAND_BASE           (CONFIG_SYS_NAND_ADDR + CONFIG_SYS_NAND_CS)
 #define CONFIG_SYS_NAND_SELECT_DEVICE  1       /* nand driver supports mutipl. chips   */
 
index 2df77cf..761c0dc 100644 (file)
 
 #define NAND_ChipID_UNKNOWN    0x00
 #define NAND_MAX_FLOORS 1
-#define NAND_MAX_CHIPS 1
 
 #define AT91_SMART_MEDIA_ALE (1 << 22) /* our ALE is AD22 */
 #define AT91_SMART_MEDIA_CLE (1 << 21) /* our CLE is AD21 */
index 6885b2c..a727f56 100644 (file)
 #define CONFIG_SYS_NAND_BASE           0x02000000
 #define CONFIG_SYS_NAND_HW_ECC
 #define CONFIG_SYS_MAX_NAND_DEVICE     1       /* Max number of NAND devices */
-#define NAND_MAX_CHIPS         1
 #define CONFIG_ENV_OFFSET              0x0     /* Block 0--not used by bootcode */
 #define DEF_BOOTM              ""
 #elif defined(CONFIG_SYS_USE_NOR)
index 8d7bcf5..22d3808 100644 (file)
@@ -89,7 +89,6 @@
 #define CONFIG_SYS_NAND_BASE           0x02000000
 #define CONFIG_SYS_NAND_HW_ECC
 #define CONFIG_SYS_MAX_NAND_DEVICE     1       /* Max number of NAND devices */
-#define NAND_MAX_CHIPS         1
 #define CONFIG_ENV_OFFSET              0x0     /* Block 0--not used by bootcode */
 /*=====================*/
 /* Board related stuff */
index e9cd5a6..875bab6 100644 (file)
@@ -85,7 +85,6 @@
 #define CONFIG_SYS_NAND_BASE           0x02000000
 #define CONFIG_SYS_NAND_HW_ECC
 #define CONFIG_SYS_MAX_NAND_DEVICE     1       /* Max number of NAND devices */
-#define NAND_MAX_CHIPS         1
 #define CONFIG_ENV_OFFSET              0x0     /* Block 0--not used by bootcode */
 /* I2C switch definitions for PCA9543 chip */
 #define CONFIG_SYS_I2C_PCA9543_ADDR            0x70
index 381eeb7..47ab27a 100644 (file)
 #define CONFIG_SYS_NAND_BASE           0x02000000
 #define CONFIG_SYS_NAND_HW_ECC
 #define CONFIG_SYS_MAX_NAND_DEVICE     1       /* Max number of NAND devices */
-#define NAND_MAX_CHIPS         1
 #define CONFIG_ENV_OFFSET              0x0     /* Block 0--not used by bootcode */
 #define DEF_BOOTM              ""
 #elif defined(CONFIG_SYS_USE_NOR)
index 08b28ca..fd97b74 100644 (file)
 
 #define NAND_ChipID_UNKNOWN    0x00
 #define NAND_MAX_FLOORS                1
-#define NAND_MAX_CHIPS         1
 
 #define CONFIG_SYS_NO_FLASH            1
 
index b943f31..4d3ccf5 100644 (file)
  * NAND FLASH
  *----------------------------------------------------------------------*/
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define NAND_MAX_CHIPS         1
 #define CONFIG_SYS_NAND_BASE           (CONFIG_SYS_NAND_ADDR + CONFIG_SYS_NAND_CS)
 #define CONFIG_SYS_NAND_SELECT_DEVICE  1       /* nand driver supports mutipl. chips   */
 
index dda6597..fab22d1 100644 (file)
  * NAND flash
  */
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define NAND_MAX_CHIPS         1
 #define CONFIG_SYS_NAND_BASE   0x04000000 + (2 << 23)
 #define NAND_ALLOW_ERASE_ALL   1
 
index d11868e..92df0b4 100644 (file)
 
 #define NAND_ChipID_UNKNOWN 0x00
 #define NAND_MAX_FLOORS     1
-#define NAND_MAX_CHIPS      1
 
 #define WRITE_NAND_COMMAND(d, adr) do {*(volatile u16 *)0x6800A07C = d;} while(0)
 #define WRITE_NAND_ADDRESS(d, adr) do {*(volatile u16 *)0x6800A080 = d;} while(0)
index 8b7890e..f8aac1a 100644 (file)
  * NAND-FLASH stuff
  */
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define NAND_MAX_CHIPS         1
 #define CONFIG_SYS_NAND_BASE           0x51000000      /* NAND FLASH Base Address      */
 #endif
 
index 0f7fca3..3ea854b 100644 (file)
 #define CONFIG_SYS_NAND_CE     24   /* our CE is GPIO24  */
 #define CONFIG_SYS_NAND_CLE    31   /* our CLE is GPIO31 */
 #define CONFIG_SYS_NAND_ALE    30   /* our ALE is GPIO30 */
-#define NAND_MAX_CHIPS 1
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
 #endif
 
index d7a6ae4..bf4a14e 100644 (file)
 
 #define NAND_ChipID_UNKNOWN    0x00
 #define NAND_MAX_FLOORS 1
-#define NAND_MAX_CHIPS 1
 
 #define NAND_WAIT_READY(nand)  NF_WaitRB()
 #define NAND_DISABLE_CE(nand)  NF_SetCE(NFCE_HIGH)
index d152a96..515b097 100644 (file)
@@ -424,7 +424,6 @@ extern unsigned long offsetOfEnvironment;
  * NAND-FLASH stuff
  */
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define NAND_MAX_CHIPS         1
 #define CONFIG_SYS_NAND_BASE           0x77D00000
 
 
index 9321bdc..a3e2fce 100644 (file)
  * NAND FLASH
  */
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define NAND_MAX_CHIPS         1
 #define CONFIG_SYS_NAND_BASE           (CONFIG_SYS_NAND_ADDR + CONFIG_SYS_NAND_CS)
 #define CONFIG_SYS_NAND_SELECT_DEVICE  1       /* nand driver supports mutipl. chips */
 
index 1784cc6..57c82d1 100644 (file)
 /* NAND configuration */
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
 #define CONFIG_SYS_NAND_BASE           0x70200010
-#define NAND_MAX_CHIPS         1
 #define CONFIG_SYS_S3C_NAND_HWECC
 
 #define CONFIG_SYS_NAND_SKIP_BAD_DOT_I 1  /* ".i" read skips bad blocks              */
index cbf04e3..becd13e 100644 (file)
 
 #define CONFIG_SYS_NAND_BASE           (CONFIG_SYS_FPGA_BASE + 0x70)
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define NAND_MAX_CHIPS         1
 #define CONFIG_CMD_NAND
 
 /* LIME GDC */
index bc078cf..5a5f772 100644 (file)
 #define ADDR_COLUMN_PAGE       3
 #define NAND_ChipID_UNKNOWN    0x00
 #define NAND_MAX_FLOORS                1
-#define NAND_MAX_CHIPS         1
 
 /* ALE = PC15, CLE = PB23, CE = PA7, F_RY_BY = PA6 */
 #define NAND_DISABLE_CE(nand) \
index 53397d8..f30eca1 100644 (file)
 
 #define NAND_ChipID_UNKNOWN    0x00
 #define NAND_MAX_FLOORS                1
-#define NAND_MAX_CHIPS         1
 
 #define CONFIG_SYS_NO_FLASH            1
 
index abf8f1a..7db2546 100644 (file)
@@ -18,8 +18,8 @@
 #define __LINUX_MTD_BBM_H
 
 /* The maximum number of NAND chips in an array */
-#ifndef NAND_MAX_CHIPS
-#define NAND_MAX_CHIPS         8
+#ifndef CONFIG_SYS_NAND_MAX_CHIPS
+#define CONFIG_SYS_NAND_MAX_CHIPS      1
 #endif
 
 /**
  */
 struct nand_bbt_descr {
        int options;
-       int pages[NAND_MAX_CHIPS];
+       int pages[CONFIG_SYS_NAND_MAX_CHIPS];
        int offs;
        int veroffs;
-       uint8_t version[NAND_MAX_CHIPS];
+       uint8_t version[CONFIG_SYS_NAND_MAX_CHIPS];
        int len;
        int maxblocks;
        int reserved_block_code;
index 24ad2bd..a4ad571 100644 (file)
@@ -46,11 +46,6 @@ extern void nand_release (struct mtd_info *mtd);
 /* Internal helper for board drivers which need to override command function */
 extern void nand_wait_ready(struct mtd_info *mtd);
 
-/* The maximum number of NAND chips in an array */
-#ifndef NAND_MAX_CHIPS
-#define NAND_MAX_CHIPS         8
-#endif
-
 /* This constant declares the max. oobsize / page, which
  * is supported now. If you add a chip with bigger oobsize/page
  * adjust this accordingly.
@@ -477,10 +472,6 @@ struct nand_manufacturers {
 extern struct nand_flash_dev nand_flash_ids[];
 extern struct nand_manufacturers nand_manuf_ids[];
 
-#ifndef NAND_MAX_CHIPS
-#define NAND_MAX_CHIPS 8
-#endif
-
 extern int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd);
 extern int nand_update_bbt(struct mtd_info *mtd, loff_t offs);
 extern int nand_default_bbt(struct mtd_info *mtd);
index 99eafbb..4334448 100644 (file)
 #error This module is for the legacy NAND support
 #endif
 
+/* The maximum number of NAND chips in an array */
+#ifndef CONFIG_SYS_NAND_MAX_CHIPS
+#define CONFIG_SYS_NAND_MAX_CHIPS      1
+#endif
+
 /*
  * Standard NAND flash commands
  */