sf: Remove SECT_32K
authorJagan Teki <jteki@openedev.com>
Mon, 8 Aug 2016 11:49:08 +0000 (17:19 +0530)
committerJagan Teki <jagannadh.teki@gmail.com>
Wed, 21 Sep 2016 19:32:28 +0000 (01:02 +0530)
SECT_32K never used anywhere in the code.

Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Cc: Vignesh R <vigneshr@ti.com>
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
drivers/mtd/spi/sandbox.c
drivers/mtd/spi/sf_internal.h
drivers/mtd/spi/spi_flash.c

index 53470b90ce87a96d6a7feabc9d92318da2a6c271..f59134ff9260dbd38b4dcec07bc29b74e7b09ca7 100644 (file)
@@ -292,10 +292,7 @@ static int sandbox_sf_process_cmd(struct sandbox_spi_flash *sbsf, const u8 *rx,
                                sbsf->data->nr_sectors;
                } else if (sbsf->cmd == CMD_ERASE_4K && (flags & SECT_4K)) {
                        sbsf->erase_size = 4 << 10;
-               } else if (sbsf->cmd == CMD_ERASE_32K && (flags & SECT_32K)) {
-                       sbsf->erase_size = 32 << 10;
-               } else if (sbsf->cmd == CMD_ERASE_64K &&
-                          !(flags & (SECT_4K | SECT_32K))) {
+               } else if (sbsf->cmd == CMD_ERASE_64K && !(flags & SECT_4K)) {
                        sbsf->erase_size = 64 << 10;
                } else {
                        debug(" cmd unknown: %#x\n", sbsf->cmd);
index 71ba1a6a5b60e992d826f1d28ea97a857d8e20b6..9eb0b8465190d6ae04786d2d6ec5dcfa32b03753 100644 (file)
@@ -27,14 +27,13 @@ enum {
 #else
        SECT_4K         = BIT(0),
 #endif
-       SECT_32K        = BIT(1),
-       E_FSR           = BIT(2),
-       SST_WR          = BIT(3),
-       WR_QPP          = BIT(4),
-       RD_QUAD         = BIT(5),
-       RD_DUAL         = BIT(6),
-       RD_QUADIO       = BIT(7),
-       RD_DUALIO       = BIT(8),
+       E_FSR           = BIT(1),
+       SST_WR          = BIT(2),
+       WR_QPP          = BIT(3),
+       RD_QUAD         = BIT(4),
+       RD_DUAL         = BIT(5),
+       RD_QUADIO       = BIT(6),
+       RD_DUALIO       = BIT(7),
 };
 #define RD_FULL                RD_QUAD | RD_DUAL | RD_QUADIO | RD_DUALIO
 
@@ -57,7 +56,6 @@ enum spi_nor_option_flags {
 
 /* Erase commands */
 #define CMD_ERASE_4K                   0x20
-#define CMD_ERASE_32K                  0x52
 #define CMD_ERASE_CHIP                 0xc7
 #define CMD_ERASE_64K                  0xd8
 
index 041b64f8b31de036b125a6d71ae3739efd3769bc..2b2a40949cf9689c7eae6d3fe66f1f0a998f894a 100644 (file)
@@ -1159,9 +1159,6 @@ int spi_flash_scan(struct spi_flash *flash)
        if (params->flags & SECT_4K) {
                flash->erase_cmd = CMD_ERASE_4K;
                flash->erase_size = 4096 << flash->shift;
-       } else if (params->flags & SECT_32K) {
-               flash->erase_cmd = CMD_ERASE_32K;
-               flash->erase_size = 32768 << flash->shift;
        } else {
                flash->erase_cmd = CMD_ERASE_64K;
                flash->erase_size = flash->sector_size;