[U-Boot] [PATCH v3 07/28] sf: probe: Add support for W25* flash parts
Jagan Teki
jagannadh.teki at gmail.com
Tue Sep 24 08:53:06 CEST 2013
Hi Sascha,
Thanks for your inputs.
I think you commented w.r.t old driver configurations.
Yes, I will do these changes on next versions.
On Sun, Sep 22, 2013 at 12:24 AM, Sascha Silbe <t-uboot at infra-silbe.de> wrote:
> Jagannadha Sutradharudu Teki <jagannadha.sutradharudu-teki at xilinx.com>
> writes:
>
>> Added W25* parts are which are avilable in spi_flash_probe_legacy.c.
>>
>> Updated the sector_size attributes as per the flash parts.
>> Looks fine for with this sector_size for computing the size
>> of flash.
>
>
> This breaks sector-sized (i.e. 4KiB) erases on W25Q32BV (and many other
> Winbond chips). The sizes are set differently by the old code and yours:
>
> old yours
> page_size 256 256
> sector_size 4K 64K
> size 4M 4M
>
>
> The data sheet defines three different granularities: pages (256B, used
> for writing), sectors (4KiB, used for erasing), blocks (64KiB, used for
> write protection in some configurations). You seem to have mixed sectors
> and blocks. The total size is the same, but sector-sized erases stop
> working.
>
> With the following change, my (rather simple) test cases work again:
>
>
> diff --git i/drivers/mtd/spi/spi_flash_probe.c w/drivers/mtd/spi/spi_flash_probe.c
> index 1ff3b60..6f13484 100644
> --- i/drivers/mtd/spi/spi_flash_probe.c
> +++ w/drivers/mtd/spi/spi_flash_probe.c
> @@ -85,7 +85,7 @@ static const struct spi_flash_params spi_flash_params_table[] = {
> {"W25X64", 0xef3017, 0x0, 64 * 1024, 128},
> {"W25Q80BL", 0xef4014, 0x0, 64 * 1024, 16},
> {"W25Q16CL", 0xef4015, 0x0, 64 * 1024, 32},
> - {"W25Q32BV", 0xef4016, 0x0, 64 * 1024, 64},
> + {"W25Q32BV", 0xef4016, 0x0, 4 * 1024, 1024},
> {"W25Q64CV", 0xef4017, 0x0, 64 * 1024, 128},
> {"W25Q128BV", 0xef4018, 0x0, 64 * 1024, 256},
> {"W25Q256", 0xef4019, 0x0, 64 * 1024, 512},
>
>
> The other chips will need similar changes.
>
> Sascha
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
--
Thanks,
Jagan.
--------
Jagannadha Sutradharudu Teki,
E: jagannadh.teki at gmail.com, P: +91-9676773388
Engineer - System Software Hacker
U-boot - SPI Custodian and Zynq APSOC
Ln: http://www.linkedin.com/in/jaganteki
More information about the U-Boot
mailing list