
Hi,
Please see last set of queries inline..
From: Scott Wood [mailto:scottwood@freescale.com]
On Sat, 2013-09-28 at 06:24 +0000, Gupta, Pekon wrote:
From: Scott Wood [mailto:scottwood@freescale.com]
On Fri, 2013-09-27 at 04:18 +0000, Gupta, Pekon wrote:
[snip]
(1) drivers/mtd/nand/fsl_ifc_spl.c (2) drivers/mtd/nand/fsl_elbc_spl.c So CONFIG_SYS_NAND_DEVICE_WIDTH should help them also. right ?
How would it help?
I meant, instead of requiring the modification in board file, CONFIG_SPL_DEVICE_WIDTH can be put in include/configs/*.h
So can this new CONFIG_xx be accepted ?
Only for SPL usage.
Ok. so should I rename to CONFIG_SPL_NAND_DEVICE_WIDTH ?
I have recently sent another version of this patch (as PATCH 2/4) of series below. This series also adds checks for reading ONFI params. Request you to review that also, so that I can include all feedbacks in next patch version. http://lists.denx.de/pipermail/u-boot/2013-September/163878.html
It looked like you were removing the code that does dynamic detection, which
would
also affect non-SPL.
- /* If we are 16 bit dev, our gpmc config tells us that */
- if ((readl(&gpmc_cfg->cs[cs].config1) & 0x3000) == 0x1000)
omap_gpmc.c never had dynamic detection support. Above
gpmc_config
bit
which is used to tell whether device is x16 or x8, gets actually hard-
coded in
gpmc_init(). Thus it was actually a mechanism to pass hard-coded bus-
width
information to nand driver. Refer: arch/arm/cpu/armv7/am33xx/mem.c : gpmc_init()
So, instead of hacking the gpmc_init() everytime for different devices, this patch introduces a generic CONFIG which can be used everywhere.
Re-added dynamic detection for u-boot (second stage) in above series. CONFIG_SPL_NAND_DEVICE_WIDTH would be used only for SPL boot. http://lists.denx.de/pipermail/u-boot/2013-September/163879.html
It looks like you do more NAND config in gpmc_init() than just setting this one bit, so I don't think you save anything here.
BTW, do you not need to set this bit in the config register for the hardware to work in the SPL case?
Yes, I'm not changing the default configs for GPMC in gpmc_init(), because they are ok for x8 device. I'm just overriding them again during board_nand_init() if CONFIG_SYS_NAND_DEVICE_WIDTH == x16 device.
Is this due to wanting to do identification as x8?
Yes, reading of on-chip ONFI params should happen only in x8 mode. [PATCH 1/4] of above series should explain this. http://lists.denx.de/pipermail/u-boot/2013-September/163882.html
(dropping few emails from CC list as they are bouncing, and u-boot mailman rejects email saying too many recipients).
with regards, pekon