summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi
Commit message (Collapse)AuthorAgeLines
* sf: eon: add support for EN25Q32B partsShaohui Xie2011-09-29-0/+8
| | | | | Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: fix debug format string warningVadim Bendebury2011-09-21-1/+1
| | | | | | | | On some systems, we get a warning when %lu is used with size_t's, so use the correct format string. Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: winbond: Add support for the Winbond W25X40James Le Cuirot2011-09-05-0/+8
| | | | | The Winbond W25X40 is now being used in the IP02 (and possibly IP04). Tested and working on the actual device.
* sf: macronix: disable write protection when initializingSimon Guinot2011-08-02-0/+42
| | | | Signed-off-by: Simon Guinot <sguinot@lacie.com>
* sf: spansion: add support for S25FL129P_64KShaohui Xie2011-08-02-0/+9
| | | | | Signed-off-by: Shaohui Xie <b21989@freescale.com> Cc: Mike Frysinger <vapier@gentoo.org>
* mtd/spi/macronix.c: add MX25L4005 and MX25L8005Macpaul Lin2011-08-02-0/+16
| | | | | | | | | Add support of MX25L4005 and MX25L8005 according to the datasheet http://www.mct.net/download/macronix/mx25l8005.pdf This patch has been tested with MX25L4005 and MX25L8005 Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* sf: sst: support newer standardized flashesMike Frysinger2011-07-26-2/+20
| | | | | | | | | Newer SST flashes have dropped the Auto Address Increment (AAI) word programming (WP) modes in favor of the standard page programming mode that most flashes now support. So add a flags field to the different flashes to support both modes with new and old styles. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify write disable commandsMike Frysinger2011-07-26-1/+10
| | | | | | | | | Every spi flash uses the same write disable command, so unify this in the common code. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Fixed commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
* sf: eon/stmicro: inline useless ID definesMike Frysinger2011-07-26-20/+9
| | | | | | These defines are used in only one place, so just inline them. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: kill off now-unused local stateMike Frysinger2011-07-26-123/+61
| | | | | | | | Now that the common spi_flash structure tracks all the info that these drivers need, kill off their local state indirection and use just what the common code provides. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify write funcsMike Frysinger2011-07-26-324/+76
| | | | | | | 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: unify write enable commandsMike Frysinger2011-07-26-8/+16
| | | | | | | Every spi flash uses the same write enable command, so unify this in the common code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Timer: Fix misuse of ARM *timer_masked() functions outside arch/armGraeme Russ2011-07-16-2/+3
| | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* sf: kick watchdog when pollingPatrick Sestier2011-06-01-0/+3
| | | | | | | | The status polling can take a while, so make sure we kick the watchdog after each successful poll. Signed-off-by: Patrick Sestier <psestier@mircom.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: sst: add support for SST25VF064CJames Kosin2011-04-13-0/+4
| | | | | Signed-off-by: James Kosin <jkosin@intcomgrp.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: use print_size() for sector_size outputMike Frysinger2011-04-12-2/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: localize erase funcsMike Frysinger2011-04-12-9/+9
| | | | | | | No need for these to be exported as they are only accessed indirectly via function pointers. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: sst: setup read funcMike Frysinger2011-04-12-0/+1
| | | | | | The previous unification patch missed setting up the sst read func. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: add struct spi_flash.sector_size parameterRichard Retanubun2011-04-12-64/+28
| | | | | | | | | | | | | | | 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: atmel: undo unification of status pollingMike Frysinger2011-04-11-2/+29
| | | | | | | | 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>
* sf: unify read functionsMike Frysinger2011-04-11-157/+22
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify erase functionsMike Frysinger2011-04-11-335/+83
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify status polling for ready bitMike Frysinger2011-04-11-283/+81
| | | | | | | | 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>
* sf: unify read/write helpersMike Frysinger2011-04-11-48/+19
| | | | | | | These functions largely do the same exact thing, so unify them all into one basic function. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: winbond: add support for W25Q16/32/128 partsWojtek Skulski2010-12-17-10/+29
| | | | | | | 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>
* sf: new driver for EON devicesChong Huang2010-12-17-0/+280
| | | | | | Signed-off-by: Chong Huang <chuang@ucrobotics.com> Signed-off-by: Haitao Zhang <minipanda@linuxrobot.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Switch from archive libraries to partial linkingSebastien Carlier2010-11-17-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* sf: ramtron: new spi fram driverReinhard Meyer2010-11-10-0/+329
| | | | | | | 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>
* sf: turn probe switch into a lookup tableReinhard Meyer2010-10-12-44/+82
| | | | | | | | | | 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>
* sf: spansion: add support for S25FL032P partsDavid Jander2010-10-06-0/+9
| | | | | | | | 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>
* sf: spansion: fixing erasing when sector size >64KiBMarc-André Hébert2010-10-06-4/+3
| | | | | | | | | | | 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>
* sf: winbond: add support W25Q64 partsGraeme Smecher2010-10-06-0/+9
| | | | | | | | | 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>
* sf: move useful messages from debug to printfMike Frysinger2010-06-30-16/+22
| | | | | | | | | | 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>
* spi_flash: support old STMicro parts with RESThomas Chou2010-06-30-0/+22
| | | | | | | | 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>
* drivers/mtd/spi/eeprom_m95xxx.c: add missing error checkingAlbin Tonnerre2010-04-09-0/+6
| | | | Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
* sf: fix stmicro offset setup while erasingMike Frysinger2009-11-22-1/+2
| | | | | Reported-by: Peter Gombos <gombos@protecta.hu> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: new driver for Winbond W25X16/32/64 devicesJason McMullan2009-11-22-0/+339
| | | | | Signed-off-by: Jason McMullan <jason.mcmullan@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: add GPL-2 license infoMike Frysinger2009-10-24-0/+2
| | | | | | | 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>
* eeprom_m95xxx: remove unused variable iJean-Christophe PLAGNIOL-VILLARD2009-08-21-1/+0
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Add driver for the ST M95xxx SPI EEPROMAlbin Tonnerre2009-08-09-0/+118
| | | | | | | | 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>
* sf: Macronix additional chips supportedPrafulla Wadaskar2009-07-06-12/+37
| | | | | | | | | | | | | 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>
* sf: sst: add sst25vf###b idsMike Frysinger2009-07-06-0/+16
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: sst: fix sector sizeMike Frysinger2009-07-06-4/+4
| | | | | | | | 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>
* sf: new Macronix MX25xx SPI flash driverPrafulla Wadaskar2009-06-12-0/+319
| | | | | | | | | 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>
* sf: atmel: implement power-of-two write/erase funcsTodor I Mollov2009-06-12-0/+139
| | | | | | Signed-off-by: Todor I Mollov <tmollov@ucsd.edu> Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* sf: stmicro: dont send 4 bytes when reading status registerMike Frysinger2009-04-02-3/+3
| | | | | | | | | | | | 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>
* sf: set common timeouts in seconds, not millisecondsMike Frysinger2009-04-02-3/+6
| | | | | | | | | | | 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>
* sf: stmicro: use common page timeout defineMike Frysinger2009-04-02-2/+1
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* sf: always read 5 bytes for the idcodeMike Frysinger2009-04-02-11/+5
| | | | | | | | | | | | 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>
* sf: stmicro: drop redundant id readMike Frysinger2009-04-02-7/+1
| | | | | | | | | | 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>