summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/sst.c
Commit message (Collapse)AuthorAgeLines
* sf: unify status register writing (and thus block unlocking)Mike Frysinger2012-03-04-22/+1
| | | | | | | | The only two drivers to write the status register do it in the same way, so unify the implementations. This also makes the block unlock logic the same. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: sst: inline duplicate write enable helper funcsMike Frysinger2012-03-04-22/+4
| | | | | | | The local sst enable/disable write funcs don't really add anything over the common API, so just inline the common calls directly. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify erase commandsMike Frysinger2012-03-04-16/+3
| | | | | | | | Analysis of the flash drivers shows that they all use 0x20 if the erase size is 4KiB, or 0xd8 if it's larger. So with this info in hand, we can unify all the erase functionality in one place. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: drop unused/duplicate command definesMike Frysinger2012-07-20-10/+4
| | | | | | | In an effort to unify the spi flash drivers further, drop all the unused and/or duplicate command defines. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* 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/+1
| | | | | | | | | 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: unify write enable commandsMike Frysinger2011-07-26-1/+1
| | | | | | | Every spi flash uses the same write enable command, so unify this in the common code. 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: localize erase funcsMike Frysinger2011-04-12-1/+1
| | | | | | | 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-7/+3
| | | | | | | | | | | | | | | 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: unify read functionsMike Frysinger2011-04-11-14/+0
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify erase functionsMike Frysinger2011-04-11-60/+3
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: unify status polling for ready bitMike Frysinger2011-04-11-38/+3
| | | | | | | | 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: move useful messages from debug to printfMike Frysinger2010-06-30-2/+3
| | | | | | | | | | 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>
* 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: add driver for SST flashesMike Frysinger2009-04-02-0/+358
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>