[U-Boot] [PATCH 1/1] am33xx: add CONFIG_SYS_NAND_DEVICE_WIDTH to determine NAND device bus-width

Woodruff, Richard r-woodruff2 at ti.com
Thu Sep 26 00:08:13 CEST 2013


Short comment.  Apologies for top posting:

The first incarnations of SPL and loader mainly cared about the boot flash device.

OMAPs require a resistor strap to specify the width of the boot device.  The values is latched for SW to read.

As such always a run time check of width was sufficient for boot device.

On dev board we would have many devices and use DIP switch to select which one was in use.  A run time not compile time was way to support this.

If information is dynamically available it is better to use this if focus is boot device management.

Other tricks writing patterns and reading results is also possible but simplicity of compile vs. that is debatable.

Regards,
Richard W.

-----Original Message-----
From: Gupta, Pekon 
Sent: Wednesday, September 25, 2013 12:18 AM
To: scottwood at freescale.com; Rini, Tom
Cc: u-boot at lists.denx.de; Balbi, Felipe; Kipisz, Steven; sbabic at denx.de; notasas at gmail.com; luca.ceresoli at comelit.it; Woodruff, Richard; weber at corscience.de; peter.barada at logicpd.com; frederik at kriewitz.eu; Tom.Rix at windriver.com; Menon, Nishanth; srinath at mistralsolutions.com; Hiremath, Vaibhav; Gupta, Pekon
Subject: [PATCH 1/1] am33xx: add CONFIG_SYS_NAND_DEVICE_WIDTH to determine NAND device bus-width

NAND driver needs to know bus-width of the connected NAND device, in order to perform proper I/O and initialize itself. Currently there is no CONFIG option to provide this information to NAND driver.
- SPL NAND driver does not have framework to parse ONFI parameter page.
- NAND drivers which cannot self initialize !defined(CONFIG_SYS_NAND_SELF_INIT)
  do not have any information about device bus-width during board_nand_init(),
  So, any device-width specific configurations are not possible there.
- There should be some mechanism to pass device bus-width information for
  non-ONFI compliant devices.

@@ -772,10 +768,10 @@ int board_nand_init(struct nand_chip *nand)
 	nand->priv	= &bch_priv;
 	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)



More information about the U-Boot mailing list