summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/spi_flash_internal.h
AgeCommit message (Collapse)Author
2011-08-29Modify the API for doing transfers over SPI.Gabe Black
This change modifies the spi_xfer function to take read and write buffers and read and write bit counts which is similar to what flashrom does. This has the nice effect of simiplifying many call sights, and will allow integrating SPI controllers which don't allow arbitrary control of the chip select lines. Only boards which are being used with ChromeOS and the functionality they use will be updated immediately. That's because those are the cases which can actually be tested effectively, and fixing up the other locations can be put off until later. These change and the eventual change that updates all the other call sights/drivers can also be reviewed and tested independently. It will also make rebasing easier. To try to make the transition less painful, the new interface is selectable using the CONFIG_NEW_SPI_XFER option. This selects whether the new or old interface is used. BUG=chrome-os-partner:4722 TEST=With this and related changes, built for x86-alex, tegra2_kaen, tegra2_aebl, tegra2_seaboard, and tegra2_asymptote. Flashed the firmware on a Kaen, verified the checksums matched, and booted to ChromeOS login. Built with the option turned off on x86-alex and tegra2_kaen. Change-Id: If32843255584544b08b9c8e18bbd9f36273fb71b Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: http://gerrit.chromium.org/gerrit/5374 Reviewed-by: Stefan Reinauer <reinauer@google.com>
2011-04-12sf: add struct spi_flash.sector_size parameterRichard Retanubun
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>
2011-04-11sf: unify read functionsMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-11sf: unify erase functionsMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-11sf: unify status polling for ready bitMike Frysinger
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>
2010-12-17sf: new driver for EON devicesChong Huang
Signed-off-by: Chong Huang <chuang@ucrobotics.com> Signed-off-by: Haitao Zhang <minipanda@linuxrobot.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-10sf: ramtron: new spi fram driverReinhard Meyer
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>
2009-11-22sf: new driver for Winbond W25X16/32/64 devicesJason McMullan
Signed-off-by: Jason McMullan <jason.mcmullan@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12sf: new Macronix MX25xx SPI flash driverPrafulla Wadaskar
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>
2009-04-02sf: set common timeouts in seconds, not millisecondsMike Frysinger
Since timeouts are only hit when there is a problem in the system, we don't want to prematurely timeout on a functioning setup. Thus having low timeouts (in milliseconds) doesn't gain us anything in the production case, but rather increases likely hood of causing problems where none otherwise exist. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-04-02sf: add driver for SST flashesMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-10-18rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-09mtd: SPI Flash: Support the STMicro FlashTsiChung Liew
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>
2008-06-03SPI Flash subsystemHaavard Skinnemoen
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>