diff mbox

[U-Boot,v4,4/5] mtd: nand: omap: add CONFIG_SYS_NAND_DEVICE_WIDTH to determine NAND device bus-width

Message ID 1398685316-8369-5-git-send-email-pekon@ti.com
State Superseded
Delegated to: Scott Wood
Headers show

Commit Message

pekon gupta April 28, 2014, 11:41 a.m. UTC
This patch introduces CONFIG_SYS_NAND_DEVICE_WIDTH to specify bus-width of NAND device
  CONFIG_SYS_NAND_DEVICE_WIDTH == 16: NAND device with x16 bus-width
  CONFIG_SYS_NAND_DEVICE_WIDTH == 8:  NAND device with x8 bus-width

Need for a separate CONFIG_SYS_NAND_xx arise from following requirements:
(1) SPL NAND drivers does not have framework to parse ONFI parameter page.

(2) GPMC controller needs to know about the bus-width of device connected to it on board.
    But as GPMC controller is initialized before the NAND device is probed, and
    there is no way of re-configuring the GPMC controller based on-chip ONFI parameters.
    if !defined (CONFIG_SYS_NAND_SELF_INIT)
         |- board_nand_init()
         |- nand_scan()
               |- nand_scan_ident()
               |- nand_scan_tail()

(3) Non-ONFI compliant devices need some mechanism to specify device bus-width
   to driver.

Signed-off-by: Pekon Gupta <pekon@ti.com>
---
 doc/README.nand                        |  9 +++++++++
 drivers/mtd/nand/omap_gpmc.c           | 13 +++++++++----
 include/configs/am335x_evm.h           |  1 +
 include/configs/am335x_igep0033.h      |  1 +
 include/configs/am3517_crane.h         |  1 +
 include/configs/am3517_evm.h           |  1 +
 include/configs/cm_t335.h              |  1 +
 include/configs/cm_t35.h               |  1 +
 include/configs/devkit8000.h           |  1 +
 include/configs/dig297.h               |  1 +
 include/configs/mcx.h                  |  1 +
 include/configs/omap3_beagle.h         |  1 +
 include/configs/omap3_evm_common.h     |  2 +-
 include/configs/omap3_igep00x0.h       |  1 +
 include/configs/omap3_logic.h          |  1 +
 include/configs/omap3_overo.h          |  1 +
 include/configs/omap3_pandora.h        |  2 +-
 include/configs/omap3_zoom1.h          |  1 +
 include/configs/pengwyn.h              |  1 +
 include/configs/siemens-am33x-common.h |  1 +
 include/configs/tam3517-common.h       |  1 +
 include/configs/tao3530.h              |  1 +
 include/configs/tricorder.h            |  1 +
 include/configs/tseries.h              |  1 +
 24 files changed, 40 insertions(+), 6 deletions(-)

Comments

Scott Wood April 29, 2014, 10:55 p.m. UTC | #1
On Mon, 2014-04-28 at 17:11 +0530, Pekon Gupta wrote:
> +   CONFIG_SYS_NAND_DEVICE_WIDTH
> +	Specifies bus-width of the default NAND device connected to SoC.
> +	This config is useful for driver which cannot self initialize or
> +	parse ONFI parameter (like SPL drivers), or for supporting non-ONFI
> +	compliant devices.
> +	This config can take following values:
> +	- 8: x8 NAND devices is connected
> +	- 16: x16 NAND device is connected

Please list here the drivers that pay attention to this config symbol.

I'm not sure what this has to do with CONFIG_SYS_NAND_SELF_INIT -- or
did you mean something different by "self initialize"?

-Scott
pekon gupta April 30, 2014, 5:12 a.m. UTC | #2
Hi Scott,

>From: Scott Wood [mailto:scottwood@freescale.com]
>>On Mon, 2014-04-28 at 17:11 +0530, Pekon Gupta wrote:
>> +   CONFIG_SYS_NAND_DEVICE_WIDTH
>> +	Specifies bus-width of the default NAND device connected to SoC.
>> +	This config is useful for driver which cannot self initialize or
>> +	parse ONFI parameter (like SPL drivers), or for supporting non-ONFI
>> +	compliant devices.
>> +	This config can take following values:
>> +	- 8: x8 NAND devices is connected
>> +	- 16: x16 NAND device is connected
>
>Please list here the drivers that pay attention to this config symbol.
>
Different drivers use different approach.
- Some driver like omap_gpmc.c require users to hack their board file
 and do NAND device-width configurations by themselves.
