summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/spansion.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/spi/spansion.c')
-rw-r--r--drivers/mtd/spi/spansion.c44
1 files changed, 12 insertions, 32 deletions
diff --git a/drivers/mtd/spi/spansion.c b/drivers/mtd/spi/spansion.c
index 6301d87..457cc06 100644
--- a/drivers/mtd/spi/spansion.c
+++ b/drivers/mtd/spi/spansion.c
@@ -32,28 +32,8 @@
#include "spi_flash_internal.h"
/* S25FLxx-specific commands */
-#define CMD_S25FLXX_READ 0x03 /* Read Data Bytes */
-#define CMD_S25FLXX_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */
-#define CMD_S25FLXX_READID 0x90 /* Read Manufacture ID and Device ID */
-#define CMD_S25FLXX_WREN 0x06 /* Write Enable */
-#define CMD_S25FLXX_WRDI 0x04 /* Write Disable */
-#define CMD_S25FLXX_RDSR 0x05 /* Read Status Register */
-#define CMD_S25FLXX_WRSR 0x01 /* Write Status Register */
-#define CMD_S25FLXX_PP 0x02 /* Page Program */
#define CMD_S25FLXX_SE 0xd8 /* Sector Erase */
#define CMD_S25FLXX_BE 0xc7 /* Bulk Erase */
-#define CMD_S25FLXX_DP 0xb9 /* Deep Power-down */
-#define CMD_S25FLXX_RES 0xab /* Release from DP, and Read Signature */
-
-#define SPSN_ID_S25FL008A 0x0213
-#define SPSN_ID_S25FL016A 0x0214
-#define SPSN_ID_S25FL032A 0x0215
-#define SPSN_ID_S25FL064A 0x0216
-#define SPSN_ID_S25FL128P 0x2018
-#define SPSN_EXT_ID_S25FL128P_256KB 0x0300
-#define SPSN_EXT_ID_S25FL128P_64KB 0x0301
-#define SPSN_EXT_ID_S25FL032P 0x4d00
-#define SPSN_EXT_ID_S25FL129P 0x4d01
struct spansion_spi_flash_params {
u16 idcode1;
@@ -66,7 +46,7 @@ struct spansion_spi_flash_params {
static const struct spansion_spi_flash_params spansion_spi_flash_table[] = {
{
- .idcode1 = SPSN_ID_S25FL008A,
+ .idcode1 = 0x0213,
.idcode2 = 0,
.page_size = 256,
.pages_per_sector = 256,
@@ -74,7 +54,7 @@ static const struct spansion_spi_flash_params spansion_spi_flash_table[] = {
.name = "S25FL008A",
},
{
- .idcode1 = SPSN_ID_S25FL016A,
+ .idcode1 = 0x0214,
.idcode2 = 0,
.page_size = 256,
.pages_per_sector = 256,
@@ -82,7 +62,7 @@ static const struct spansion_spi_flash_params spansion_spi_flash_table[] = {
.name = "S25FL016A",
},
{
- .idcode1 = SPSN_ID_S25FL032A,
+ .idcode1 = 0x0215,
.idcode2 = 0,
.page_size = 256,
.pages_per_sector = 256,
@@ -90,7 +70,7 @@ static const struct spansion_spi_flash_params spansion_spi_flash_table[] = {
.name = "S25FL032A",
},
{
- .idcode1 = SPSN_ID_S25FL064A,
+ .idcode1 = 0x0216,
.idcode2 = 0,
.page_size = 256,
.pages_per_sector = 256,
@@ -98,32 +78,32 @@ static const struct spansion_spi_flash_params spansion_spi_flash_table[] = {
.name = "S25FL064A",
},
{
- .idcode1 = SPSN_ID_S25FL128P,
- .idcode2 = SPSN_EXT_ID_S25FL128P_64KB,
+ .idcode1 = 0x2018,
+ .idcode2 = 0x0301,
.page_size = 256,
.pages_per_sector = 256,
.nr_sectors = 256,
.name = "S25FL128P_64K",
},
{
- .idcode1 = SPSN_ID_S25FL128P,
- .idcode2 = SPSN_EXT_ID_S25FL128P_256KB,
+ .idcode1 = 0x2018,
+ .idcode2 = 0x0300,
.page_size = 256,
.pages_per_sector = 1024,
.nr_sectors = 64,
.name = "S25FL128P_256K",
},
{
- .idcode1 = SPSN_ID_S25FL032A,
- .idcode2 = SPSN_EXT_ID_S25FL032P,
+ .idcode1 = 0x0215,
+ .idcode2 = 0x4d00,
.page_size = 256,
.pages_per_sector = 256,
.nr_sectors = 64,
.name = "S25FL032P",
},
{
- .idcode1 = SPSN_ID_S25FL128P,
- .idcode2 = SPSN_EXT_ID_S25FL129P,
+ .idcode1 = 0x2018,
+ .idcode2 = 0x4d01,
.page_size = 256,
.pages_per_sector = 256,
.nr_sectors = 256,