summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/spansion.c
Commit message (Collapse)AuthorAgeLines
* Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2013-06-13-1/+8
|\
| * sf: spansion: Update the name for S25FL256S flashJagannadha Sutradharudu Teki2013-06-13-1/+1
| | | | | | | | | | | | | | As the per the ID tabl the flash is under Uniform 64-kB sector architecture, hence updated with proper name. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
| * sf: spansion: Add Spansion S25FL064P IDsMarek Vasut2013-05-28-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | This is a S25FL064A successor. It supports up to 104MHz bus speed. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Scott Wood <scottwood@freescale.com> Cc: Wolfgang Denk <wd@denx.de> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
* | sf: spansion: Add support for S25FL128SXie Xiaobo2013-05-24-1/+1
|/ | | | | | | | | SPANSION recommend S25FL128S supersedes S25FL129P, and the two flash memory have the same device ID and Memory architecture. So they can use the same config parameters. Signed-off-by: Xie Xiaobo <X.Xie@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
* sf: Use spi_flash_alloc() in each SPI flash driverSimon Glass2013-03-19-7/+1
| | | | | | | | Rather than each device having its own way to allocate a SPI flash structure, use the new allocation function everywhere. This will make it easier to extend the interface without breaking devices. Signed-off-by: Simon Glass <sjg@chromium.org>
* sf: spansion: Correct the first byte of idcode1 for S25FL256S partJagannadha Sutradharudu Teki2013-02-06-1/+1
| | | | | | | This patch corrected the first byte of idcode1 for S25FL256S SPI flash. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* sf: spansion: Add support for S25FL256SMichal Simek2012-08-14-0/+7
| | | | | | | Add support for Spansion S25FL256S SPI flash. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify erase commandsMike Frysinger2012-03-04-10/+1
| | | | | | | | Analysis of the flash drivers shows that they all use 0x20 if the erase size is 4KiB, or 0xd8 if it's larger. So with this info in hand, we can unify all the erase functionality in one place. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: inline data constantsMike Frysinger2012-03-04-11/+2
| | | | | | | | | I imagine much of these constants are due to copy & pasting previous drivers rather than an actual reflection of the hardware layout. At any rate, inline the info that we don't care about externally as it shrinks things nicely. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: spansion: inline useless id definesMike Frysinger2012-07-20-22/+12
| | | | | | No need for dedicated defines when these really only get used once. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: drop unused/duplicate command definesMike Frysinger2012-07-20-10/+0
| | | | | | | In an effort to unify the spi flash drivers further, drop all the unused and/or duplicate command defines. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: spansion: add support for S25FL129P_64KShaohui Xie2011-08-02-0/+9
| | | | | Signed-off-by: Shaohui Xie <b21989@freescale.com> Cc: Mike Frysinger <vapier@gentoo.org>
* sf: kill off now-unused local stateMike Frysinger2011-07-26-24/+12
| | | | | | | | Now that the common spi_flash structure tracks all the info that these drivers need, kill off their local state indirection and use just what the common code provides. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify write funcsMike Frysinger2011-07-26-64/+2
| | | | | | | Once we add a new page_size field for write lengths, we can unify the write methods for most of the spi flash drivers. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify write enable commandsMike Frysinger2011-07-26-1/+1
| | | | | | | Every spi flash uses the same write enable command, so unify this in the common code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: localize erase funcsMike Frysinger2011-04-12-1/+1
| | | | | | | No need for these to be exported as they are only accessed indirectly via function pointers. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: add struct spi_flash.sector_size parameterRichard Retanubun2011-04-12-10/+3
| | | | | | | | | | | | | | | This patch adds a new member to struct spi_flash (u16 sector_size) and updates the spi flash drivers to start populating it. This parameter can be used by spi flash commands that need to round up units of operation to the flash's sector_size. Having this number in one place also allows duplicated code to be further collapsed into one common location (such as erase parameter and the detected message). Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify read functionsMike Frysinger2011-04-11-25/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify erase functionsMike Frysinger2011-04-11-54/+3
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify status polling for ready bitMike Frysinger2011-04-11-37/+4
| | | | | | | | All of the spi flash drivers implement the status register polling for detecting the device ready state, so unify them all in a new helper function -- spi_flash_wait_ready. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: spansion: add support for S25FL032P partsDavid Jander2010-10-06-0/+9
| | | | | | | | This patch introduces an extra mask-field in spansion_spi_flash_params to support flash chips with 1-byte extended ID (like the S25FL032P). Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: spansion: fixing erasing when sector size >64KiBMarc-André Hébert2010-10-06-4/+3
| | | | | | | | | | | The spansion_erase currently only works when the sector size is 64KB. cmd[1] should contain the higher 8 bit of the 24 bit address of the sector to be erased. Currently it is holding the sector index to be erased which happens to be the same thing when the sector size is 64KB. Signed-off-by: Marc-Andre Hebert <marc-andre.hebert@humanware.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: move useful messages from debug to printfMike Frysinger2010-06-30-2/+3
| | | | | | | | | | At the moment, the default SPI flash subsystem is quite terse. Errors and successes both result in a generic message. So move the useful errors and useful successes to printf output by default. While we're here, also convert the messages to use print_size(). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: always read 5 bytes for the idcodeMike Frysinger2009-04-02-8/+2
| | | | | | | | | | | | Some SPI flash drivers like to have extended id information available (like the spansion flash), so rather than making it re-issue the ID cmd to get at the last 2 bytes, have the common code read 5 bytes rather than just 3. This also matches the Linux behavior where it always reads 5 id bytes from all flashes. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> CC: Mingkai Hu <Mingkai.hu@freescale.com>
* mtd: SPI Flash: Support the Spansion FlashMingkai Hu2009-04-02-0/+356
Add MTD SPI Flash support for S25FL008A, S25FL016A, S25FL032A, S25FL064A, S25FL128P. Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>