| Age | Commit message (Collapse) | Author |
|
Also if minimum ecc requirment is bigger then what we support, then just
use our maxium pmecc support.
But it is not safe, so we'll output a warning about this.
Signed-off-by: Josh Wu <[email protected]>
Acked-by: Scott Wood <[email protected]>
Reviewed-by: Andreas Bießmann <[email protected]>
|
|
1. add the pmecc register mapping for sama5d2.
2. add the pmecc error location register mapping for sama5d2.
3. add some new field that is different from old ip.
4. add sama5d2 pmecc ip version number.
Signed-off-by: Josh Wu <[email protected]>
Reviewed-by: Andreas Bießmann <[email protected]>
|
|
As atmel_nand_ecc.h is sync with v4.1 kernel, which adds the
PMECC_OOB_RESERVED_BYTES. So use it in the driver.
Signed-off-by: Josh Wu <[email protected]>
Reviewed-by: Andreas Bießmann <[email protected]>
Signed-off-by: Wenyou Yang <[email protected]>
|
|
Also align the open parenthesis.
Signed-off-by: Josh Wu <[email protected]>
Signed-off-by: Wenyou Yang <[email protected]>
Reviewed-by: Andreas Bießmann <[email protected]>
|
|
Since ecc_{strength,step}_ds is introduced in nand_chip structure for
minimum ecc requirements. So we can use them directly and remove our
own get_onfi_ecc_param function.
Signed-off-by: Josh Wu <[email protected]>
Reviewed-by: Andreas Bießmann <[email protected]>
Signed-off-by: Wenyou Yang <[email protected]>
|
|
|
|
BUILD_BUG_* macros have been defined in several headers. It would
be nice to collect them in include/linux/bug.h like Linux.
This commit is cherry-picking useful macros from include/linux/bug.h
of Linux 4.4.
I did not import BUILD_BUG_ON_MSG() because it would not work if it
is used with include/common.h in U-Boot. I'd like to postpone it
until the root cause (the "error()" macro in include/common.h causes
the name conflict with "__attribute__((error()))") is fixed.
Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
Update GPMI NAND driver and BCH head file to support i.MX7
Signed-off-by: Peng Fan <[email protected]>
Cc: Stefano Babic <[email protected]>
|
|
This function currently searches the entire device tree for a node that
it thinks is relevant. But the node is known and is passed in. Correct the
code and enable it only with driver model, since only driver-model boards
will use it.
This avoids bringing in a large number of strings from fdtdec.
Signed-off-by: Simon Glass <[email protected]>
|
|
In a number of places we had wordings of the GPL (or LGPL in a few
cases) license text that were split in such a way that it wasn't caught
previously. Convert all of these to the correct SPDX-License-Identifier
tag.
Signed-off-by: Tom Rini <[email protected]>
|
|
For SPL we don't really need sprintf() and with tiny-printf this is not
available. Allow this to be dropped in SPL when using tiny-printf.
Signed-off-by: Simon Glass <[email protected]>
|
|
SLOW, FAST, DUAL, DUAL_IO, QUAD, QUAD_IO changed order to
SLOW, FAST, DUAL, QUAD, DUAL_IO, QUAD_IO
Cc: Simon Glass <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Siva Durga Prasad Paladugu <[email protected]>
Tested-by: Jagan Teki <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
Since spi rx mode macro's are renamed to simple and
meaninfull, this patch will rename the respective
structure members.
Cc: Simon Glass <[email protected]>
Cc: Bin Meng <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Siva Durga Prasad Paladugu <[email protected]>
Tested-by: Mugunthan V N <[email protected]>
Tested-by: Jagan Teki <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
While setting quad bit on spansion, macronix code
is writing only particular quad bit this may give
wrong functionality with other register bits,
So this patch fix the issue where it with write
previous read reg status along particular quad bit.
Cc: Vignesh R <[email protected]>
Cc: Mugunthan V N <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Bin Meng <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Siva Durga Prasad Paladugu <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
One macronix quad bit set using SR, it's good to
read back and check the written bit and also if
it's already been set check for the bit and return.
Cc: Vignesh R <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Bin Meng <[email protected]>
Tested-by: Mugunthan V N <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
One spansion quad bit set using CR, it's good to
read back and check the written bit and also if
it's already been set check for the bit and return.
Cc: Vignesh R <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Bin Meng <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Siva Durga Prasad Paladugu <[email protected]>
Tested-by: Mugunthan V N <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
Setting up quad bit for micron devices need to do the
same way as other flash devices like spansion, winbond
etc does using enhanced volatile config register so this
patch adds this support instead of printing "QEB is volatile"
Cc: Simon Glass <[email protected]>
Cc: Bin Meng <[email protected]>
Cc: Peter Pan <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Siva Durga Prasad Paladugu <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
Used BIT macro like 1 << nr as BIT(nr) where nr is 0...n
Reviewed-by: Bin Meng <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
- Tab space
- Place all read commands at one place.
- Re-arrange write commands.
Reviewed-by: Bin Meng <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
Use direct call to device_remove instead of exctra
spi_flash_remove defination.
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
bar_end gives more meaningfull compared to bank_end and
spi_flash_write_bar uses bar_end so replaced bank_end with
bar_end in spi_flash_read_bar
Signed-off-by: Jagan Teki <[email protected]>
|
|
Since quad_mode functions are local to spi flash core,
rename them to a meaningful and readable names.
Signed-off-by: Jagan Teki <[email protected]>
|
|
Since spi_read_cmds_array is used locally in
spi_flash_scan, so move array to locally used
function instead of defining global array.
Tested-by: Jagan Teki <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
Since SPI_TX_* are spi_slave{} members so use spi protocol
notation instead spi flash programming, like
SPI_TX_BP => SPI_TX_BYTE
SPI_TX_QPP => SPI_TX_QUAD
Cc: Simon Glass <[email protected]>
Tested-by: Jagan Teki <[email protected]>
Tested-by: Bin Meng <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
Used mode member from spi_slave{} instead of op_mode_tx.
Cc: Simon Glass <[email protected]>
Tested-by: Jagan Teki <[email protected]>
Tested-by: Bin Meng <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
For better code readabilty, get the spi pointer from
spi_flash{} locally and use it instead of direct
dereferring spi pinter as flash->spi->*
Tested-by: Jagan Teki <[email protected]>
Tested-by: Bin Meng <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
|
|
stm_is_locked_sr() takes the status register (SR) value as the last
parameter, not the second.
Based on a patch from Brian Norris for the linux kernel:
http://git.infradead.org/linux-mtd.git/commit/a32d5b726ff8cf32bf491522b0ac8ae2545a063e
Signed-off-by: Fabio Estevam <[email protected]>
Reviewed-by: Jagan Teki <[email protected]>
|
|
drivers/mtd/ubi/io.c:1354:3: error: 'dump_len' undeclared (first use in
this function)
dump_len = max_t(int, 128, len - i);
Signed-off-by: Ladislav Michl <[email protected]>
|
|
Allow ctrl-c to abort the erase ops.
Signed-off-by: Thomas Chou <[email protected]>
|
|
Show sector erase progress with dot and comma.
Signed-off-by: Thomas Chou <[email protected]>
|
|
Skip erase if the sector is blank. The sector erase is slow, and
may take 0.7 sec typically or up to 3 sec worst-case.
Signed-off-by: Thomas Chou <[email protected]>
|
|
If the erase fails, fail_addr might indicate exactly which block
failed. If fail_addr = MTD_FAIL_ADDR_UNKNOWN, the failure was not
at the device level or was not specific to any particular block.
Signed-off-by: Thomas Chou <[email protected]>
|
|
Erase is an asynchronous operation. Device drivers are supposed
to call instr->callback() whenever the operation completes, even
if it completes with a failure.
Signed-off-by: Thomas Chou <[email protected]>
|
|
Initialize instr.mtd in flash_erase(). This fixes the system
hang issue when CONFIG_MTD_PARTITIONS is selected.
Signed-off-by: Thomas Chou <[email protected]>
Acked-by: Marek Vasut <[email protected]>
|
|
Since all spi-flash core operations are moved into
sf_ops.c then it's better to renamed as spi-flash.c
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
Used static for file-scope functions in sf_probe.c
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
Since spi_slave is a spi pointer in spi_flash{} then assign
spi_slave{} pointer to flash->spi and remove spi_slave
pointer argument to
- spi_flash_probe_slave
- spi_flash_scan
Tested-by: Jagan Teki <[email protected]>
Tested-by: Bin Meng <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
For assigning read_bar commands in spansion case, break
is missing this patch add that break.
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
SST parts added on sf_params.c supports both SST_WR which consits
of both BP and WP and there is a spi controller ich which supports
only BP so the relevent _write hook set based on "slave->op_mode_tx"
hence there is no respective change required from flash side hance
removed these.
Tested-by: Bin Meng <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
Removed unneeded header includes in sf_ops and sf_probe
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
Using macro's for flash power up read-only access code
leads wrong behaviour hence use idcode0 for runtime
detection, hence the flash which require this functionality
gets detected at runtime.
Tested-by: Jagan Teki <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
Most of the register access function are static,
so used simple name to represent each.
Tested-by: Jagan Teki <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
This patch removes unneeded ifdef and fixed accordingly.
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
Use static for file-scope functions and removed
them from header files.
Tested-by: Jagan Teki <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
- Move bar read code below the bar write hance both
at once place, hence it easy for #ifdef macro only
once and readable.
- Move read_cmd_array at top
Tested-by: Jagan Teki <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
read_id code is related to spi_flash stuff
hence moved to sf_ops.
Tested-by: Jagan Teki <[email protected]>
Tested-by: Bin Meng <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
Intension is that sf_ops should deals all spi_flash
related stuff and sf_probe (which should renamed future)
should be an interface layer for spi_flash versus spi drivers.
sf_ops => spi_flash interface
sf_probe => interface layer vs spi_flash(sf_probe) to spi drivers
Tested-by: Jagan Teki <[email protected]>
Tested-by: Bin Meng <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
Rename spi_flash_validate_params to spi_flash_scan
as this code not only deals with params setup but
also configure all spi_flash attributes.
And also moved all flash related code into
spi_flash_scan for future functionality addition.
Tested-by: Jagan Teki <[email protected]>
Tested-by: Bin Meng <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
|
|
|