[PATCH 08/13] drivers/spi: add driver for the Multichannel SPI controller found in TI SoCs
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Tue Aug 21 08:14:30 EDT 2012
On 09:16 Tue 21 Aug , Jan Luebbe wrote:
> On Mon, Aug 20, 2012 at 04:58:31PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 16:20 Mon 20 Aug , Jan Luebbe wrote:
> > > +int mcspi_devices_init()
> > > +{
> > > + add_generic_device("omap3_spi", 1, NULL, OMAP3_MCSPI1_BASE, SZ_4K,
> > > + IORESOURCE_MEM, NULL);
> > > + add_generic_device("omap3_spi", 2, NULL, OMAP3_MCSPI2_BASE, SZ_4K,
> > > + IORESOURCE_MEM, NULL);
> > > + add_generic_device("omap3_spi", 3, NULL, OMAP3_MCSPI3_BASE, SZ_4K,
> > > + IORESOURCE_MEM, NULL);
> > > + add_generic_device("omap3_spi", 4, NULL, OMAP3_MCSPI4_BASE, SZ_4K,
> > > + IORESOURCE_MEM, NULL);
> > why do you register all of them??
> >
> > you need to register only what the board need
>
> Would you prefer having separeate mcspc1-4_device_init functions? Or simply
> call add_generic_device in the board code?
as on imx an inluine for each
>
> > > +
> > > + return 0;
> > > +}
> > > diff --git a/arch/arm/mach-omap/include/mach/mcspi.h b/arch/arm/mach-omap/include/mach/mcspi.h
> > > new file mode 100644
> > > index 0000000..40ee622
> > > --- /dev/null
> > > +++ b/arch/arm/mach-omap/include/mach/mcspi.h
> > > @@ -0,0 +1,11 @@
> > > +#ifndef __OMAP_MCSPI_H
> > > +#define __OMAP_MCSPI_H
> > > +
> > > +#define OMAP3_MCSPI1_BASE 0x48098000
> > > +#define OMAP3_MCSPI2_BASE 0x4809A000
> > > +#define OMAP3_MCSPI3_BASE 0x480B8000
> > > +#define OMAP3_MCSPI4_BASE 0x480BA000
please use tab for indent
Best Regards,
J.
More information about the barebox
mailing list