summaryrefslogtreecommitdiffstats
path: root/include/spi_flash.h
Commit message (Collapse)AuthorAgeFilesLines
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-11/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* sf: Add flag status register polling supportJagannadha Sutradharudu Teki2013-06-231-0/+3
| | | | | | | | | | | | Flag status register polling is required for micron 512Mb flash devices onwards, for performing erase/program operations. Like polling for WIP(Write-In-Progress) bit in read status register, spi_flash_cmd_wait_ready will poll for PEC(Program-Erase-Control) bit in flag status register. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* sf: Add bank addr code in CONFIG_SPI_FLASH_BARJagannadha Sutradharudu Teki2013-06-231-1/+2
| | | | | | | | | | | Defined bank addr code on CONFIG_SPI_FLASH_BAR macro, to reduce the size for existing boards which has < 16Mbytes SPI flashes. It's upto user which has provision to use the bank addr code for flashes which has > 16Mbytes. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* sf: Read flash bank addr register at probe timeJagannadha Sutradharudu Teki2013-06-231-0/+2
| | | | | | | | | | | | | | | Read the flash bank addr register to get the state of bank in a perticular flash. and also bank write happens only when there is a change in bank selection from user. bank read only valid for flashes which has > 16Mbytes those are opearted in 3-byte addr mode, each bank occupies 16Mytes. Suppose if the flash has 64Mbytes size consists of 4 banks like bank0, bank1, bank2 and bank3. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* sf: Discover the bank addr commandsJagannadha Sutradharudu Teki2013-06-231-0/+4
| | | | | | | | | | Bank/Extended addr commands are specific to particular flash vendor so discover them based on the idocode0. Assign the discovered bank commands to spi_flash members so-that the bank read/write will use their specific operations. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
* sf: Enable FDT-based configuration and memory mappingSimon Glass2013-03-191-0/+1
| | | | | | | Enable device tree control of SPI flash, and use this to implement memory-mapped SPI flash, which is supported on Intel chips. Signed-off-by: Simon Glass <sjg@chromium.org>
* sf: Add spi_flash_alloc() to create a new SPI flash structSimon Glass2013-03-191-0/+38
| | | | | | | | | | At present it is difficult to extend the SPI flash structure since all devices allocate it themselves, and few of them zero all fields. Add a new function spi_flash_alloc() which can be used by SPI devices to perform this allocation, and thus ensure that all devices can better cope with SPI structure changes. Signed-off-by: Simon Glass <sjg@chromium.org>
* sf: Add spi_boot() to allow booting from SPI flash in an SPLChristian Riesch2011-12-241-0/+3
| | | | | | | | Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Cc: Heiko Schocher <hs@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Scott Wood <scottwood@freescale.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify write funcsMike Frysinger2011-07-261-1/+4
| | | | | | | 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: add struct spi_flash.sector_size parameterRichard Retanubun2011-04-121-0/+2
| | | | | | | | | | | | | | | 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: punt unused spi_flash_region structMike Frysinger2011-04-111-5/+0
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* spi_flash.h: pull in linux/types.h for u## typesMike Frysinger2009-11-241-0/+1
|
* SPI Flash subsystemHaavard Skinnemoen2008-06-031-0/+70
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