| Age | Commit message (Collapse) | Author |
|
Now the common probing is handled in spi_flash_probe.c
hence removed the unneeded flash drivers.
Signed-off-by: Jagannadha Sutradharudu Teki <[email protected]>
|
|
- CHECK: Alignment should match open parenthesis
- trailing whitespace
Signed-off-by: Jagannadha Sutradharudu Teki <[email protected]>
|
|
- line over 80 characters
- foo * bar -> foo *bar
- removed unnecessary for single statement blocks.
Signed-off-by: Jagannadha Sutradharudu Teki <[email protected]>
|
|
Signed-off-by: Wolfgang Denk <[email protected]>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <[email protected]>
|
|
Flag status register polling is required for micron 512Mb flash
devices onwards, for performing erase/program operations.
Like polling for WIP(Write-In-Progress) bit in read status register,
spi_flash_cmd_wait_ready will poll for PEC(Program-Erase-Control)
bit in flag status register.
Signed-off-by: Jagannadha Sutradharudu Teki <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Add support for Numonyx N25Q1024A SPI flash.
Signed-off-by: Jagannadha Sutradharudu Teki <[email protected]>
|
|
Add support for Numonyx N25Q1024 SPI flash.
Signed-off-by: Jagannadha Sutradharudu Teki <[email protected]>
|
|
Add support for Numonyx N25Q512A SPI flash.
Signed-off-by: Jagannadha Sutradharudu Teki <[email protected]>
|
|
Add support for Numonyx N25Q512 SPI flash.
Signed-off-by: Jagannadha Sutradharudu Teki <[email protected]>
|
|
Rather than each device having its own way to allocate a SPI flash
structure, use the new allocation function everywhere. This will make it
easier to extend the interface without breaking devices.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add support for Numonyx N25Q256A SPI flash.
Signed-off-by: Jagannadha Sutradharudu Teki <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
|
|
Add support for Numonyx N25Q32A SPI flash.
Signed-off-by: Jagannadha Sutradharudu Teki <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
|
|
Add support for Numonyx N25Q32 SPI flash.
Signed-off-by: Jagannadha Sutradharudu Teki <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
|
|
Add support for Numonyx N25Q64A SPI flash.
Signed-off-by: Jagannadha Sutradharudu Teki <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
|
|
Add support for Numonyx N25Q064 SPI flash.
Signed-off-by: Jagannadha Sutradharudu Teki <[email protected]>
|
|
Add support for Numonyx N25Q128A SPI flash.
Signed-off-by: Michal Simek <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
Adds support for Numonyx's N25Q128 SPI flash. These devices
are used on (among others) Avnet Spartan-6 LX9 micro-evaluation
boards. Tested with "sf" commands and CONFIG_ENV_IS_IN_SPI_FLASH.
Signed-off-by: Stephan Linz <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
There are more than the M25Pxx serial flashs that can be
used with the stmicro driver, for example: the M25PXxx or
N25Qxx serie. All these chips have burned in the original
stmicro manufacture id 0x20 together with a standard
two-byte signature.
In preperation to support all these chips the stmicro driver
have to decode the full two-byte signature.
Signed-off-by: Stephan Linz <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
Note: because 4-byte addressing is not supported yet,
at the moment only the first 16MiB of the device are available.
Signed-off-by: Jérôme Carretero <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
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 <[email protected]>
|
|
I imagine much of these constants are due to copy & pasting previous
drivers rather than an actual reflection of the hardware layout. At
any rate, inline the info that we don't care about externally as it
shrinks things nicely.
Signed-off-by: Mike Frysinger <[email protected]>
|
|
In an effort to unify the spi flash drivers further, drop all the
unused and/or duplicate command defines.
Signed-off-by: Mike Frysinger <[email protected]>
|
|
These defines are used in only one place, so just inline them.
Signed-off-by: Mike Frysinger <[email protected]>
|
|
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 <[email protected]>
|
|
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 <[email protected]>
|
|
Every spi flash uses the same write enable command, so unify this in
the common code.
Signed-off-by: Mike Frysinger <[email protected]>
|
|
No need for these to be exported as they are only accessed indirectly
via function pointers.
Signed-off-by: Mike Frysinger <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
Signed-off-by: Mike Frysinger <[email protected]>
|
|
Signed-off-by: Mike Frysinger <[email protected]>
|
|
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 <[email protected]>
|
|
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 <[email protected]>
|
|
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 <[email protected]>
Acked-by: Mike Frysinger <[email protected]>
|
|
Reported-by: Peter Gombos <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
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 <[email protected]>
CC: Jason McMullan <[email protected]>
CC: TsiChung Liew <[email protected]>
|
|
Signed-off-by: Mike Frysinger <[email protected]>
CC: Haavard Skinnemoen <[email protected]>
|
|
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 <[email protected]>
Acked-by: Haavard Skinnemoen <[email protected]>
CC: Jason McMullan <[email protected]>
CC: TsiChung Liew <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
Acked-by: Haavard Skinnemoen <[email protected]>
|
|
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 <[email protected]>
|
|
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
|
|
Add MTD SPI Flash support for M25P16, M25P20, M25P32,
M25P40, M25P64, M25P80, M25P128.
Signed-off-by: Jason McMullan <[email protected]>
Signed-off-by: TsiChung Liew <[email protected]>
|