[U-Boot] [PATCH v2] sf_probe: Add lock ops for SST SPI NOR flash

Jagan Teki jteki at openedev.com
Tue Nov 17 19:48:10 CET 2015


On 17 November 2015 at 23:59, Fabio Estevam <festevam at gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam at freescale.com>
>
> SST SPI NOR flash has the same locking programming bits as ST Micro.
>
> Add support for it.
>
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> ---

Reviewed-by: Jagan Teki <jteki at openedev.com>

> Changes since v1:
> - Also add SST defined in sf_ops (Jagan)
>
>  drivers/mtd/spi/sf_internal.h | 1 +
>  drivers/mtd/spi/sf_ops.c      | 4 ++--
>  drivers/mtd/spi/sf_probe.c    | 3 ++-
>  3 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
> index 8793f18..85c8a89 100644
> --- a/drivers/mtd/spi/sf_internal.h
> +++ b/drivers/mtd/spi/sf_internal.h
> @@ -64,6 +64,7 @@ enum spi_nor_option_flags {
>  #define SPI_FLASH_CFI_MFR_SPANSION     0x01
>  #define SPI_FLASH_CFI_MFR_STMICRO      0x20
>  #define SPI_FLASH_CFI_MFR_MACRONIX     0xc2
> +#define SPI_FLASH_CFI_MFR_SST          0xbf
>  #define SPI_FLASH_CFI_MFR_WINBOND      0xef
>
>  /* Erase commands */
> diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c
> index 6cc2d31..f045471 100644
> --- a/drivers/mtd/spi/sf_ops.c
> +++ b/drivers/mtd/spi/sf_ops.c
> @@ -583,7 +583,7 @@ int sst_write_bp(struct spi_flash *flash, u32 offset, size_t len,
>  }
>  #endif
>
> -#ifdef CONFIG_SPI_FLASH_STMICRO
> +#if defined CONFIG_SPI_FLASH_STMICRO || defined CONFIG_SPI_FLASH_SST

#if defined(CONFIG_SPI_FLASH_STMICRO) || defined(CONFIG_SPI_FLASH_SST)
this look more readable - comments?

thanks!
-- 
Jagan | openedev.


More information about the U-Boot mailing list