[U-Boot] [PATCH v2 2/2] mtd: add altera quadspi driver

Thomas Chou thomas at wytron.com.tw
Fri Nov 6 01:18:15 CET 2015


Hi Jagan,

On 2015年11月05日 22:57, Jagan Teki wrote:
> The altera quad spi core is very special that the hardware handle the
>> spi-nor protocol. The core is designed to replace the CFI flash interface.
>> So there is nothing to do with SPI from the parallel flash interface. It is
>> memory mapped. There is no SPI interface. There is nothing related to SPI
>> programming. So please don't worry about the progress on spi-nor. The core
>> should belong to parallel flash, but not serial flash.
>
> Agreed that this is not doing any generic spi things, but it's a
> spi-nor controller all spi-nor controller should be part of spi-nor
> subsystem Linux agreed and have a framework for that.
>
> drivers/mtd/spi-nor/fsl-quadspi.c
> drivers/mtd/spi-nor/nxp-spifi.c
>
> all these are spi-nor controller which doesn't do any generic spi
> things but should be in spi-nor subsystem. Even Marek send altera_qspi
> as spi-nor controller [1]
>
> Since I'm working on similar spi-nor subsystem what Linux have +
> driver model little worried about this because once we have spi-nor
> again it should be a re-work.
>
> [1] http://lists.infradead.org/pipermail/linux-mtd/2015-April/058650.html

I had been a hardware engineer. I designed chips and boards. I believe 
this should depend on the programming interface. Eg, there are SSDs of 
SATA interfaces which build with NAND or EMMC, and it dose not make 
sense to classify them as NAND or MMC. The altera quadspi core is a 
similar case, because the hardware converts the programming interface. 
There is no way to send spi-nor commands that the spi frame work does. 
It is ridiculous to insist it to use under the spi-nor framework.

The altera quadspi hides details about the underlying spi-nor. We may 
even choose to build interface that convert EMMC to like cfi flash. The 
users can run code directly on the flash or use memory command like 
"cp.b" of u-boot to program the flash. This can be a advantage over the 
"sf" command.

Best regards,
Thomas


More information about the U-Boot mailing list