Skip to content

mtd: spi-nor: add a new framework for SPI NOR

Huang Shijie linux-arm-kernel linux-mtd linux-spi 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 4 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 4 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] mtd: spi-nor: add a new framework for SPI NOR
Quoted 7 lines · Brian Norris

SPI is not used only for SPI NOR; it is useful for other things, like communicating with off-chip peripherals or microcontrollers, supporting touchscreens, LEDs, media controllers, etc. So with a SPI NOR framework living only in the MTD subsystem, I have to write two drivers: one (under drivers/spi/) to use only-(a) for controlling non-flash SPI devices, and one (under drivers/mtd/) to manage (a)+(b) on SPI NOR flash.

If the NOR is connected to a SPI bus controller which can attaches other SPI devices too, I think you use a pure SPI driver to access it;

If the NOR is connected to a SPI-NOR controller such as your spi-nor controller , you can use a SPI-NOR driver to access it.

Does your NOR flash connect to both the SPI bus controller and SPI-NOR controller at the same time? :) If it does connect to both of the controllers, I do not know how to handle it too.

Quoted 6 lines

If, however, we can define a spi_nor_transfer like Angus suggested, and if we take that a step further and make it a first-class (but optional) citizen of the SPI framework, then we could have drivers that support SPI-only, SPI-NOR-only, or both.

I guess Mark will not agree with this. :)

thanks
Huang Shijie

Quoted 11 lines

Now, I'm not sure how exactly that sort of proposal would work yet, but I wanted to test the waters to see
- if this is a complete distortion of what Angus or David may have

    suggested;

- if Mark thinks this is reasonable, or if he thinks I'm spouting nonsense; and
- if there is some obvious alternate way to support what I describe without moving the SPI-NOR layer into the SPI subsystem.

Brian