[RFC PATCH 09/14] ARM: ARM flash driver DT port

Catalin Marinas catalin.marinas at arm.com
Fri Aug 20 20:29:49 EST 2010


On Wed, 2010-08-18 at 22:22 +0100, Grant Likely wrote:
> On Wed, Aug 18, 2010 at 12:59 PM, Lorenzo Pieralisi
> <lorenzo.pieralisi at arm.com> wrote:
> > When OF is enabled drivers should initialize the driver match table
> > to allow the kernel to find and recognise drivers suitable for
> > devices. The initialization is carried out through a static inline
> > function at driver init time.
> >
> > This patch adds a match table and relative init code to support
> > device tree probing methodology for the ARM flash driver.
> >
> > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi at arm.com>
> > ---
> >  drivers/mtd/maps/integrator-flash.c |    6 ++++++
> >  1 files changed, 6 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/mtd/maps/integrator-flash.c b/drivers/mtd/maps/integrator-flash.c
> > index 2aac41b..aa9a556 100644
> > --- a/drivers/mtd/maps/integrator-flash.c
> > +++ b/drivers/mtd/maps/integrator-flash.c
> > @@ -291,6 +291,11 @@ static int armflash_remove(struct platform_device *dev)
> >        return 0;
> >  }
> >
> > +static struct of_device_id armflash_matches[] = {
> > +       { .compatible = "arm,arm-flash"},
> 
> (Assuming I'm reading the integrator-flash driver correctly...) When
> using the device tree, the entire flash map should be encoded in the
> tree, and this mapping driver is no longer needed.  See
> mtd/maps/physmap_of.c.

BTW, I managed to get the RealView boards working with physmap.c instead
of the integrator flash (same functionality, just different drivers). We
could do the same for Versatile Express and get rid of the integrator
flash entirely.

-- 
Catalin



More information about the devicetree-discuss mailing list