Skip to contentSkip to conversation

sf: Remove legacy idcode detection code

PATCH Superseded Jagan Teki 1 participant 3 messages Aug 9, 2016 Memory technology devices (MTD)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH v2 20/22 sf: Remove legacy idcode detection code

Since flash detection code is more mature to
detect even with 6 bytes id length devices
removed old code and related references.

Cc Yunhui Cui <[email protected]>
Cc Simon Glass <[email protected]>
Cc Bin Meng <[email protected]>
Cc York Sun <[email protected]>
Cc Vignesh R <[email protected]>
Cc Mugunthan V N <[email protected]>
Cc Michal Simek <[email protected]>
Cc Michael Trimarchi <[email protected]>
Cc Siva Durga Prasad Paladugu <[email protected]>
---
 drivers/mtd/spi/sf_internal.h |  6 ----
 drivers/mtd/spi/spi_flash.c   | 78 -------------------------------------------
 2 files changed, 84 deletions(-)
drivers/mtd/spi/sf_internal.h +0 -6
index 6be2121..1161652 100644
@@ -99,12 +99,6 @@ int sst_write_bp(struct spi_flash *flash, u32 offset, size_t len,
 		const void *buf);
 #endif
 
-#ifdef CONFIG_SPI_FLASH_SPANSION
-/* Used for Spansion S25FS-S family flash only. */
-#define CMD_SPANSION_RDAR	0x65 /* Read any device register */
-#define CMD_SPANSION_WRAR	0x71 /* Write any device register */
-#endif
-
 #define JEDEC_MFR(info)		((info)->id[0])
 #define JEDEC_ID(info)		(((info)->id[1]) << 8 | ((info)->id[2]))
 #define JEDEC_EXT(info) 	(((info)->id[3]) << 8 | ((info)->id[4]))
drivers/mtd/spi/spi_flash.c +0 -78

94 lines not on this page · raw message

Signature · 1 line
2.7.4
author
#1 lore raw

PATCH v2 21/22 sf: Remove non-meaningful comments

Cc Simon Glass <[email protected]>
Cc Bin Meng <[email protected]>
Cc York Sun <[email protected]>
Cc Vignesh R <[email protected]>
Cc Mugunthan V N <[email protected]>
Cc Michal Simek <[email protected]>
Cc Siva Durga Prasad Paladugu <[email protected]>
---
 drivers/mtd/spi/spi_flash.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/mtd/spi/spi_flash.c +0 -3
index 55c357e..b04fe3f 100644
@@ -1015,16 +1015,13 @@ int spi_flash_scan(struct spi_flash *flash)
 	    JEDEC_MFR(info) == SPI_FLASH_CFI_MFR_SST)
 		write_sr(flash, 0);
 
-	/* Assign spi data */
 	flash->name = info->name;
 	flash->memory_map = spi->memory_map;
 	flash->dual_flash = spi->option;
 
-	/* Assign spi flash flags */
 	if (info->flags & SST_WR)
 		flash->flags |= SNOR_F_SST_WR;
 
-	/* Assign spi_flash ops */
 #ifndef CONFIG_DM_SPI_FLASH
 	flash->write = spi_flash_cmd_write_ops;
 #if defined(CONFIG_SPI_FLASH_SST)
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH v2 22/22 sf: Rename sf_params.c to spi_flash_ids

In reply to Jagan Teki

spi_flash_ids.c is more meaningful name as the flash_info table structure spi_flash_info has spi_flash_ids instance.

Cc Simon Glass <[email protected]>
Cc Bin Meng <[email protected]>
Cc York Sun <[email protected]>
Cc Vignesh R <[email protected]>
Cc Mugunthan V N <[email protected]>
Cc Michal Simek <[email protected]>
Cc Siva Durga Prasad Paladugu <[email protected]>
---
 drivers/mtd/spi/Makefile        |   2 +-
 drivers/mtd/spi/spi_flash_ids.c | 176 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 177 insertions(+), 1 deletion(-)
 create mode 100644 drivers/mtd/spi/spi_flash_ids.c
drivers/mtd/spi/Makefile +1 -1
index 6f47a66..6379b4b 100644
@@ -13,7 +13,7 @@ obj-$(CONFIG_SPL_SPI_BOOT)	+= fsl_espi_spl.o
 obj-$(CONFIG_SPL_SPI_SUNXI)	+= sunxi_spi_spl.o
 endif
 
-obj-$(CONFIG_SPI_FLASH) += sf_probe.o spi_flash.o sf_params.o sf.o
+obj-$(CONFIG_SPI_FLASH) += sf_probe.o spi_flash.o spi_flash_ids.o sf.o
 obj-$(CONFIG_SPI_FLASH_DATAFLASH) += sf_dataflash.o
 obj-$(CONFIG_SPI_FLASH_MTD) += sf_mtd.o
 obj-$(CONFIG_SPI_FLASH_SANDBOX) += sandbox.o
drivers/mtd/spi/spi_flash_ids.c new file +176 -0

176 lines not on this page · raw message

Signature · 1 line
2.7.4