[PATCH 43/74] ST SPEAr : EMI (Extrenal Memory Interface) controller driver

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Tue Sep 7 07:38:50 EDT 2010


On 16:21 Tue 07 Sep     , viresh kumar wrote:
> On 9/7/2010 4:10 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> >> diff --git a/arch/arm/mach-spear3xx/clock.c b/arch/arm/mach-spear3xx/clock.c
> >> > index 41a2b5e..4f049fe 100644
> >> > --- a/arch/arm/mach-spear3xx/clock.c
> >> > +++ b/arch/arm/mach-spear3xx/clock.c
> >> > @@ -552,6 +552,15 @@ static struct clk adc_clk = {
> >> >       .recalc = &follow_parent,
> >> >  };
> >> >
> >> > +#if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320)
> > can you create a macro for this?
> > or even better detect it
> > 
> 
> It should be statically allocated, registering this to clkdev framework
> should be dynamic, which is done in my local repository (as mentioned in
> i2c patch).
> 
> Regarding creating macros: As we have three machines in spear3xx (300, 310, 320)
> we need to create 4 macros (300 & 310, 310 &320, 300 & 320, 300&310&320),
> This will make it even more complex to read. So, i would like to keep it as it is.
> 
> >> > +/* emi clock */
> >> > +static struct clk emi_clk = {
> >> > +     .flags = ALWAYS_ENABLED,
> >> > +     .pclk = &ahb_clk,
> >> > +     .recalc = &follow_parent,
> >> > +};
> >> > +#endif
> 
> 
> >> +/* emi nor flash device registeration */
> >> > +static struct physmap_flash_data emi_norflash_data;
> >> > +
> >> > +static struct resource emi_nor_resources[] = {
> >> > +     {
> >> > +             .start  = SPEAR310_EMI_MEM_0_BASE,
> >> > +             .end    = SPEAR310_EMI_MEM_0_BASE + SPEAR310_EMI_MEM_SIZE - 1,
> >> > +             .flags  = IORESOURCE_MEM,
> >> > +     },
> >> > +};
> > it's board specfic not mach
> > 
> > NACK
> 
> No. This is machine specific. Same for all boards.
NACK as you can have a flash at other place and more than one flash
and the size depend on the flash

Best Regards,
J.



More information about the linux-arm-kernel mailing list