[PATCHv2 07/10] drivers: mtd: m25p80: Adapt driver to support memory mapped read.

Huang Shijie shijie8 at gmail.com
Thu Dec 12 03:31:46 EST 2013


On Thu, Dec 12, 2013 at 01:45:24PM +0530, Sourav Poddar wrote:
> On Thursday 12 December 2013 01:25 PM, Huang Shijie wrote:
> >>
> >>+	if (spi->master->configure_from_slave)
> >>+		m25p80_fill_flash_information(flash);
> >>+
> >You have add a configure_from_slave hook in the SPI, why you also need
> >a same hook in the SPI-NOR framework?
> >
> We need a way to provoke this, currently it is placed in m25p80. If m25p80
> is removed, for where should I handle these in nor framework?

The m25p80 is not removed. it is easy to move your code in the
m25p_read.

Please read the patch 4.

> >And i think the enable_mmap/disable_mmap is not needed too.
> >
> >All the three hooks are used to set the SPI bus controller.
> 
> >And the SPI-NOR framework only handles the issues between the
> >SPI bus controller and the SPI-NOR, or the SPI-NOR controller and the
> >SPI-NOR.
> My controller can be used as spi flash controller as well as a spi
> controller.
> 
If you really think we need to do something before the do the real work.
we can add two hooks : prepare/unprepare.

   for you, you can put the the enable_mmap/disable_mmap in the
   prepare/unprepare separately.

   for other driver, we can put the enable/disable clocks in the
   prepare/unprepare hooks.

thanks
Huang Shijie 
   





More information about the linux-mtd mailing list