21 Apr, 2017
1 commit
-
commit 6e1eb089be0440477d030846087b03dfbebd4b10 upstream.
Various commands to NAND flash results in the NAND flash becoming busy.
For those commands the SoC should wait until the NAND indicates it is
no longer busy before sending further commands. However, there is a delay
between the time the SoC sends its last command and when the NAND flash
sets its Ready/Busy Pin. This delay (tWB) must be respected or the SoC may
falsely assume the flash is ready when in reality it just hasn't had enough
time to indicate that it is busy.Properly delaying by tWB is already done for nand_command/nand_command_lp
in nand_base.c including the version of it in the Linux kernel. Therefore,
this patch brings the handling of tWB delay inline to nand_base.cAcked-by: Roger Quadros
Signed-off-by: Franklin S Cooper Jr
[trini: Reformat comments slightly]
Signed-off-by: Tom Rini
14 Feb, 2017
4 commits
-
There is no for Keystone so
don't include it for Keystone.Signed-off-by: Roger Quadros
Signed-off-by: Grygorii Strashko -
adopt omap_gpmc driver to driver model.
Signed-off-by: Mugunthan V N
Signed-off-by: Grygorii Strashko -
Implement a NAND uclass so that the NAND devices can be
accessed via the DM framework.Signed-off-by: Mugunthan V N
Signed-off-by: Grygorii Strashko -
nand_info is used all over the file so abstract it with
get_nand_dev_by_index() which will help for DM conversion.Signed-off-by: Mugunthan V N
Signed-off-by: Grygorii Strashko
04 Jan, 2017
1 commit
-
SPL from nand will print 'NAND' in boot_from_devices based on
the image_loader name, remove the extra 'NAND ' in mxs_nand_spl driver.Original behaviour:
-------------------
U-Boot SPL 2017.01-rc2-gf84dd8b (Jan 02 2017 - 22:24:19)
Trying to boot from NANDNAND : 512 MiBAfter the fix:
-------------
U-Boot SPL 2017.01-rc2-gf84dd8b-dirty (Jan 02 2017 - 23:17:00)
Trying to boot from NAND: 512 MiBCc: Tom Rini
Signed-off-by: Jagan Teki
16 Dec, 2016
1 commit
-
This reverts commit c56ae7519f141523ba1248b22b5b5169b21772fe.
Once the 'Quad Enable' bit is cleared in their Enhanced Volatile
Configuration Register (EVCR), Micron memories expect ALL commands to use
the SPI 4-4-4 protocol. Commands using SPI 1-y-z protocols are no longer
accepted.Within the reverted commit, the write_evcr() function is implemented using
the spi_flash_write_common(), which is a shortcut for the
[ spi_flash_cmd_write_enable(), spi_flash_cmd_write(),
spi_flash_cmd_wait_ready() ] sequence.Since the internal state of the Micron memory has been changed when the
spi_flash_cmd_write() function completes, the later call of the
spi_flash_cmd_wait_ready() function fails.Indeed the SPI controller driver is not aware of the SPI protocol switch.
Further patches will fix the support of Micron QSPI memories.
Signed-off-by: Cyrille Pitchen
[Rebase on master, use JEDEC_MFR(info) in place of idcode0]
Signed-off-by: Jagan Teki
15 Dec, 2016
2 commits
-
As long as the memory mapped size specifeid in the DT is the same or
bigger than the device size, it will work. So do not force the sizes
to be identical.Signed-off-by: Phil Edworthy
Reviewed-by: Jagan Teki -
In spi_flash_scan, 'ret' is initialled to -1, but 'ret' is not always
used to store a return value, in that case, even when the function
succeed, an error (-1) will be returned.
Lets just return 0 if we hit the end of the function.Signed-off-by: Fabien Parent
Reviewed-by: Jagan Teki
09 Dec, 2016
1 commit
-
It is useful to name each method so that we can print out this name when
using the method. Currently this happens using a separate function. In
preparation for unifying this, add a name to each method.The name is only available if we have libcommon support (i.e can use
printf()).Signed-off-by: Simon Glass
05 Dec, 2016
1 commit
-
The indentation is misleading here and suggests that the write command
will be only executed in the else clause.
It seems like this is not intended, so fix the indentation to avoid
both compiler warnings and puzzled readers.Pointed out by GCC 6.2's -Wmisleading-indentation warning.
Signed-off-by: Andre Przywara
Reviewed-by: Stefan Roese
04 Dec, 2016
1 commit
-
The OMAPL138-LCD board uses a NAND chip with a 16 bits bus. Add
support into the davinci driver for 16 bit bus NAND chips.Signed-off-by: Fabien Parent
Reviewed-by: Tom Rini
29 Nov, 2016
1 commit
-
Add the description of the Toshiba TC58NVG2S0H SLC nand to the nand_ids
table so we can use the NAND ECC infos and the ONFI timings.Signed-off-by: Boris Brezillon
Signed-off-by: Maxime Ripard
Reviewed-by: Hans de Goede
Signed-off-by: Hans de Goede
26 Nov, 2016
1 commit
-
Some boards may want to use these subsystems with of-platdata in SPL. Add
support for this by avoiding any device tree access in this case.Signed-off-by: Simon Glass
22 Nov, 2016
1 commit
-
This commit adds support for the Macronix MX66U51235F,
MX66L1G45G and Micron MT25QU02G, MT25QL02G flash parts.Signed-off-by: Radu Bacrau
Cc: Chin Liang See
Cc: Radu Bacrau
[Update proper commit header and 80-line cut on body]
Reviewed-by: Jagan Teki
21 Nov, 2016
1 commit
-
Somehow an int returning function without a return statement sneaked
in, fix it.
Also fix some whitespace damage on the way.Signed-off-by: Andre Przywara
Reviewed-by: Jagan Teki
19 Nov, 2016
6 commits
-
s25fs512s and s25fl512s_256k have common id information
till 5 bytes and 6th byte have different family id
like FS and FL-S as 0x81 and 0x80.Reported-by: Vignesh R
Signed-off-by: Jagan Teki -
- fix single line comments
- remove unneeded spaces
- ascending order of include files
- rename SPI DATAFLASH to dataflash
- rename SPI DataFlash to dataflash
- return NULL replaced with error codeCc: Bin Meng
Cc: York Sun
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki -
This patch fixed the add_dataflash return logic,
so-that it can handle both jedec and older chips
same as Linux.Cc: Bin Meng
Cc: York Sun
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki -
Flash id detection should be the first step to enumerate
the connected flash on the board, once ie done checking
with respective id codes locally in the driver all this
should be part of jedec_probe instead of id detection and
validated through flash_info{} table separatly.Cc: Bin Meng
Cc: York Sun
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki -
dataflash doesn't require options, memory_map from spi.
Cc: Bin Meng
Cc: Simon Glass
Cc: York Sun
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki -
Dual flash code in spi are usually take the spi controller
to work with dual connected flash devices. Usually these
dual connection operation's are referred to flash controller
protocol rather with spi controller protocol, these are still
present in flash side for the usage of spi-nor controllers.So, this patch remove the dual_flash options or flags in sf
which are triggered from spi controller side.Cc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki
18 Nov, 2016
15 commits
-
spi_flash_write_bar-> write_bar
spi_flash_write_bar -> read_bar
spi_flash_cmd_wait_ready -> spi_flash_wait_till_readyCc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki -
Use small 'd' in s25s512s ext_jedec
Cc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki
Reviewed-by: Siva Durga Prasad Paladugu -
For readability use small letter's with flash name.
Cc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki
Tested-by: Jagan Teki
Reviewed-by: Siva Durga Prasad Paladugu -
Now the flash params table as renamed to spi_flash_ids structure,
so rename the sf_params.c to spi_flash_ids.c and remove the legacy.Cc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Signed-off-by: Jagan Teki
Reviewed-by: Jagan Teki
Tested-by: Jagan Teki
Reviewed-by: Siva Durga Prasad Paladugu -
Remove unneeded/non-meaningful commit message on
params and flash.Cc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki
Reviewed-by: Siva Durga Prasad Paladugu -
In spansion S25FS-S family the physical sectors are grouped as
normal and parameter sectors. Parameter sectors are 4kB in size
with 8 set located at the bottom or top address of a device.
Normal sectors are similar to other flash family with sizes of
64kB or 32 kB.To erase whole flash using sector erase(D8h or DCh) won't effect
the parameter sectors, so in order to erase these we must use 4K
sector erase commands (20h or 21h) separately.So better to erase the whole flash using 4K sector erase instead
of detecting these family parts again and do two different erase
operations.For this:
- Removed spansion_s25fss_disable_4KB_erase code
- Add SECT_4K for S25FS512S chipCc: Yunhui Cui
Cc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Cc: Michael Trimarchi
Cc: Siva Durga Prasad Paladugu
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki
Tested-by: Jagan Teki -
Add Spansion S25FS256S_64K spi flash to the list of spi_flash_ids.
In spansion S25FS-S family the physical sectors are grouped as
normal and parameter sectors. Parameter sectors are 4kB in size
with 8 set located at the bottom or top address of a device.
Normal sectors are similar to other flash family with sizes of
64kB or 32 kB.To erase whole flash using sector erase(D8h or DCh) won't effect
the parameter sectors, so in order to erase these we must use 4K
sector erase commands (20h or 21h) separately.So better to erase the whole flash using 4K sector erase instead
of detecting these family parts again and do two different erase
operations.Cc: Yunhui Cui
Cc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Cc: Michael Trimarchi
Cc: Siva Durga Prasad Paladugu
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki -
INFO6 is for tabulating 6 byte flash parts, Ex: S25FS256S_64K
Cc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki
Tested-by: Jagan Teki -
So, now SPI_FLASH_ID_MAX_LEN is 6 bytes useful for
few spansion flash families S25FS-SCc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki
Tested-by: Jagan Teki
Reviewed-by: Siva Durga Prasad Paladugu -
Add id length of 5 bytes numerical value to macro.
Cc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki
Tested-by: Jagan Teki -
Rename nr_sectors as n_sectors to sync with Linux.
Cc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki
Tested-by: Jagan Teki
Reviewed-by: Siva Durga Prasad Paladugu -
- Proper tabs spaces
- Removed unnecessary
- Add comments in spi_flash_info members
- Add comments for spi_flash_info.flagsCc: Simon Glass
Cc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Signed-off-by: Jagan Teki
Reviewed-by: Siva Durga Prasad Paladugu
Reviewed-by: Jagan Teki -
Instead of extracting id's separately better
to use JEDEC_MFR|ID for code simplicity.Cc: Bin Meng
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki
Tested-by: Jagan Teki -
Simplify the flash_lock ops detection code and added
meaningful comment.Cc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Signed-off-by: Jagan Teki
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki
Tested-by: Jagan Teki -
INFO macro make flash table entries more adjustable like
adding new flash_info attributes, update ID length bytes
and so on and more over it will sync to Linux way of defining
flash_info attributes.- Add JEDEC_ID
- Add JEDEC_EXT macro
- Add JEDEC_MFR
- spi_flash_params => spi_flash_info
- params => infoCc: Simon Glass
Cc: Bin Meng
Cc: York Sun
Cc: Vignesh R
Cc: Mugunthan V N
Cc: Michal Simek
Cc: Siva Durga Prasad Paladugu
Reviewed-by: Jagan Teki
Tested-by: Jagan Teki
Signed-off-by: Jagan Teki
15 Nov, 2016
2 commits
-
Clear ecc ON bit while sending read command as all types
of read command(like reading spare) doesnt need ECC to be
enabled. It has been anyway taken care in other places
whereever required using arasan_nand_enable_ecc().Signed-off-by: Siva Durga Prasad Paladugu
Signed-off-by: Michal Simek -
Add nand flash controller driver support for zynq SoC.
Signed-off-by: Siva Durga Prasad Paladugu
Signed-off-by: Michal Simek
26 Oct, 2016
1 commit
-
Added kconfig for NAND_MXS driver.
Cc: Scott Wood
Cc: Simon Glass
Cc: Fabio Estevam
Cc: Stefano Babic
Cc: Peng Fan
Cc: Matteo Lisi
Cc: Michael Trimarchi
Signed-off-by: Jagan Teki