spi: Fix flag collision for SST_WP
authorSimon Glass <sjg@chromium.org>
Fri, 12 Dec 2014 14:06:12 +0000 (19:36 +0530)
committerSimon Glass <sjg@chromium.org>
Sat, 13 Dec 2014 22:08:04 +0000 (15:08 -0700)
At present SECT_4K is the same as SST_WP so we cannot tell these apart. Fix
this so that the table in sf_params.c can be used correctly.

Reported-by: Jens Rottmann <Jens.Rottmann@adlinktech.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
drivers/mtd/spi/sf_internal.h

index e159f04000744cf0e0add128725cd23f098b2baa..7218e697a05574b3902a9294444152444d9765dd 100644 (file)
@@ -41,6 +41,7 @@ enum {
        SECT_32K        = 1 << 1,
        E_FSR           = 1 << 2,
        WR_QPP          = 1 << 3,
+       SST_WP          = 1 << 4,
 };
 
 #define SPI_FLASH_3B_ADDR_LEN          3
@@ -104,7 +105,6 @@ enum {
 
 /* SST specific */
 #ifdef CONFIG_SPI_FLASH_SST
-# define SST_WP                0x01    /* Supports AAI word program */
 # define CMD_SST_BP            0x02    /* Byte Program */
 # define CMD_SST_AAI_WP        0xAD    /* Auto Address Incr Word Program */