Hi, > -----Original Message----- > From: Jagan Teki [mailto:ja...@openedev.com] > Sent: Wednesday, November 16, 2016 9:33 AM > To: u-boot@lists.denx.de > Cc: Jagan Teki <ja...@openedev.com>; Yunhui Cui <yunhui....@nxp.com>; > Bin Meng <bmeng...@gmail.com>; York Sun <york....@nxp.com>; Vignesh > R <vigne...@ti.com>; Mugunthan V N <mugunthan...@ti.com>; Michal > Simek <michal.si...@xilinx.com>; Michael Trimarchi > <mich...@amarulasolutions.com>; Siva Durga Prasad Paladugu > <siva...@xilinx.com> > Subject: [PATCH v6 09/21] sf: params: Add S25FS256S_64K spi flash support > > 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....@nxp.com> > Cc: Bin Meng <bmeng...@gmail.com> > Cc: York Sun <york....@nxp.com> > Cc: Vignesh R <vigne...@ti.com> > Cc: Mugunthan V N <mugunthan...@ti.com> > Cc: Michal Simek <michal.si...@xilinx.com> > Cc: Michael Trimarchi <mich...@amarulasolutions.com> > Cc: Siva Durga Prasad Paladugu <siva...@xilinx.com> > Signed-off-by: Jagan Teki <ja...@openedev.com> > Reviewed-by: Simon Glass <s...@chromium.org> > Reviewed-by: Jagan Teki <ja...@openedev.com> > --- > drivers/mtd/spi/sf_params.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mtd/spi/sf_params.c b/drivers/mtd/spi/sf_params.c index > d0c978e..6157e29 100644 > --- a/drivers/mtd/spi/sf_params.c > +++ b/drivers/mtd/spi/sf_params.c > @@ -98,6 +98,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) }, How about the below part S25FS512S, it is also from S25FS family, doesn't it need SECT_4K? AFAIK, S25FS family, by default ships with some 4K sectors at top/Bottom but it can be configurable to uniform Sector size.
Thanks, Siva > {"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) }, > -- > 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot