summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi
AgeCommit message (Collapse)Author
2011-04-13sf: sst: add support for SST25VF064CJames Kosin
Signed-off-by: James Kosin <jkosin@intcomgrp.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-12sf: use print_size() for sector_size outputMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-12sf: localize erase funcsMike Frysinger
No need for these to be exported as they are only accessed indirectly via function pointers. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-12sf: sst: setup read funcMike Frysinger
The previous unification patch missed setting up the sst read func. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
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-12sf: atmel: undo unification of status pollingMike Frysinger
The AT45 flashes are completely different (at the command set and status register level) from all other SPI flashes, so we can't unify their logic with common code. 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>
2011-04-11sf: unify read/write helpersMike Frysinger
These functions largely do the same exact thing, so unify them all into one basic function. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-12-17sf: winbond: add support for W25Q16/32/128 partsWojtek Skulski
While we're here, cut out the useless id defines too. Signed-off-by: Wojtek Skulski <skulski@pas.rochester.edu> 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-17Switch from archive libraries to partial linkingSebastien Carlier
Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries when linking with recent versions of binutils. As stated in the System V ABI, "the link editor does not extract archive members to resolve undefined weak symbols". This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives, which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols as intended. This approach is also used by Linux, from which the gmake function cmd_link_o_target (defined in config.mk and used in all Makefiles) is inspired. The name of each former library archive is preserved except for extensions which change from ".a" to ".o". This commit updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some features but include source files that depend these disabled features in the build, resulting in undefined symbols. Known such cases include: - disabling CMD_NET but not CMD_NFS; - enabling CONFIG_OF_LIBFDT but not CONFIG_QE. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
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>
2010-10-13sf: turn probe switch into a lookup tableReinhard Meyer
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>
2010-10-07sf: spansion: add support for S25FL032P partsDavid Jander
This patch introduces an extra mask-field in spansion_spi_flash_params to support flash chips with 1-byte extended ID (like the S25FL032P). Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-07sf: spansion: fixing erasing when sector size >64KiBMarc-André Hébert
The spansion_erase currently only works when the sector size is 64KB. cmd[1] should contain the higher 8 bit of the 24 bit address of the sector to be erased. Currently it is holding the sector index to be erased which happens to be the same thing when the sector size is 64KB. Signed-off-by: Marc-Andre Hebert <marc-andre.hebert@humanware.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-06sf: winbond: add support W25Q64 partsGraeme Smecher
Adds support for Winbond's W25Q64 SPI flash. These devices are used on (among others) Xilinx' SP601 and SP605 Spartan-6 evaluation boards. Tested with "sf" commands. Signed-off-by: Graeme Smecher <graeme.smecher@mail.mcgill.ca> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-07-01sf: move useful messages from debug to printfMike Frysinger
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>
2010-07-01spi_flash: support old STMicro parts with RESThomas Chou
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>
2010-04-09drivers/mtd/spi/eeprom_m95xxx.c: add missing error checkingAlbin Tonnerre
Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
2009-11-22sf: fix stmicro offset setup while erasingMike Frysinger
Reported-by: Peter Gombos <gombos@protecta.hu> 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-10-24sf: add GPL-2 license infoMike Frysinger
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>
2009-08-21eeprom_m95xxx: remove unused variable iJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-08-09Add driver for the ST M95xxx SPI EEPROMAlbin Tonnerre
This chip is used in a number of boards manufactured by Calao-Systems which should be supported soon. This driver provides the necessary spi_read and spi_write functions necessary to communicate with the chip. Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
2009-07-06sf: Macronix additional chips supportedPrafulla Wadaskar
new chips supported:- MX25L1605D, MX25L3205D, MX25L6405D, MX25L12855E out of which MX25L6405D and MX25L12855E tested on Kirkwood platforms Modified the Macronix flash support to use 2 bytes of device id instead of 1 This was required to support MX25L12855E Signed-off-by: Piyush Shah <spiyush@marvell.com> Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-06sf: sst: add sst25vf###b idsMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-06sf: sst: fix sector sizeMike Frysinger
Looks like when I was encoding the sector sizes, I forgot to divide by 8 (due to the stupid marketing driven process that declares all sizes in useless megabits and not megabytes). 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-06-12sf: atmel: implement power-of-two write/erase funcsTodor I Mollov
Signed-off-by: Todor I Mollov <tmollov@ucsd.edu> Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-04-02sf: stmicro: dont send 4 bytes when reading status registerMike Frysinger
I can't find anywhere in the datasheet that says the status register needs 3 dummy bytes sent to it before being able to read back the first real result. Tests on a Blackfin board show that after writing the opcode, the status register starts coming back immediately. So only write out the read status register opcode before polling the result. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Jason McMullan <mcmullan@netapp.com> CC: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
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: stmicro: use common page timeout defineMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-04-02sf: always read 5 bytes for the idcodeMike Frysinger
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>
2009-04-02sf: stmicro: drop redundant id readMike Frysinger
The common SPI flash code reads the idcode and passes it down to the SPI flash driver, so there is no need to read it again ourselves. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> CC: Jason McMullan <mcmullan@netapp.com> CC: TsiChung Liew <Tsi-Chung.Liew@freescale.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>
2009-04-02sf: drop DEBUG definesMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-04-02mtd: add some at45 spi flash supportJean-Christophe PLAGNIOL-VILLARD
- AT45DB321D - AT45DB161D - AT45DB081D - AT45DB041D - AT45DB021D - AT45DB011D Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-04-02mtd: SPI Flash: Support the Spansion FlashMingkai Hu
Add MTD SPI Flash support for S25FL008A, S25FL016A, S25FL032A, S25FL064A, S25FL128P. Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-24spi flash: fix crash due to spi flash miscommunicationBrad Bozarth
Higher spi flash layers expect to be given back a pointer that was malloced so that it can free the result, but the lower layers return a pointer that is in the middle of the malloced memory. Reorder the members of the lower spi structures so that things work out. Signed-off-by: Brad Bozarth <bflinux@yumbrad.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-12-15spi/stmicro: fix debug() display of cmdMike Frysinger
The stmicro_wait_ready() func tries to show the actual opcode that was sent to the device, but instead it displays the array pointer. Fix it to pull out the opcode from the start of the array. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
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-08-06Fix merge problemsStefan Roese
Signed-off-by: Stefan Roese <sr@denx.de>
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>