From: Tony Lindgren <tony@atomide.com>
To: Sriramakrishnan <srk@ti.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] am3517evm : add nand support
Date: Mon, 9 Nov 2009 16:53:19 -0800 [thread overview]
Message-ID: <20091110005318.GQ23952@atomide.com> (raw)
In-Reply-To: <1256832298-14266-1-git-send-email-srk@ti.com>
* Sriramakrishnan <srk@ti.com> [091029 09:04]:
> Enable Nand support on am3517evm
>
> Signed-off-by: Sriramakrishnan <srk@ti.com>
> ---
> 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
prev parent reply other threads:[~2009-11-10 0:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-29 16:04 [PATCH] am3517evm : add nand support Sriramakrishnan
2009-11-10 0:53 ` Tony Lindgren [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091110005318.GQ23952@atomide.com \
--to=tony@atomide.com \
--cc=linux-omap@vger.kernel.org \
--cc=srk@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox