[U-Boot] [PATCH v3 04/17] sf: Add extended addr read support for winbond|stmicro
Simon Glass
sjg at chromium.org
Thu Jun 13 00:19:57 CEST 2013
On Tue, Jun 11, 2013 at 12:23 PM, Jagannadha Sutradharudu Teki <
jagannadha.sutradharudu-teki at xilinx.com> wrote:
> This patch provides support to read a flash extended address
> register for winbond and stmicro SPI flashes.
>
> Signed-off-by: Jagannadha Sutradharudu Teki <jaganna at xilinx.com>
>
Reviewed-by: Simon Glass <sjg at chromium.org>
Same comment as previous patch.
> ---
> Changes for v3:
> - none
> Changes for v2:
> - none
>
> drivers/mtd/spi/spi_flash.c | 2 ++
> drivers/mtd/spi/spi_flash_internal.h | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
> index 05d1792..66b6b14 100644
> --- a/drivers/mtd/spi/spi_flash.c
> +++ b/drivers/mtd/spi/spi_flash.c
> @@ -321,6 +321,8 @@ int spi_flash_cmd_bankaddr_read(struct spi_flash
> *flash, void *data)
>
> if (idcode0 == 0x01) {
> cmd = CMD_BANKADDR_BRRD;
> + } else if ((idcode0 == 0xef) || (idcode0 == 0x20)) {
> + cmd = CMD_EXTNADDR_RDEAR;
> } else {
> printf("SF: Unsupported bank addr read %02x\n", idcode0);
> return -1;
> diff --git a/drivers/mtd/spi/spi_flash_internal.h
> b/drivers/mtd/spi/spi_flash_internal.h
> index de1a0df..1b29e2d 100644
> --- a/drivers/mtd/spi/spi_flash_internal.h
> +++ b/drivers/mtd/spi/spi_flash_internal.h
> @@ -32,6 +32,7 @@
> #define CMD_BANKADDR_BRWR 0x17
> #define CMD_BANKADDR_BRRD 0x16
> #define CMD_EXTNADDR_WREAR 0xC5
> +#define CMD_EXTNADDR_RDEAR 0xC8
>
> /* Common status */
> #define STATUS_WIP 0x01
> --
> 1.8.3
>
>
>
More information about the U-Boot
mailing list