summaryrefslogtreecommitdiff
path: root/drivers/mtd/cfi_mtd.c
AgeCommit message (Collapse)Author
2014-11-19mtd, cfi, ubi: add missing writebufsize initializationHeiko Schocher
ff94bc40af3481d47546595ba73c136de6af6929 "mtd, ubi, ubifs: resync with Linux-3.14" introduced the writebufsize field in struct mtd_info, which is not initialized in the cfi_flash driver, which leads in not working ubi on cfi flashes. Fix it Signed-off-by: Heiko Schocher <hs@denx.de> Reported-by: Andrew Ruder <andrew.ruder@elecsyscorp.com> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-05-31mtd: resync with Linux-3.7.1Sergey Lapin
This patch is essentially an update of u-boot MTD subsystem to the state of Linux-3.7.1 with exclusion of some bits: - the update is concentrated on NAND, no onenand or CFI/NOR/SPI flashes interfaces are updated EXCEPT for API changes. - new large NAND chips support is there, though some updates have got in Linux-3.8.-rc1, (which will follow on top of this patch). To produce this update I used tag v3.7.1 of linux-stable repository. The update was made using application of relevant patches, with changes relevant to U-Boot-only stuff sticked together to keep bisectability. Then all changes were grouped together to this patch. Signed-off-by: Sergey Lapin <slapin@ossfans.org> [scottwood@freescale.com: some eccstrength and build fixes] Signed-off-by: Scott Wood <scottwood@freescale.com>
2011-10-09CFI: fix warning: variable ... set but not usedWolfgang Denk
Fix: cfi_mtd.c: In function 'cfi_mtd_init': cfi_mtd.c:226:19: warning: variable 'mtd_list' set but not used [-Wunused-but-set-variable] cfi_mtd.c: In function 'cfi_mtd_init': cfi_mtd.c:225:6: warning: unused variable 'devices_found' cfi_mtd.c: In function 'cfi_mtd_init': cfi_mtd.c:226:19: warning: variable 'mtd_list' set but not used [-Wunused-but-set-variable] [-Wunused-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Acked-by: Stefan Roese <sr@denx.de>
2010-09-20cfi_flash: Remove uneccessary #ifdef CONFIG_SYS_MAX_FLASH_BANKS_DETECTStefan Roese
Now that the defines are moved to header files we don't need this conditional compilation any more. Remove it. Signed-off-by: Stefan Roese <sr@denx.de>
2010-02-02CFI: fix eraseregions numblocksLadislav Michl
eraseregions numblocks was sometimes one less than actual, possibly producing erase regions with zero blocks. As MTD code touches eraseregions only if numeraseregions is greater that zero, allocate eraseregions only for non uniform erase size flash. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-16mtd: cfi - if defined, use MAX_FLASH_BANKS_DETECT for static declarationsKim Phillips
a.k.a cfi_mtd.c does as cfi_flash.c does. This also prevents the TQM834x build from doing a: cfi_mtd.c:36: error: variably modified 'cfi_mtd_info' at file scope cfi_mtd.c:37: error: variably modified 'cfi_mtd_names' at file scope using gcc 4.4. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Stefan Roese <sr@denx.de>
2009-06-12mtd: Update MTD infrastructure to support 64bit device sizeStefan Roese
This patch brings the U-Boot MTD infrastructure in sync with the current Linux MTD version (2.6.30-rc3). Biggest change is the 64bit device size support and a resync of the mtdpart.c file which has seen multiple fixes meanwhile. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Scott Wood <scottwood@freescale.com> Cc: Kyungmin Park <kmpark@infradead.org>
2009-06-12mtd: Add MTD concat support to concatenate multiple MTD NOR devicesStefan Roese
This patch adds concatenation support to the U-Boot MTD infrastructure. By enabling CONFIG_MTD_CONCAT this MTD CFI wrapper will concatenate all found NOR devices into one single MTD device. This can be used by e.g by UBI to access a partition that spans over multiple NOR chips. Signed-off-by: Stefan Roese <sr@denx.de>
2009-06-03cfi_mtd: Fix bug in last sector detectionStefan Roese
This patch now enabled this cfi-mtd wrapper to correctly detect and erase the last sector in an NOR FLASH device. Signed-off-by: Stefan Roese <sr@denx.de>
2009-04-29MTD: Change cfi-mtd to accept non-uniform sector sizesStefan Roese
With this patch non-uniform NOR FLASH chips (chips with multiple erase regions) can be exported via the cfi-mtd layer and therefor used by UBI. We select the largest sector size as erasesize. The cfi driver will make sure that the smaller sectors are handled correctly. Signed-off-by: Stefan Roese <sr@denx.de>
2009-04-04UBI/cfi-mtd: Fix mtd name for multiple chipsAndreas Huber
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>
2008-11-24cfi-mtd: Add cfi-mtd driver.Piotr Ziecik
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>