[U-Boot] [PATCH v3 6/9] sf: Update Spansion flash params

Bin Meng bmeng.cn at gmail.com
Thu Dec 11 03:53:47 CET 2014


Hi Jagan,

On Thu, Dec 11, 2014 at 4:09 AM, Jagan Teki <jagannadh.teki at gmail.com> wrote:
> Hi Bin,
>
> On 10 December 2014 at 18:21, Bin Meng <bmeng.cn at gmail.com> wrote:
>> Update supported read commands for Spansion flash parts per datasheet.
>> Also update flash sector size to 4KiB as long as flash supports sector
>> erase (20h) command.
>>
>> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
>> ---
>>
>>  drivers/mtd/spi/sf_params.c | 12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/mtd/spi/sf_params.c b/drivers/mtd/spi/sf_params.c
>> index 77aa95b..5a3a434 100644
>> --- a/drivers/mtd/spi/sf_params.c
>> +++ b/drivers/mtd/spi/sf_params.c
>> @@ -52,14 +52,14 @@ const struct spi_flash_params spi_flash_params_table[] = {
>>         {"S25FL016A",      0x010214, 0x0,       64 * 1024,    32, RD_NORM,                        0},
>>         {"S25FL032A",      0x010215, 0x0,       64 * 1024,    64, RD_NORM,                        0},
>>         {"S25FL064A",      0x010216, 0x0,       64 * 1024,   128, RD_NORM,                        0},
>> -       {"S25FL128P_256K", 0x012018, 0x0300,   256 * 1024,    64, RD_FULL,                   WR_QPP},
>> -       {"S25FL128P_64K",  0x012018, 0x0301,    64 * 1024,   256, RD_FULL,                   WR_QPP},
>> -       {"S25FL032P",      0x010215, 0x4d00,    64 * 1024,    64, RD_FULL,                   WR_QPP},
>> -       {"S25FL064P",      0x010216, 0x4d00,    64 * 1024,   128, RD_FULL,                   WR_QPP},
>> +       {"S25FL128P_256K", 0x012018, 0x0300,   256 * 1024,    64, RD_NORM,                        0},
>> +       {"S25FL128P_64K",  0x012018, 0x0301,    64 * 1024,   256, RD_NORM,                        0},
>> +       {"S25FL032P",      0x010215, 0x4d00,     4 * 1024,  1024, RD_FULL,         WR_QPP | SECT_4K},
>> +       {"S25FL064P",      0x010216, 0x4d00,     4 * 1024,  2048, RD_FULL,         WR_QPP | SECT_4K},
>>         {"S25FL128S_256K", 0x012018, 0x4d00,   256 * 1024,    64, RD_FULL,                   WR_QPP},
>> -       {"S25FL128S_64K",  0x012018, 0x4d01,    64 * 1024,   256, RD_FULL,                   WR_QPP},
>> +       {"S25FL128S_64K",  0x012018, 0x4d01,     4 * 1024,  4096, RD_FULL,         WR_QPP | SECT_4K},
>
> This is incorrect - 64 is the sector size and it should be 64 * 1024
> and 4 * 1024 is not working
> on my latest test - please verify the same.

Good catch! I must have been too tired to go through so many flash
datasheets and made a mistake. I will resend v4 to correct
S25FL128S_64K and S25FL256S_64K.

>
>>         {"S25FL256S_256K", 0x010219, 0x4d00,   256 * 1024,   128, RD_FULL,                   WR_QPP},
>> -       {"S25FL256S_64K",  0x010219, 0x4d01,    64 * 1024,   512, RD_FULL,                   WR_QPP},
>> +       {"S25FL256S_64K",  0x010219, 0x4d01,     4 * 1024,  8192, RD_FULL,         WR_QPP | SECT_4K},
>>         {"S25FL512S_256K", 0x010220, 0x4d00,   256 * 1024,   256, RD_FULL,                   WR_QPP},
>>         {"S25FL512S_64K",  0x010220, 0x4d01,    64 * 1024,  1024, RD_FULL,                   WR_QPP},
>>         {"S25FL512S_512K", 0x010220, 0x4f00,   256 * 1024,   256, RD_FULL,                   WR_QPP},
>> --
>> 1.8.2.1
>>
>
> thanks!
> --
> Jagan.

Regards,
Bin


More information about the U-Boot mailing list