- Others drivers uses some different CONFIG_SYS_NAND_xx symbols
which is not documented in doc/README.nand

- atmel_nand.c: uses CONFIG_SYS_NAND_DBW_16
- fsl_ifc_nand.c:  depends on configuration done in board file
- fsmc_nand.c: CONFIG_SYS_FSMC_NAND_16BIT
- mpc5121_nfc.c: depends on configurations done in board file
- mxc_nand.c: uses CONFIG_SYS_NAND_BUSWIDTH_16BIT
- ndfc.c: uses CONFIG_SYS_NAND_BUSWIDTH_16BIT
- tegra_nand.c: ??

I just realize OMAP driver can also _reuse_ CONFIG_SYS_NAND_BUSWIDTH_16BIT
instead of adding new config. Is this okay ? I missed it because it wasn't documented.


>I'm not sure what this has to do with CONFIG_SYS_NAND_SELF_INIT -- or
>did you mean something different by "self initialize"?
>
GPMC controller has a configuration bit, which needs to be programmed
based on bus-width of the NAND device attached to it. This configuration
has to be done at _driver_ probe itself, in board_nand_init().

*Current Implementation*
Current implementation of OMAP NAND driver uses nand_init_chip()
which calls board_nand_init() *before* any NAND device is scanned.
So, it's not possible to do use the information from ONFI PARAMs and
re-configure the controller as execution flow never return back to
board_nand_init().

-------
File: drivers/mtd/nand/nand.c
#ifndef CONFIG_SYS_NAND_SELF_INIT
static void nand_init_chip(int i)
{
	struct mtd_info *mtd = &nand_info[i];
	struct nand_chip *nand = &nand_chip[i];
	ulong base_addr = base_address[i];
	int maxchips = CONFIG_SYS_NAND_MAX_CHIPS;

	if (maxchips < 1)
		maxchips = 1;

	mtd->priv = nand;
	nand->IO_ADDR_R = nand->IO_ADDR_W = (void  __iomem *)base_addr;

	if (board_nand_init(nand))     <-------- driver initialization happens before 
		return;

	if (nand_scan(mtd, maxchips))    <------ device scan (where ONFI params are read)
		return;

	nand_register(i);
}
#endif
-------
Therefore, all the drivers which need to configure controllers *before*
the ONFI PARAMs are read from the device, need some or the other
CONFIG_NAND_xx or board file hacks to configure their controller.
This is the background of this patch.



*Alternative Implementation*
An alternate to this was to use "CONFIG_SYS_NAND_SELF_INIT", which gives
freedom to board_nand_init() to do device scan as required. And driver can add
initialization code in-between the calls to nand_scan_ident() and nand_scan_tail()

Reference: doc/README.nand

	if (nand_scan_ident(mtd, CONFIG_SYS_MAX_NAND_CHIPS, NULL))
		error out

	/*
	 * Insert here any code you wish to run after the chip has been
	 * identified, but before any other I/O is done.
	 */

	if (nand_scan_tail(mtd))
		error out


- Moving OMAP NAND driver to use CONFIG_SYS_NAND_SELF_INIT as
given in alternate implementation, requires some larger changes.

- As SPL code flow does not support ONFI param scanning, so some
CONFIG_NAND_xx is required to tell SPL driver about device bus-width.


with regards, pekon
Scott Wood April 30, 2014, 6:11 p.m. UTC | #3
On Wed, 2014-04-30 at 05:12 +0000, Gupta, Pekon wrote:
> Hi Scott,
> 
> >From: Scott Wood [mailto:scottwood@freescale.com]
> >>On Mon, 2014-04-28 at 17:11 +0530, Pekon Gupta wrote:
> >> +   CONFIG_SYS_NAND_DEVICE_WIDTH
> >> +	Specifies bus-width of the default NAND device connected to SoC.
> >> +	This config is useful for driver which cannot self initialize or
> >> +	parse ONFI parameter (like SPL drivers), or for supporting non-ONFI
> >> +	compliant devices.
> >> +	This config can take following values:
> >> +	- 8: x8 NAND devices is connected
> >> +	- 16: x16 NAND device is connected
> >
> >Please list here the drivers that pay attention to this config symbol.
> >
> Different drivers use different approach.

