[PATCH][MTD] mtdpart.c: allow other drivers to get physical address of partition

Jörn Engel joern at logfs.org
Thu Aug 2 23:01:55 EDT 2007


On Thu, 2 August 2007 18:56:46 -0700, Jared Hulbert wrote:
> 
> > --- point_phys/include/linux/mtd/mtd.h~point_phys       2007-05-16 02:01:55.000000000 +0200
> > +++ point_phys/include/linux/mtd/mtd.h  2007-08-01 13:49:30.000000000 +0200
> > @@ -136,10 +136,14 @@ struct mtd_info {
> >         int (*erase) (struct mtd_info *mtd, struct erase_info *instr);
> >
> >         /* This stuff for eXecute-In-Place */
> > -       int (*point) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf);
> > +       /* phys is optional and may be set to NULL */
> > +       int (*point) (struct mtd_info *mtd, loff_t from, size_t len,
> > +                       size_t *retlen, void __iomem **virt,
> > +                       resource_size_t *phys);
> 
> Okay so I think __iomem is correct but I'm not sure I understand all
> the ramifications downstream from here.

Interestingly __iomem makes less sense for some RAM-based drivers.  So
maybe that part should get removed.  The whole patch was just a quick
hack to get an opinion.

> Why resource_size_t?

Because struct map_info has that type for phys.

Jörn

-- 
Joern's library part 2:
http://www.art.net/~hopkins/Don/unix-haters/tirix/embarrassing-memo.html



More information about the linux-mtd mailing list