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: scottw...@freescale.com; Rini, Tom
Cc: u-boot@lists.denx.de; Balbi, Felipe; Kipisz, Steven; sba...@denx.de; 
nota...@gmail.com; luca.ceres...@comelit.it; Woodruff, Richard; 
we...@corscience.de; peter.bar...@logicpd.com; frede...@kriewitz.eu; 
tom....@windriver.com; Menon, Nishanth; srin...@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)

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to