[U-Boot] [PATCH v3 03/17] sf: Add extended addr write support for winbond|stmicro
Simon Glass
sjg at chromium.org
Thu Jun 13 00:19:40 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 program 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>
Looks good, 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 193de42..05d1792 100644
> --- a/drivers/mtd/spi/spi_flash.c
> +++ b/drivers/mtd/spi/spi_flash.c
> @@ -286,6 +286,8 @@ int spi_flash_cmd_bankaddr_write(struct spi_flash
> *flash, u8 bank_sel)
> idcode0 = flash->idcode0;
> if (idcode0 == 0x01) {
> cmd = CMD_BANKADDR_BRWR;
> + } else if ((idcode0 == 0xef) || (idcode0 == 0x20)) {
> + cmd = CMD_EXTNADDR_WREAR;
> } else {
> printf("SF: Unsupported bank addr write %02x\n", idcode0);
> return -1;
> diff --git a/drivers/mtd/spi/spi_flash_internal.h
> b/drivers/mtd/spi/spi_flash_internal.h
> index 2567bbc..de1a0df 100644
> --- a/drivers/mtd/spi/spi_flash_internal.h
> +++ b/drivers/mtd/spi/spi_flash_internal.h
> @@ -31,6 +31,7 @@
> /* Bank addr acess commands */
> #define CMD_BANKADDR_BRWR 0x17
> #define CMD_BANKADDR_BRRD 0x16
> +#define CMD_EXTNADDR_WREAR 0xC5
>
> /* Common status */
> #define STATUS_WIP 0x01
> --
> 1.8.3
>
>
>
More information about the U-Boot
mailing list