summaryrefslogtreecommitdiff
path: root/include/flash.h
Commit message (Collapse)AuthorAgeLines
* mtd: Handle 29LV800BTDirk Eibach2014-11-19-0/+1
| | | | | | | | | The device id makes u-boot think that this chip needs cfi_reverse_geometry(), which is not the case. Add it to jedec_flash, so it is handled properly. Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
* Coding Style cleanup: remove trailing white spaceWolfgang Denk2013-10-14-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* mtd/cfi: add support for SST 4KB sector granularityAngelo Dureghello2013-01-10-0/+1
| | | | | | | | | | | | | | | | | | | Add support for SST 4KB sector granularity. Many recent SST flashes, i.e. SST39VF3201B and similar of this family are declared CFI-conformant from SST. They support CFI query, but implement 2 different sector sizes in the same memory: a 64KB sector (they call it "block", std AMD erase cmd=0x30), and a 4KB sector (they call it "sector", erase cmd=0x50). Also, CFI query on these chips, reading from address 0x2dh of cfi query struct, detects a number of secotrs for the 4KB granularity (flinfo shows it). For all other aspects, they are CFI compliant, so, as Linux do, i think it's a good idea to handle these chips in the CFI driver, with a fixup to allow 4KB granularity, as should be expected, instead of 64KB. Signed-off-by: Angelo Dureghello <sysamfw@gmail.com> Signed-off-by: Stefan Rose <sr@denx.de>
* arm: Remove support for lpc2292Marek Vasut2012-10-26-1/+0
| | | | | | This stuff has been rotting in the tree for a year now. Remove it. Signed-off-by: Marek Vasut <marex@denx.de>
* cfi: Make the flash erase and write operations abortableJoe Hershberger2012-09-03-0/+1
| | | | | | | | | | | Check for ctrlc() in operations that take time and loop over the flash addresses. In netconsole, tstc() is expensive. Only check once in a while to not slow down the operation significantly. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Stefan Roese <sr@denx.de>
* mtd/cfi_flash: fix write problems for Numonyx P33/30 32 MBit flashsHolger Brunck2012-08-13-0/+1
| | | | | | | | | | | | | | | | | | commit 54652991 Work around bug in Numonyx P33/P30 256-Mbit 65nm flash chips fixes a problem for Numonyx P33/P30 flashes for 256-Mbit, but this leads to problems for smaller versions of this chip e.g. the 32Mbit version with deviceid 0x16 on mgcoge. So move the code for this work around to an own function and check previously manufacturer id and device id to not break other flashes which don't need this work around. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Heiko Schocher <hs@denx.de> cc: Stefan Roese <sr@denx.de> cc: Philippe De Muyter <phdm@macqel.be> cc: Gerlando Falauto <gerlando.falauto@keymile.com> Signed-off-by: Stefan Roese <sr@denx.de>
* mtd, cfi: introduce void flash_protect_default(void)Heiko Schocher2011-04-07-0/+1
| | | | | | | | collect code which protects default sectors in a function, called flash_protect_default. So boardspecific code can call it too. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
* cfi_flash: Simplify dynamic flash bank number detectionStefan Roese2010-09-20-0/+2
| | | | | | | | | | | | | | | | | | | This patch simplifies the use of CONFIG_SYS_MAX_FLASH_BANKS_DETECT. By moving these optional variables and defines into the common code, board specific code is minimized. Currently only the following board use this feature: APC405, IDS8247, TQM834x And IDS8247 doesn't seem to really need this feature, since its not updating the bank number variable at all. So this patch removes the definition of CONFIG_SYS_MAX_FLASH_BANKS_DETECT from this board port. This new framework will be used by the upcoming lwmon5 update as well. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Heiko Schocher <hs@denx.de> Cc: Matthias Fuchs <matthias.fuchs@esd.eu>
* Support up to 7 banks for ids as specified in JEDEC JEP106ZNiklaus Giger2009-08-26-1/+9
| | | | | | | | see http://www.jedec.org/download/search/jep106Z.pdf Add some second source legacy flash chips 256x8. Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org> Signed-off-by: Stefan Roese <sr@denx.de>
* UBI/cfi-mtd: Fix mtd name for multiple chipsAndreas Huber2009-04-04-2/+0
| | | | | | | | | | | | | On platforms with multiple NOR chips, currently only the first one can be selected using the "ubi part" command. This patch fixes this problem by using different names for the NOR "mtd devices". It also changes the name of the NOR MTD device from "cfi-mtd" to "norX" (X indexing the device numer) to better match the mtdparts defaults. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
* cfi: make flash_get_info() non staticHeiko Schocher2009-02-11-0/+3
| | | | | | | | | | | If on your board is more than one flash, you must know the size of every single flash, for example, for updating the DTS before booting Linux. So make this function flash_get_info() extern, and you can have all info about your flashes. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
* flash/cfi_flash: Use virtual sector start address, not physBecky Bruce2009-02-05-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | include/flash.h was commented to say that the address in flash_info->start was a physical address. However, from u-boot's point of view, and looking at most flash code, it makes more sense for this to be a virtual address. So I corrected the comment to indicate that this was a virtual address. The only flash driver that was actually treating the address as physical was the mtd/cfi_flash driver. However, this code was using it inconsistently as it actually directly dereferenced the "start" element, while it used map_physmem to get a virtual address in other places. I changed this driver so that the code which initializes the info->start field calls map_physmem to get a virtual address, eliminating the need for further map_physmem calls. The code is now consistent. The *only* place a physical address should be used is when defining the flash banks list that is used to initialize the flash_info struct, usually found in the board config file. Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> Signed-off-by: Stefan Roese <sr@denx.de>
* cfi-mtd: Add cfi-mtd driver.Piotr Ziecik2008-11-24-0/+8
| | | | | | | | | | | | Add cfi-mtd driver, which exports CFI flash to MTD layer. This allows CFI flash devices to be used from MTD layer. Building of the new driver is controlled by CONFIG_FLASH_CFI_MTD option. Initialization is done by calling cfi_mtd_init() from flash_init(). Signed-off-by: Piotr Ziecik <kosmo@semihalf.com> Signed-off-by: Stefan Roese <sr@denx.de>
* cfi_flash: Add interface for flash verbosity controlPiotr Ziecik2008-11-24-0/+1
| | | | | | | | | | | Add interface for flash verbosity control. It allows to disable output from low-level flash API. It is useful when calling these low-level functions from context other than flash commands (for example the MTD/CFI interface implmentation). Signed-off-by: Piotr Ziecik <kosmo@semihalf.com> Signed-off-by: Stefan Roese <sr@denx.de>
* cfi_flash: Export flash_sector_size() function.Piotr Ziecik2008-11-24-0/+3
| | | | | | | | Export flash_sector_size() function from drivers/mtd/cfi_flash.c, so that it can be used in the upcoming cfi-mtd driver. Signed-off-by: Piotr Ziecik <kosmo@semihalf.com> Signed-off-by: Stefan Roese <sr@denx.de>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-18-7/+7
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* flash: factor out adjusting of Flash address to the end of sectorBartlomiej Sieka2008-10-18-0/+1
| | | | | | | | | | The upcoming automatic update feature needs the ability to adjust an address within Flash to the end of its respective sector. Factor out this functionality to a new function flash_sect_roundb(). Signed-off-by: Rafal Czubak <rcz@semihalf.com> Signed-off-by: Bartlomiej Sieka <tur@semihalf.com> Signed-off-by: Stefan Roese <sr@denx.de>
* Big white-space cleanup.Wolfgang Denk2008-05-21-2/+2
| | | | | | | | | | | This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
* CFI: synchronize command offsets with Linux CFI driverBartlomiej Sieka2007-12-13-0/+1
| | | | | | Fixes non-working CFI Flash on the Inka4x0 board. Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
* CFI: support JEDEC flash roms in CFI-flash frameworkMichael Schwingen2007-12-08-0/+10
| | | | | | | | | The following patch adds support for non-CFI flash ROMS, by hooking into the CFI flash code and using most of its code, as recently discussed here in the thread "Mixing CFI and non-CFI flashs". Signed-off-by: Michael Schwingen <michael@schwingen.org> Signed-off-by: Stefan Roese <sr@denx.de>
* Add MACH_TYPE records for several AT91 boards.Peter Pearse2007-08-14-0/+5
| | | | | | | | | | | Merge to two at45.c files into a common file, split to at45.c and spi.c Fix spelling error in DM9161 PHY Support. Initialize at91rm9200 board (and set LED). Add PIO control for at91rm9200dk LEDs and Mux. Change dataflash partition boundaries to be compatible with Linux 2.6. Signed-off-by: Peter Pearse <peter.pearse@arm.com> Signed-off-by: Ulf Samuelsson <ulf@atmel.com>
* [PATCH] Add flash chip M29W320ET/B supportAubrey Li2007-03-19-0/+2
|
* Add port for the lpc2292sodimm evaluation board from EmbeddedArtistsGary Jennejohn2007-01-24-0/+1
|
* Fix cfi failure with Spansion Flash (Spansion Flash Devices have a different ↵Stefano Babic2006-12-24-0/+1
| | | | offset to go into CFI mode)
* [PATCH] CFI driver AMD Command Set Top boot geometry reversal, etc. [Updated]Stefan Roese2006-11-13-1/+7
| | | | | | | | | | | | * Adds support for AMD command set Top Boot flash geometry reversal * Adds support for reading JEDEC Manufacturer ID and Device ID * Adds support for displaying command set, manufacturer id and device ids (flinfo) * Makes flinfo output to be consistent when CFG_FLASH_EMPTY_INFO defined * Removes outdated change history (refer to git log instead) Signed-off-by: Tolunay Orkun <listmember@orkun.us> Signed-off-by: Stefan Roese <sr@denx.de>
* Update for CAM5200 board:Marian Balakowicz2006-10-03-0/+4
| | | | | | | - Map in a additional chip selects CS4 and CS5. - Modify the port configration, configure six UARTs and no PCI, ATA and USB. - Add custom flash driver to handle specific byte swapping
* * Update Intel IXP4xx supportWolfgang Denk2006-05-30-0/+2
| | | | | | | | | | | - Add IXP4xx NPE ethernet MAC support - Add support for Intel IXDPG425 board - Add support for Prodrive PDNB3 board - Add IRQ support Patch by Stefan Roese, 23 May 2006 [This patch does not include cpu/ixp/npe/IxNpeMicrocode.c which still sufferes from licensing issues. Blame Intel.]
* * Changes/fixes for drivers/cfi_flash.c:Stefan Roese2006-04-01-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Add Intel legacy lock/unlock support to common CFI driver On some Intel flash's (e.g. Intel J3) legacy unlocking is supported, meaning that unlocking of one sector will unlock all sectors of this bank. Using this feature, unlocking of all sectors upon startup (via env var "unlock=yes") will get much faster. - Fixed problem with multiple reads of envronment variable "unlock" as pointed out by Reinhard Arlt & Anders Larsen. - Removed unwanted linefeeds from "protect" command when CFG_FLASH_PROTECTION is enabled. - Changed p3p400 board to use CFG_FLASH_PROTECTION Patch by Stefan Roese, 01 Apr 2006 * Changes/fixes for drivers/cfi_flash.c: - Correctly handle the cases where CFG_HZ != 1000 (several XScale-based boards) - Fix the timeout calculation of buffered writes (off by a factor of 1000) Patch by Anders Larsen, 31 Mar 2006
* Add ADI Blackfin supportWolfgang Denk2006-03-12-0/+1
| | | | | | | - add support for Analog Devices Blackfin BF533 CPU - add support for the ADI BF533 Stamp uClinux board - add support for the ADI BF533 EZKit board Patches by Richard Klingler, June 11th 2005:
* Fix problem with flash_get_size() from CFI driver updateStefan Roese2006-03-01-1/+0
| | | | Patch by Stefan Roese, 1 Mar 2006
* Major CFI-FLASH driver update:Stefan Roese2006-02-28-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add env-variable "unlock" to handle initial state of sectors (locked/unlocked). Only the U-Boot image and it's environment is protected, all other sectors are unprotected (unlocked) if flash hardware protection is used (CFG_FLASH_PROTECTION) and the environment variable "unlock" is set to "yes". Patch by Stefan Roese, 28 Feb 2006 * Update drivers/cfi_flash.c: - find_sector() called in both versions of flash_write_cfiword() Patch by Peter Pearse, 27th Feb 2006 * CFI support for a x8/x16 AMD/Spansion flash configured in x8 mode Patch by Jose Maria Lopez, 16 Jan 2006 * Add support for AMD/Spansion Flashes in flash_write_cfibuffer Patch by Alex Bastos and Thomas Schaefer, 2005-08-29 * Changes/fixes for drivers/cfi_flash.c: We *should* check if there are any error bits if the previous call returned ERR_OK (Otherwise we will have output an error message in flash_status_check() already.) The original code would only check for error bits if flash_status_check() returns ERR_TIMEOUT. Patch by Marcus Hall, 23 Aug 2005 * Changes/fixes for drivers/cfi_flash.c: - Add CFG_FLASH_PROTECT_CLEAR on drivers/cfi_flash.c - Prohibit buffer write when buffer_size is 1 on drivers/cfi_flash.c Patch by Sangmoon Kim, 19 Aug 2005 * Fixes for drivers/cfi_flash.c: - Fix wrong timeout value usage in flash_status_check() - Round write_tout up when converting to msec in flash_get_size() - Remove clearing flash status at the end of flash_write_cfibuffer() which sets Intel 28F640J3 flash back to command mode on CSB472 Patch by Tolunay Orkun, 02 July 2005
* Add support for 28F256J3A flash chipsWolfgang Denk2005-12-22-0/+2
|
* Cleanup for GCC-4.xWolfgang Denk2005-10-13-1/+1
|
* Add support for S29GL064M-R3 flash chip on xsengine boardWolfgang Denk2005-10-05-0/+2
| | | | Patch by Kurt Stremerch, 18 Apr 2005
* Add Barco Streaming Video Card (SVC) and Sample Compress Network (SCN) boardWolfgang Denk2005-09-25-23/+39
| | | | Patch by Marc Leeman, 04 Mar 2005
* new SST and EXCEL devices addstroese2004-12-16-0/+10
|
* Add support for INKA4X0 boardwdenk2004-12-16-0/+2
|
* * Update for AT91RM9200DK and CMC_PU2 boards:wdenk2004-11-21-0/+3
| | | | | | | - Enable booting directly from flash - fix CMC_PU2 flash driver * Fix mkimage usage message
* * Patch by Fred Klatt, 25 Jun 2004:wdenk2004-07-10-1/+2
| | | | | | | | | | | | Add support for WindRiver's SBC8560 board * Patch by Nicolas Lacressonniere, 24 Jun 2004 Small Bugs fixes for "at91rm9200dk" board: - Timing modifications for SPI DataFlash access - Fix NAND flash detection bug * Patch by Nicolas Lacressonniere, 24 Jun 2004: Add Support for Flash AT49BV6416 for AT91RM9200DK board
* * Patch by Robert Schwebel, 10 Jun 2004:wdenk2004-06-10-12/+13
| | | | | | | | | Add support for Intel K3 strata flash. * Some cleanup * Patch by Thomas Brand, 10 Jun 2004: Fix "loads" command on DK1S10 board
* * Patch by Yuli Barcohen, 09 Jun 2004:wdenk2004-06-09-0/+1
| | | | | | | Add support for Analogue&Micro Adder87x and the older AdderII board. * Patch by Ming-Len Wu, 09 Jun 2004: Add suppport for MC9328 (Dargonball) CPU and Motorola MX1ADS board
* Patch by Thomas Viehweger, 14 May 2004:wdenk2004-06-09-6/+14
| | | | | | | - flash.h: more flash types added - immap_8260.h: some bits added (useful for RMII) - cmd_coninfo.c: typo corrected, printf -> puts - reduced size by replacing spaces with tab
* * Patch by Rishi Bhattacharya, 08 May 2004:wdenk2004-06-08-5/+10
| | | | | | | Add support for TI OMAP5912 OSK Board * Patch by Sam Song May, 07 May 2004: Fix typo of UPM table for rmu board
* * Add start-up delay to make sure power has stabilized beforewdenk2004-03-23-0/+4
| | | | | | | | | | | | | | | | | attempting to switch on USB on SX1 board. * Patch by Josef Wagner, 18 Mar 2004: - Add support for MicroSys XM250 board (PXA255) - Add support for MicroSys PM828 board (MPC8280) - Add support for 32 MB Flash on PM825/826 - new SDRAM refresh rate for PM825/PM826 - added support for MicroSys PM520 (MPC5200) - replaced Query by Identify command in CPU86/flash.c to support 28F160F3B * Fix wrap around problem with udelay() on ARM920T * Add support for Macronix flash on TRAB board
* * Patch by Tolunay Orkun, 5 Mar 2004:wdenk2004-03-14-0/+3
| | | | | | | | | | | | | Fix early board initialization for Cogent CSB272 board * Patch by Ed Okerson, 3 Mar 2004: fix CFI flash writes for little endian systems * Patch by Reinhard Meyer, 01 Mar 2004: generalize USB and IDE support for MPC5200 with according changes to IceCube.h and TOP5200.h add Am29LV256 256 MBit FLASH support for TOP5200 boards add info about USB and IDE to README
* * Some code cleanupwdenk2004-02-12-0/+12
| | | | | | | | * Patch by Josef Baumgartner, 10 Feb 2004: Fixes for Coldfire port * Patch by Brad Kemp, 11 Feb 2004: Fix CFI flash driver problems
* * Patch by Yuli Barcohen, 26 Jan 2004:wdenk2004-02-08-1/+6
| | | | | | | | | | | | | | | | | | | Allow bzip2 compression for small memory footprint boards * Patch by Brad Kemp, 21 Jan 2004: Add support for CFI flash driver for both the Intel and the AMD command sets. * Patch by Travis Sawyer, 20 Jan 2004: Fix pci bridge auto enumeration of sibling p2p bridges. * Patch by Tolunay Orkun, 12 Jan 2004: Add some delays as needed for Intel LXT971A PHY support * Patches by Stephan Linz, 09 Jan 2004: - avoid warning: unused variable `piop' in board/altera/common/sevenseg.c - make DK1C20 board configuration related to ASMI conform to documentation
* Patch by Anders Larsen, 09 Jan 2004:wdenk2004-02-08-1/+1
| | | | | | | | | | ARM memory layout fixes: the abort-stack is now set up in the correct RAM area, and the BSS is zeroed out as it should be. Furthermore, the magic variables 'armboot_end' and 'armboot_end_data' of the linker scripts are replaced by '__bss_start' and '_end', resp., which is a further step to eliminate unnecessary differences between the implementation of the CPU architectures.
* * Cleanup lowboot code for MPC5200wdenk2004-01-02-9/+14
| | | | | | | | | | | | | | | | | | * Minor code cleanup (coding style) * Patch by Reinhard Meyer, 30 Dec 2003: - cpu/mpc5xxx/fec.c: added CONFIG_PHY_ADDR, added CONFIG_PHY_TYPE, - added CONFIG_PHY_ADDR to include/configs/IceCube.h, - turned debug print of PHY registers into a function (called in two places) - added support for EMK MPC5200 based modules * Fix MPC8xx PLPRCR_MFD_SHIFT typo * Add support for TQM866M modules * Fixes for TQM855M with 4 MB flash (Am29DL163 = _no_ mirror bit flash) * Fix a few compiler warnings