Hi,
* Sriramakrishnan <[email protected]> [091029 06:02]:
> Enable Nand suport on the OMAP3EVM.
>
> Signed-off-by: Sriramakrishnan <[email protected]>
> ---
> This patch has been generated against the tip of for-next branch.
>
> arch/arm/configs/omap3_evm_defconfig | 2 +
> arch/arm/mach-omap2/board-omap3evm.c | 102
> ++++++++++++++++++++++++++++++++++
> 2 files changed, 104 insertions(+), 0 deletions(-)
>
<snip>
> +void __init omap3evm_flash_init(void)
> +{
> + u8 cs = 0;
> + u8 nandcs = GPMC_CS_NUM + 1;
> + u32 gpmc_base_add = OMAP34XX_GPMC_VIRT;
> +
> + while (cs < GPMC_CS_NUM) {
> + u32 ret = 0;
> + ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
> +
> + if ((ret & 0xC00) == 0x800) {
> + /* Found it!! */
> + if (nandcs > GPMC_CS_NUM)
> + nandcs = cs;
> + }
> + cs++;
> + }
> + if (nandcs > GPMC_CS_NUM) {
> + printk(KERN_INFO "NAND: Unable to find configuration "
> + " in GPMC\n ");
> + return;
> + }
> +
> + if (nandcs < GPMC_CS_NUM) {
> + omap3evm_nand_data.cs = nandcs;
> + omap3evm_nand_data.gpmc_cs_baseaddr = (void *)(gpmc_base_add +
> + GPMC_CS0_BASE + nandcs*GPMC_CS_SIZE);
> + omap3evm_nand_data.gpmc_baseaddr = (void *) (gpmc_base_add);
> +
> + if (platform_device_register(&omap3evm_nand_device) < 0) {
> + printk(KERN_ERR "Unable to register NAND device\n");
> + }
> + }
> +}
> +
To me it looks like this should work with the sdp-flash.c once the
flash detection code is done in a clean way.
Not adding yet more cut and paste hacks, please coordinate within
TI on adding the flash detection in a sane way.
Regards,
Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html