spi_nor: add m25p32 spi nor driver
PATCH 1/4 spi_nor: add m25p32 spi nor driver
This driver is ported from kernel and can handle a series of spi nor flash including m25pxx, m45pxx, w25xxx, cat25xxx, sst25vf0xxx, sst25wfxxx, s25xxx, mx25xxx, at25xxx, at26xxx, en25xxx, xxxs33b.
--- drivers/mtd/spi/Makefile | 1 + drivers/mtd/spi/m25p80.c | 896 ++++++++++++++++++++++++++++++++++ drivers/mtd/spi/spi_flash.c | 10 + drivers/mtd/spi/spi_flash_internal.h | 1 + 4 files changed, 908 insertions(+), 0 deletions(-) create mode 100644 drivers/mtd/spi/m25p80.c
drivers/mtd/spi/Makefile +1 -0
@@ -28,6 +28,7 @@ LIB := $(obj)libspi_flash.o COBJS-$(CONFIG_SPI_FLASH) += spi_flash.o COBJS-$(CONFIG_SPI_FLASH_ATMEL) += atmel.o COBJS-$(CONFIG_SPI_FLASH_EON) += eon.o +COBJS-$(CONFIG_SPI_FLASH_M25P80) += m25p80.o COBJS-$(CONFIG_SPI_FLASH_MACRONIX) += macronix.o COBJS-$(CONFIG_SPI_FLASH_SPANSION) += spansion.o COBJS-$(CONFIG_SPI_FLASH_SST) += sst.o
drivers/mtd/spi/m25p80.c new file +896 -0
896 lines not on this page · raw message
drivers/mtd/spi/spi_flash.c +10 -0
@@ -277,6 +277,16 @@ static const struct { #ifdef CONFIG_SPI_FLASH_EON { 0, 0x1c, spi_flash_probe_eon, }, #endif +#ifdef CONFIG_SPI_FLASH_M25P80 + { 0, 0x01, spi_flash_probe_m25p, }, + { 0, 0x1c, spi_flash_probe_m25p, }, + { 0, 0x1f, spi_flash_probe_m25p, }, + { 0, 0x20, spi_flash_probe_m25p, }, + { 0, 0x89, spi_flash_probe_m25p, }, + { 0, 0xbf, spi_flash_probe_m25p, }, + { 0, 0xc2, spi_flash_probe_m25p, }, + { 0, 0xef, spi_flash_probe_m25p, }, +#endif #ifdef CONFIG_SPI_FLASH_MACRONIX { 0, 0xc2, spi_flash_probe_macronix, }, #endif
drivers/mtd/spi/spi_flash_internal.h +1 -0
@@ -95,6 +95,7 @@ int spi_flash_cmd_erase(struct spi_flash *flash, u8 erase_cmd,struct spi_flash *spi_flash_probe_spansion (struct spi_slave *spi,u8 *idcode);struct spi_flash *spi_flash_probe_atmel (struct spi_slave *spi,u8 *idcode);struct spi_flash *spi_flash_probe_eon (struct spi_slave *spi,u8 *idcode); +struct spi_flash *spi_flash_probe_m25p (struct spi_slave *spi,u8 *idcode);struct spi_flash *spi_flash_probe_macronix (struct spi_slave *spi,u8 *idcode);struct spi_flash *spi_flash_probe_sst (struct spi_slave *spi,u8 *idcode);struct spi_flash *spi_flash_probe_stmicro (struct spi_slave *spi,u8 *idcode);
Signature · 1 line
1.7.0.4
PATCH 1/4 spi_nor: add m25p32 spi nor driver
Quoted 3 lines · On Tuesday 14 August 2012 06:58:31 Terry Lv wrote:
This driver is ported from kernel and can handle a series of spi nor flash including m25pxx, m45pxx, w25xxx, cat25xxx, sst25vf0xxx, sst25wfxxx, s25xxx, mx25xxx, at25xxx, at26xxx, en25xxx, xxxs33b.
it doesn't make much sense to add a driver which duplicates all the existing ones. long term, we should look at migrating to the linux driver i think (if we can make it work), but i don't think this port is exactly the way.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120814/665c35eb/attachment.pgp>
PATCH 1/4 spi_nor: add m25p32 spi nor driver
Sorry for that I don't know m25p32 spi nor supported in stmicro. I've thought that this might be a new driver for new chips.
That's ok. Then I'll summit mx53smd spi nor patches with stmicro.
-----Original Message-----
From: [email protected] [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Mike Frysinger
Sent: 2012?8?14? 23:53
To: u-boot at lists.denx.de; r65388 at shlinux3.net
Subject: Re: [U-Boot] [PATCH 1/4] spi_nor: add m25p32 spi nor driver
Quoted 3 lines · On Tuesday 14 August 2012 06:58:31 Terry Lv wrote:
This driver is ported from kernel and can handle a series of spi nor flash including m25pxx, m45pxx, w25xxx, cat25xxx, sst25vf0xxx, sst25wfxxx, s25xxx, mx25xxx, at25xxx, at26xxx, en25xxx, xxxs33b.
it doesn't make much sense to add a driver which duplicates all the existing ones. long term, we should look at migrating to the linux driver i think (if we can make it work), but i don't think this port is exactly the way. -mike