On Fri, Aug 20, 2010 at 4:29 AM, Catalin Marinas <[email protected]> wrote: > On Wed, 2010-08-18 at 22:22 +0100, Grant Likely wrote: >> On Wed, Aug 18, 2010 at 12:59 PM, Lorenzo Pieralisi >> <[email protected]> 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 <[email protected]> >> > --- >> > 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.
Nice! It should just drop in then (although there may be some endian issues to tidy up). g. _______________________________________________ devicetree-discuss mailing list [email protected] https://lists.ozlabs.org/listinfo/devicetree-discuss