Precisely -- that's why I don't want it to look like this is a generic
option that all drivers use.

> - Some driver like omap_gpmc.c require users to hack their board file
>  and do NAND device-width configurations by themselves.

I'd call it configuration rather than hacking. :-)

> - Others drivers uses some different CONFIG_SYS_NAND_xx symbols
> which is not documented in doc/README.nand
> 
> - atmel_nand.c: uses CONFIG_SYS_NAND_DBW_16
> - fsl_ifc_nand.c:  depends on configuration done in board file
> - fsmc_nand.c: CONFIG_SYS_FSMC_NAND_16BIT
> - mpc5121_nfc.c: depends on configurations done in board file
> - mxc_nand.c: uses CONFIG_SYS_NAND_BUSWIDTH_16BIT
> - ndfc.c: uses CONFIG_SYS_NAND_BUSWIDTH_16BIT
> - tegra_nand.c: ??
> 
> I just realize OMAP driver can also _reuse_ CONFIG_SYS_NAND_BUSWIDTH_16BIT
> instead of adding new config. Is this okay ? I missed it because it wasn't documented.

Yes, just document it and list the drivers that use it.

-Scott
diff mbox

Patch

diff --git a/doc/README.nand b/doc/README.nand
index b91f198..90d857e 100644
--- a/doc/README.nand
+++ b/doc/README.nand
@@ -190,6 +190,15 @@  Configuration Options:
 	This is used by SoC platforms which do not have built-in ELM
 	hardware engine required for BCH ECC correction.
 
+   CONFIG_SYS_NAND_DEVICE_WIDTH
+	Specifies bus-width of the default NAND device connected to SoC.
+	This config is useful for driver which cannot self initialize or
+	parse ONFI parameter (like SPL drivers), or for supporting non-ONFI
+	compliant devices.
+	This config can take following values:
+	- 8: x8 NAND devices is connected
+	- 16: x16 NAND device is connected
+
 
 Platform specific options
 =========================
diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c
index 325ebfd..ba7ac2b 100644
--- a/drivers/mtd/nand/omap_gpmc.c
+++ b/drivers/mtd/nand/omap_gpmc.c
@@ -782,13 +782,18 @@  int board_nand_init(struct nand_chip *nand)
 	nand->priv	= &omap_nand_info;
 	nand->cmd_ctrl	= omap_nand_hwcontrol;
 	nand->options	|= NAND_NO_PADDING | NAND_CACHEPRG;
-	/* If we are 16 bit dev, our gpmc config tells us that */
-	if ((readl(&gpmc_cfg->cs[cs].config1) & 0x3000) == 0x1000)
-		nand->options |= NAND_BUSWIDTH_16;
-
 	nand->chip_delay = 100;
 	nand->ecc.layout = &omap_ecclayout;
 
