[PATCH v2] mtd: map: new driver for NXP IFC

Sanjay Tandel sanjay.tandel at rockwellcollins.com
Thu Aug 31 09:24:27 PDT 2017


On Thu, Aug 31, 2017 at 1:32 AM, Boris Brezillon
<boris.brezillon at free-electrons.com> wrote:
> On Wed, 30 Aug 2017 19:03:48 -0500
> Sanjay Tandel <sanjay.tandel at rockwellcollins.com> wrote:
>
>> Hi Boris,
>>
>> On Wed, Aug 30, 2017 at 2:34 PM, Boris Brezillon
>> <boris.brezillon at free-electrons.com> wrote:
>> > Hi,
>> >
>> > On Tue, 29 Aug 2017 14:47:27 -0500
>> > Matt Weber <matthew.weber at rockwellcollins.com> wrote:
>> >
>> >> From: Sanjay Tandel <sanjay.tandel at rockwellcollins.com>
>> >>
>> >> This patch adds map driver for parallel flash chips interfaced over
>> >> a NXP Integrated Flash Controller (IFC). This driver allows either
>> >> 8-bit or 16-bit accesses, depending on bank-width, to parallel flash
>> >> chips(like Everspin MR0A16A), which are physically mapped to CPU's
>> >> memory space. For unaligned accesses, it performs read-modify-write
>> >> operations to keep access size same as bank-width.
>> >>
>> >
>> > Did you consider re-using the physmap driver [1] and adjust it to your
>> > needs like the gemini [2] or versatile [3] drivers do? If you did, what
>> > prevents you from using this approach?
>>
>> That approach would have coupled my driver with physmap driver, which has been
>> modified in newer version of kernel. So patch would not have been backward
>> compatible.
>
> Backward compatible? I guess you meant backport-able, and I don't think
> this is a good argument. We want Fixes to be backportable if they
> impact several releases, not new drivers. If you want to backport your
> driver to previous versions of Linux you can do it but it will never be
> included in the official stable releases.

We would leave the patch this way. It's okay if it is not included in
official release.

>
>>
>> I intended to create independent driver without changing any existing
>> driver code.
>
> Please look at the versatile and gemini driver, there's almost nothing
> to change in the physmap_of_core.c file, and you'll have your own
> source file (+ Kconfig option) where you can tweak the map hooks as you
> wish.

I saw those drivers and they look pretty much simple to hook with physmap
by just calling the probe function from physmap.

Thanks for your inputs!!!

>
> Regards,
>
> Boris

Regards,
Sanjay



More information about the linux-mtd mailing list