summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/spi/spi_flash.c
Commit message (Collapse)AuthorAgeFilesLines
* sf: unify write funcsMike Frysinger2011-07-261-0/+57
| | | | | | | 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-261-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: kick watchdog when pollingPatrick Sestier2011-06-011-0/+3
| | | | | | | | The status polling can take a while, so make sure we kick the watchdog after each successful poll. Signed-off-by: Patrick Sestier <psestier@mircom.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: use print_size() for sector_size outputMike Frysinger2011-04-121-2/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: add struct spi_flash.sector_size parameterRichard Retanubun2011-04-121-2/+7
| | | | | | | | | | | | | | | 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-111-0/+12
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify erase functionsMike Frysinger2011-04-111-0/+58
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify status polling for ready bitMike Frysinger2011-04-111-0/+41
| | | | | | | | 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: unify read/write helpersMike Frysinger2011-04-111-48/+19
| | | | | | | These functions largely do the same exact thing, so unify them all into one basic function. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: new driver for EON devicesChong Huang2010-12-171-0/+3
| | | | | | Signed-off-by: Chong Huang <chuang@ucrobotics.com> Signed-off-by: Haitao Zhang <minipanda@linuxrobot.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: ramtron: new spi fram driverReinhard Meyer2010-11-101-0/+8
| | | | | | | Supports most types that support Read-Id and the FM25H20. Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: turn probe switch into a lookup tableReinhard Meyer2010-10-121-44/+82
| | | | | | | | | | This allows for arbitrarily long manufacturer ids following the JEDEC standard of 0x7f continuation bytes. It also makes adding new entries easier as it's just one element in an array. The downside is that it increases code size a bit, but we're talking ~50 bytes. Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: move useful messages from debug to printfMike Frysinger2010-06-301-2/+2
| | | | | | | | | | 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>
* spi_flash: support old STMicro parts with RESThomas Chou2010-06-301-0/+1
| | | | | | | | Some old STMicro parts do not support JEDEC ID (0x9f). This patch uses RES (0xab) to get Electronic ID and translates it to JEDEC ID. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Mike Frysinger <vapier@gentoo.org>
* sf: new driver for Winbond W25X16/32/64 devicesJason McMullan2009-11-221-0/+5
| | | | | Signed-off-by: Jason McMullan <jason.mcmullan@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: add GPL-2 license infoMike Frysinger2009-10-241-0/+1
| | | | | | | Some of the new spi flash files were missing explicit license lines. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* sf: new Macronix MX25xx SPI flash driverPrafulla Wadaskar2009-06-121-0/+5
| | | | | | | | | Added macronix SF driver for MTD framework MX25L12805D is supported and tested TBD: sector erase implementation, other deivces support Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: always read 5 bytes for the idcodeMike Frysinger2009-04-021-3/+3
| | | | | | | | | | | | 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>
* sf: add driver for SST flashesMike Frysinger2009-04-021-0/+5
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* sf: drop DEBUG definesMike Frysinger2009-04-021-1/+1
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* mtd: SPI Flash: Support the STMicro FlashTsiChung Liew2008-09-091-0/+5
| | | | | | | | Add MTD SPI Flash support for M25P16, M25P20, M25P32, M25P40, M25P64, M25P80, M25P128. Signed-off-by: Jason McMullan <mcmullan@netapp.com> Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
* SPI Flash subsystemHaavard Skinnemoen2008-06-031-0/+162
This adds a new SPI flash subsystem. Currently, only AT45 DataFlash in non-power-of-two mode is supported, but some preliminary support for other flash types is in place as well. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
OpenPOWER on IntegriCloud