+	/* configure driver and controller based on NAND device bus-width */
+	gpmc_config = readl(&gpmc_cfg->cs[cs].config1);
+	if (CONFIG_SYS_NAND_DEVICE_WIDTH == 16) {
+		nand->options |= NAND_BUSWIDTH_16;
+		writel(gpmc_config | (0x1 << 12), &gpmc_cfg->cs[cs].config1);
+	} else {
+		nand->options &= ~NAND_BUSWIDTH_16;
+		writel(gpmc_config & ~(0x1 << 12), &gpmc_cfg->cs[cs].config1);
+	}
 	/* select ECC scheme */
 #if defined(CONFIG_NAND_OMAP_ECCSCHEME)
 	err = omap_select_ecc_scheme(nand, CONFIG_NAND_OMAP_ECCSCHEME,
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index ea9e758..8a38cb2 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -229,6 +229,7 @@ 
 #ifdef CONFIG_NAND
 #define CONFIG_NAND_OMAP_GPMC
 #define CONFIG_NAND_OMAP_ELM
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	8
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_COUNT	(CONFIG_SYS_NAND_BLOCK_SIZE / \
 					 CONFIG_SYS_NAND_PAGE_SIZE)
diff --git a/include/configs/am335x_igep0033.h b/include/configs/am335x_igep0033.h
index c17327f..0563935 100644
--- a/include/configs/am335x_igep0033.h
+++ b/include/configs/am335x_igep0033.h
@@ -245,6 +245,7 @@ 
 #define CONFIG_SPL_NAND_BASE
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_ECC
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	8
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_COUNT	(CONFIG_SYS_NAND_BLOCK_SIZE / \
 					 CONFIG_SYS_NAND_PAGE_SIZE)
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index 4407b45..bc38f40 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -329,6 +329,7 @@ 
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
 
 /* NAND boot config */
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	16
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_COUNT	64
 #define CONFIG_SYS_NAND_PAGE_SIZE	2048
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index 0102ff5..c57fcdd 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -338,6 +338,7 @@ 
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
 
 /* NAND boot config */
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	8
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_COUNT	64
 #define CONFIG_SYS_NAND_PAGE_SIZE	2048
diff --git a/include/configs/cm_t335.h b/include/configs/cm_t335.h
index 26b615b..158cf8f 100644
--- a/include/configs/cm_t335.h
+++ b/include/configs/cm_t335.h
@@ -142,6 +142,7 @@ 
 
 #define CONFIG_CMD_NAND
 #define GPMC_NAND_ECC_LP_x8_LAYOUT
+#define	CONFIG_SYS_NAND_DEVICE_WIDTH	8
 #define MTDIDS_DEFAULT			"nand0=nand"
 #define MTDPARTS_DEFAULT		"mtdparts=nand:2m(spl)," \
 					"1m(u-boot),1m(u-boot-env)," \
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index aae05e0..bb5dfb9 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -150,6 +150,7 @@ 
  * Board NAND Info.
  */
 #define CONFIG_SYS_NAND_QUIET_TEST
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	8
 #define CONFIG_NAND_OMAP_GPMC
 #define CONFIG_SYS_NAND_ADDR		NAND_BASE	/* physical address */
 							/* to access nand */
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index 16a00eb..8929bce 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -314,6 +314,7 @@ 
 #define CONFIG_SPL_BSS_MAX_SIZE		0x80000
 
 /* NAND boot config */
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	16
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_COUNT	64
 #define CONFIG_SYS_NAND_PAGE_SIZE	2048
diff --git a/include/configs/dig297.h b/include/configs/dig297.h
index af6f56b..527f9c4 100644
--- a/include/configs/dig297.h
+++ b/include/configs/dig297.h
@@ -138,6 +138,7 @@ 
  * Board NAND Info.
  */
 #define CONFIG_NAND_OMAP_GPMC
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	16
 #define CONFIG_SYS_NAND_ADDR		NAND_BASE	/* physical address */
 							/* to access nand */
 #define CONFIG_SYS_NAND_BASE		NAND_BASE	/* physical address */
diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index 47244c0..3804ad4 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -382,6 +382,7 @@ 
 #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME	"u-boot.img"
 
 /* NAND boot config */
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	8
 #define CONFIG_SYS_NAND_PAGE_COUNT	64
 #define CONFIG_SYS_NAND_PAGE_SIZE	2048
 #define CONFIG_SYS_NAND_OOBSIZE		64
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 0b57421..b31e907 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -422,6 +422,7 @@ 
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
 
 /* NAND boot config */
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	16
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_COUNT	64
 #define CONFIG_SYS_NAND_PAGE_SIZE	2048
diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h
index 7f3424b..8cf0dd0 100644
--- a/include/configs/omap3_evm_common.h
+++ b/include/configs/omap3_evm_common.h
@@ -120,7 +120,7 @@ 
 
 /* Max number of NAND devices */
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
-
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	16
 /* Timeout values (in ticks) */
 #define CONFIG_SYS_FLASH_ERASE_TOUT	(100 * CONFIG_SYS_HZ)
 #define CONFIG_SYS_FLASH_WRITE_TOUT	(100 * CONFIG_SYS_HZ)
diff --git a/include/configs/omap3_igep00x0.h b/include/configs/omap3_igep00x0.h
index d56d5b0..8b8583a 100644
--- a/include/configs/omap3_igep00x0.h
+++ b/include/configs/omap3_igep00x0.h
@@ -187,6 +187,7 @@ 
 
 /* NAND boot config */
 #ifdef CONFIG_NAND
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	16
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_COUNT	64
 #define CONFIG_SYS_NAND_PAGE_SIZE	2048
diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h
index 0d03c75..e4c09ff 100644
--- a/include/configs/omap3_logic.h
+++ b/include/configs/omap3_logic.h
@@ -141,6 +141,7 @@ 
 
 #define CONFIG_SYS_MAX_NAND_DEVICE	1		/* Max number of */
 							/* NAND devices */
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	16
 #define CONFIG_JFFS2_NAND
 /* nand device jffs2 lives on */
 #define CONFIG_JFFS2_DEV		"nand0"
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index 007e27f..66e753d 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -312,6 +312,7 @@ 
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
 
 /* NAND boot config */
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	16
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_COUNT	64
 #define CONFIG_SYS_NAND_PAGE_SIZE	2048
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index da67787..f6cd9b0 100644
--- a/include/configs/omap3_pandora.h
+++ b/include/configs/omap3_pandora.h
@@ -133,7 +133,7 @@ 
 							/* at CS0 */
 #define CONFIG_SYS_MAX_NAND_DEVICE	1	/* Max number of NAND */
 						/* devices */
-
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	8
 #ifdef CONFIG_CMD_NAND
 #define CONFIG_CMD_MTDPARTS
 #define CONFIG_MTD_PARTITIONS
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h
index f0fa96e..29de928 100644
--- a/include/configs/omap3_zoom1.h
+++ b/include/configs/omap3_zoom1.h
@@ -140,6 +140,7 @@ 
 							/* CS0 */
 #define CONFIG_SYS_MAX_NAND_DEVICE	1		/* Max number of NAND */
 							/* devices */
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	16
 #define CONFIG_JFFS2_NAND
 /* nand device jffs2 lives on */
 #define CONFIG_JFFS2_DEV		"nand0"
diff --git a/include/configs/pengwyn.h b/include/configs/pengwyn.h
index fc25966..0a0c77f 100644
--- a/include/configs/pengwyn.h
+++ b/include/configs/pengwyn.h
@@ -127,6 +127,7 @@ 
 #define CONFIG_CMD_NAND
 #define CONFIG_NAND_OMAP_GPMC
 #define CONFIG_NAND_OMAP_ELM
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	8
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_COUNT	(CONFIG_SYS_NAND_BLOCK_SIZE / \
 					 CONFIG_SYS_NAND_PAGE_SIZE)
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 721c4e6..3920671 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -178,6 +178,7 @@ 
 #define CONFIG_SPL_NAND_BASE
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_ECC
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	8
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_COUNT	(CONFIG_SYS_NAND_BLOCK_SIZE / \
 					 CONFIG_SYS_NAND_PAGE_SIZE)
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index 3522c1a..04c4b70 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -249,6 +249,7 @@ 
 #define CONFIG_SPL_BSS_MAX_SIZE		0x80000
 
 /* NAND boot config */
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	16
 #define CONFIG_SYS_NAND_PAGE_COUNT	64
 #define CONFIG_SYS_NAND_PAGE_SIZE	2048
 #define CONFIG_SYS_NAND_OOBSIZE		64
diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h
index 9c04c23..7dee34e 100644
--- a/include/configs/tao3530.h
+++ b/include/configs/tao3530.h
@@ -141,6 +141,7 @@ 
 
 #define CONFIG_SYS_MAX_NAND_DEVICE	1		/* Max number of NAND */
 							/* devices */
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	16
 /* Environment information */
 #define CONFIG_BOOTDELAY		3
 
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index 80985a2..0a6a456 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -362,6 +362,7 @@ 
 #define CONFIG_SPL_BSS_MAX_SIZE		0x80000
 
 /* NAND boot config */
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	8
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_COUNT	64
 #define CONFIG_SYS_NAND_PAGE_SIZE	2048
diff --git a/include/configs/tseries.h b/include/configs/tseries.h
index 8fb87ac..4c5f11a 100644
--- a/include/configs/tseries.h
+++ b/include/configs/tseries.h
@@ -158,6 +158,7 @@ 
 #define CONFIG_NAND_OMAP_ELM
 #define CONFIG_NAND_OMAP_ECCSCHEME	OMAP_ECC_BCH8_CODE_HW
 #define GPMC_NAND_ECC_LP_x16_LAYOUT	1
+#define CONFIG_SYS_NAND_DEVICE_WIDTH	8
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_BLOCK_SIZE	(128*1024)
 #define CONFIG_SYS_NAND_PAGE_SIZE	2048