public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Sriramakrishnan <srk@ti.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] omap3evm : enable nand support
Date: Mon, 9 Nov 2009 16:52:25 -0800	[thread overview]
Message-ID: <20091110005224.GP23952@atomide.com> (raw)
In-Reply-To: <1256821328-28765-1-git-send-email-srk@ti.com>

Hi,

* Sriramakrishnan <srk@ti.com> [091029 06:02]:
> Enable Nand suport on the OMAP3EVM.
> 
> Signed-off-by: Sriramakrishnan <srk@ti.com>
> ---
> 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

      reply	other threads:[~2009-11-10  0:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-29 13:02 [PATCH] omap3evm : enable nand support Sriramakrishnan
2009-11-10  0:52 ` 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=20091110005224.GP23952@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