RE: [PATCH] Missing implementation of omap3evm_flash_init()

Premi, Sanjeev
2009-06-24T11:45:41Z

> -----Original Message-----
> From: Tony Lindgren [mailto:tony@atomide.com]
> Sent: Monday, June 22, 2009 7:04 PM
> To: Premi, Sanjeev
> Cc: linux-omap@vger.kernel.org
> Subject: Re: [PATCH] Missing implementation of omap3evm_flash_init()
>
> * Premi, Sanjeev <premi@ti.com> [090622 16:16]:
> > > -----Original Message-----
> > > From: Tony Lindgren [mailto:tony@atomide.com]
> > > Sent: Monday, June 22, 2009 2:37 PM
> > > To: Premi, Sanjeev
> > > Cc: linux-omap@vger.kernel.org
> > > Subject: Re: [PATCH] Missing implementation of
> omap3evm_flash_init()
> > >

<snip>--<snip>

Tony,

I had a few follow-up queries below:

> > >
> > > We already have code that initializes the GPMC for
> onenand in kernel.
> > > And I posted a patch to enable onenand for the SDP boards
> > > last week [1].
> >
> > Did not see it; before creating the patch; lookig at this now...
>
> OK, thanks.
>
> > > And this is yet another copy of the same code that was
> duplicated for
> > > multiple boards. So how about making the following changes:
> > >
> > > - Pass the onenand chip select for GPMC in platform data. I
> > > doubt that the
> > > chip select is changing?
> > >
> > > - If you still need to probe for onenand, please create a
> > > generic function
> > > in gpmc-onenand.c to probe for onenand

I always see "onenand_base" being passed as argument. Where is it
initialized?

I did implement this function to probe for nand/onenand - based on
the code that existed in board-omap3evm-flash.c; but ran into
some problems with the setting base address.

Looking at the gpmc-onenand.c do you believe we would need a
gpmc-nand.c on same lines? Or an implementation within the
board-omap3evm.c is okay for now?

Best regards,
Sanjeev

> > >
> >
> > Some EVMs have OneNAND and others have NAND. How/ Where do
> you suggest
> > this check sould go?
>
> If it's based on just checking the GPMC registers, you could
> put it into
> gpmc.c.
>
> Regards,
>
> Tony
>
>
>

<snip>--<snip>--<snip till end>