Message ID | 1477849590-11954-11-git-send-email-jagan@openedev.com |
---|---|
State | Superseded |
Delegated to: | Jagannadha Sutradharudu Teki |
Headers | show |
On 30 October 2016 at 11:46, Jagan Teki <jagan@openedev.com> wrote: > Add Spansion S25FS256S_64K spi flash to the list of spi_flash_ids. > > In spansion S25FS-S family the physical sectors are grouped as > normal and parameter sectors. Parameter sectors are 4kB in size > with 8 set located at the bottom or top address of a device. > Normal sectors are similar to other flash family with sizes of > 64kB or 32 kB. > > To erase whole flash using sector erase(D8h or DCh) won't effect > the parameter sectors, so in order to erase these we must use 4K > sector erase commands (20h or 21h) separately. > > So better to erase the whole flash using 4K sector erase instead > of detecting these family parts again and do two different erase > operations. > > Cc: Yunhui Cui <yunhui.cui@nxp.com> > Cc: Simon Glass <sjg@chromium.org> > Cc: Bin Meng <bmeng.cn@gmail.com> > Cc: York Sun <york.sun@nxp.com> > Cc: Vignesh R <vigneshr@ti.com> > Cc: Mugunthan V N <mugunthanvnm@ti.com> > Cc: Michal Simek <michal.simek@xilinx.com> > Cc: Michael Trimarchi <michael@amarulasolutions.com> > Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com> > Signed-off-by: Jagan Teki <jagan@openedev.com> > --- > drivers/mtd/spi/sf_params.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/mtd/spi/sf_params.c b/drivers/mtd/spi/sf_params.c index 344d9c9..b029c76 100644 --- a/drivers/mtd/spi/sf_params.c +++ b/drivers/mtd/spi/sf_params.c @@ -93,6 +93,7 @@ const struct spi_flash_info spi_flash_ids[] = { {"S25FL128S_64K", INFO(0x012018, 0x4d01, 64 * 1024, 256, RD_FULL | WR_QPP) }, {"S25FL256S_256K", INFO(0x010219, 0x4d00, 256 * 1024, 128, RD_FULL | WR_QPP) }, {"S25FL256S_64K", INFO(0x010219, 0x4d01, 64 * 1024, 512, RD_FULL | WR_QPP) }, + {"S25FS256S_64K", INFO6(0x010219, 0x4d0181, 64 * 1024, 512, RD_FULL | WR_QPP | SECT_4K) }, {"S25FS512S", INFO(0x010220, 0x4D00, 128 * 1024, 512, RD_FULL | WR_QPP) }, {"S25FL512S_256K", INFO(0x010220, 0x4d00, 256 * 1024, 256, RD_FULL | WR_QPP) }, {"S25FL512S_64K", INFO(0x010220, 0x4d01, 64 * 1024, 1024, RD_FULL | WR_QPP) },
Add Spansion S25FS256S_64K spi flash to the list of spi_flash_ids. In spansion S25FS-S family the physical sectors are grouped as normal and parameter sectors. Parameter sectors are 4kB in size with 8 set located at the bottom or top address of a device. Normal sectors are similar to other flash family with sizes of 64kB or 32 kB. To erase whole flash using sector erase(D8h or DCh) won't effect the parameter sectors, so in order to erase these we must use 4K sector erase commands (20h or 21h) separately. So better to erase the whole flash using 4K sector erase instead of detecting these family parts again and do two different erase operations. Cc: Yunhui Cui <yunhui.cui@nxp.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: York Sun <york.sun@nxp.com> Cc: Vignesh R <vigneshr@ti.com> Cc: Mugunthan V N <mugunthanvnm@ti.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Jagan Teki <jagan@openedev.com> --- drivers/mtd/spi/sf_params.c | 1 + 1 file changed, 1 insertion(+)