Re: [PATCH] am3517evm : add nand support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Sriramakrishnan <srk@xxxxxx> [091029 09:04]:
> Enable Nand support on am3517evm
> 
> Signed-off-by: Sriramakrishnan <srk@xxxxxx>
> ---
> This patch builds on the am3517evm board support patch submitted earlier.
> http://marc.info/?l=linux-omap&m=125673923227266&w=2
> 
>  arch/arm/configs/am3517_evm_defconfig |  103 ++++++++++++++++++++++++++++++++-
>  arch/arm/mach-omap2/board-am3517evm.c |  104 ++++++++++++++++++++++++++++++++-
>  2 files changed, 204 insertions(+), 3 deletions(-)
>  mode change 100644 => 100755 arch/arm/mach-omap2/board-am3517evm.c
> 

<snip>

> +void __init am3517evm_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) {
> +		am3517evm_nand_data.cs   = nandcs;
> +		am3517evm_nand_data.gpmc_cs_baseaddr = (void *)(gpmc_base_add +
> +					GPMC_CS0_BASE + nandcs*GPMC_CS_SIZE);
> +		am3517evm_nand_data.gpmc_baseaddr   = (void *) (gpmc_base_add);
> +
> +		if (platform_device_register(&am3517evm_nand_device) < 0)
> +			printk(KERN_ERR "Unable to register NAND device\n");
> +
> +	}
> +}

Yet more cut and paste hacks for the exact same code. Not merging.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux