Revision tags: v00.04.15, v00.04.14, v00.04.13, v00.04.12, v00.04.11, v00.04.10, v00.04.09, v00.04.08, v00.04.07, v00.04.06, v00.04.05, v00.04.04, v00.04.03, v00.04.02, v00.04.01, v00.04.00, v2021.04, v00.03.03, v2021.01, v2020.10, v2020.07, v00.02.13, v2020.04, v2020.01, v2019.10, v00.02.05, v00.02.04, v00.02.03, v00.02.02, v00.02.01, v2019.07, v00.02.00, v2019.04 |
|
#
592cd5de |
| 02-Oct-2018 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://git.denx.de/u-boot-spi
This is the PR for SPI-NAND changes along with few spi changes.
[trini: Re-sync changes for ls1012afrwy_qspi*_defconfig] Signed-off-by: Tom Rin
Merge branch 'master' of git://git.denx.de/u-boot-spi
This is the PR for SPI-NAND changes along with few spi changes.
[trini: Re-sync changes for ls1012afrwy_qspi*_defconfig] Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
f8678728 |
| 16-Aug-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
mtd: nand: Pass mode information to nand_page_io_req
The NAND sub-layers are likely to need the MTD_OPS_XXX mode information in order to decide if they should enable/disable ECC or how they should p
mtd: nand: Pass mode information to nand_page_io_req
The NAND sub-layers are likely to need the MTD_OPS_XXX mode information in order to decide if they should enable/disable ECC or how they should place the OOB bytes in the provided OOB buffer.
Add a field to nand_page_io_req to pass this information.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
show more ...
|
#
b95db8d3 |
| 16-Aug-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
mtd: nand: Add core infrastructure to deal with NAND devices
Add an intermediate layer to abstract NAND device interface so that some logic can be shared between SPI NANDs, parallel/raw NANDs, OneNA
mtd: nand: Add core infrastructure to deal with NAND devices
Add an intermediate layer to abstract NAND device interface so that some logic can be shared between SPI NANDs, parallel/raw NANDs, OneNANDs, ...
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com>
show more ...
|
Revision tags: v2018.07, v2018.03, v2018.01 |
|
#
74a48184 |
| 28-Nov-2017 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-uniphier
|
#
e6001371 |
| 21-Nov-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
mtd: nand: introduce NAND_ROW_ADDR_3 flag
Several drivers check ->chipsize to see if the third row address cycle is needed. Instead of embedding magic sizes such as 32MB, 128MB in drivers, introduc
mtd: nand: introduce NAND_ROW_ADDR_3 flag
Several drivers check ->chipsize to see if the third row address cycle is needed. Instead of embedding magic sizes such as 32MB, 128MB in drivers, introduce a new flag NAND_ROW_ADDR_3 for clean-up. Since nand_scan_ident() knows well about the device, it can handle this properly. The flag is set if the row address bit width is greater than 16.
Delete comments such as "One more address cycle for ..." because intention is now clear enough from the code.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Wenyou Yang <wenyou.yang@microchip.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: 14157f861437ebe2d624b0a845b91bbdf8ca9a2d]
show more ...
|
#
a01549ba |
| 21-Nov-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
mtd: nand: add a shorthand to generate nand_ecc_caps structure
struct nand_ecc_caps was designed as flexible as possible to support multiple stepsizes (like sunxi_nand.c).
So, we need to write mult
mtd: nand: add a shorthand to generate nand_ecc_caps structure
struct nand_ecc_caps was designed as flexible as possible to support multiple stepsizes (like sunxi_nand.c).
So, we need to write multiple arrays even for the simplest case. I guess many controllers support a single stepsize, so here is a shorthand macro for the case.
It allows to describe like ...
NAND_ECC_CAPS_SINGLE(denali_pci_ecc_caps, denali_calc_ecc_bytes, 512, 8, 15);
... instead of
static const int denali_pci_ecc_strengths[] = {8, 15}; static const struct nand_ecc_step_info denali_pci_ecc_stepinfo = { .stepsize = 512, .strengths = denali_pci_ecc_strengths, .nstrengths = ARRAY_SIZE(denali_pci_ecc_strengths), }; static const struct nand_ecc_caps denali_pci_ecc_caps = { .stepinfos = &denali_pci_ecc_stepinfo, .nstepinfos = 1, .calc_ecc_bytes = denali_calc_ecc_bytes, };
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: a03c60178c181767ecfb26fb311a88742d228118]
show more ...
|
#
470c29d1 |
| 21-Nov-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
mtd: nand: add generic helpers to check, match, maximize ECC settings
Driver are responsible for setting up ECC parameters correctly. Those include: - Check if ECC parameters specified (usually by
mtd: nand: add generic helpers to check, match, maximize ECC settings
Driver are responsible for setting up ECC parameters correctly. Those include: - Check if ECC parameters specified (usually by DT) are valid - Meet the chip's ECC requirement - Maximize ECC strength if NAND_ECC_MAXIMIZE flag is set
The logic can be generalized by factoring out common code.
This commit adds 3 helpers to the NAND framework: nand_check_ecc_caps - Check if preset step_size and strength are valid nand_match_ecc_req - Match the chip's requirement nand_maximize_ecc - Maximize the ECC strength
To use the helpers above, a driver needs to provide: - Data array of supported ECC step size and strength - A hook that calculates ECC bytes from the combination of step_size and strength.
By using those helpers, code duplication among drivers will be reduced.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: 2c8f8afa7f92acb07641bf95b940d384ed1d0294]
show more ...
|
#
52cde35b |
| 21-Nov-2017 |
Boris Brezillon <boris.brezillon@free-electrons.com> |
mtd: nand: Pass the CS line to ->setup_data_interface()
Some NAND controllers can assign different NAND timings to different CS lines. Pass the CS line information to ->setup_data_interface() so tha
mtd: nand: Pass the CS line to ->setup_data_interface()
Some NAND controllers can assign different NAND timings to different CS lines. Pass the CS line information to ->setup_data_interface() so that the NAND controller driver knows which CS line is concerned by the setup_data_interface() request.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Linux commit: 104e442a67cfba4d0cc982384761befb917fb6a1] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
#
436fb2b8 |
| 21-Nov-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
mtd: nand: allow drivers to request minimum alignment for passed buffer
In some cases, nand_do_{read,write}_ops is passed with unaligned ops->datbuf. Drivers using DMA will be unhappy about unalign
mtd: nand: allow drivers to request minimum alignment for passed buffer
In some cases, nand_do_{read,write}_ops is passed with unaligned ops->datbuf. Drivers using DMA will be unhappy about unaligned buffer.
The new struct member, buf_align, represents the minimum alignment the driver require for the buffer. If the buffer passed from the upper MTD layer does not have enough alignment, nand_do_*_ops will use bufpoi.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: 477544c62a84d3bacd9f90ba75ffc16c04d78071]
show more ...
|
#
94b50a8a |
| 21-Nov-2017 |
Boris Brezillon <boris.brezillon@free-electrons.com> |
mtd: nand: Drop the ->errstat() hook
The ->errstat() hook is no longer implemented NAND controller drivers. Get rid of it before someone starts abusing it.
Signed-off-by: Boris Brezillon <boris.bre
mtd: nand: Drop the ->errstat() hook
The ->errstat() hook is no longer implemented NAND controller drivers. Get rid of it before someone starts abusing it.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Linux commit: 7d135bcced20be2b50128432c5426a7278ec4f6d] [masahiro: modify davinci_nand.c for U-Boot] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
#
4d75596e |
| 21-Nov-2017 |
Boris Brezillon <boris.brezillon@free-electrons.com> |
mtd: nand: Drop unused cached programming support
Cached programming is always skipped, so drop the associated code until we decide to really support it.
Signed-off-by: Boris Brezillon <boris.brezi
mtd: nand: Drop unused cached programming support
Cached programming is always skipped, so drop the associated code until we decide to really support it.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Linux commit: 0b4773fd1649e0d418275557723a7ef54f769dc9] [masahiro: modify davinci_nand.c for U-Boot] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
#
1fb87de8 |
| 21-Nov-2017 |
Marc Gonzalez <marc_gonzalez@sigmadesigns.com> |
mtd: nand: Support controllers with custom page
If your controller already sends the required NAND commands when reading or writing a page, then the framework is not supposed to send READ0 and SEQIN
mtd: nand: Support controllers with custom page
If your controller already sends the required NAND commands when reading or writing a page, then the framework is not supposed to send READ0 and SEQIN/PAGEPROG respectively.
Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Linux commit: 3371d663bb4579f1b2003a92162edd6d90edd089] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
#
6f84b26b |
| 21-Nov-2017 |
Boris Brezillon <boris.brezillon@free-electrons.com> |
mtd: nand: Add a few more timings to nand_sdr_timings
Add the tR_max, tBERS_max, tPROG_max and tCCS_min timings to the nand_sdr_timings struct. Assign default/safe values for the statically defined
mtd: nand: Add a few more timings to nand_sdr_timings
Add the tR_max, tBERS_max, tPROG_max and tCCS_min timings to the nand_sdr_timings struct. Assign default/safe values for the statically defined timings, and extract them from the ONFI parameter table if the NAND is ONFI compliant.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> [Linux commit: 204e7ecd47e26cc12d9e8e8a7e7a2eeb9573f0ba Fixup commit: 6d29231000bbe0fb9e4893a9c68151ffdd3b5469] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
#
3d841b32 |
| 21-Nov-2017 |
Boris Brezillon <boris.brezillon@free-electrons.com> |
mtd: nand: Fix data interface configuration logic
When changing from one data interface setting to another, one has to ensure a specific sequence which is described in the ONFI spec.
One of these c
mtd: nand: Fix data interface configuration logic
When changing from one data interface setting to another, one has to ensure a specific sequence which is described in the ONFI spec.
One of these constraints is that the CE line has go high after a reset before a command can be sent with the new data interface setting, which is not guaranteed by the current implementation.
Rework the nand_reset() function and all the call sites to make sure the CE line is asserted and released when required.
Also make sure to actually apply the new data interface setting on the first die.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Fixes: d8e725dd8311 ("mtd: nand: automate NAND timings selection") Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> [Linux commit: 73f907fd5fa56b0066d199bdd7126bbd04f6cd7b] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
#
27c4792c |
| 21-Nov-2017 |
Boris Brezillon <boris.brezillon@free-electrons.com> |
mtd: nand: automate NAND timings selection
The NAND framework provides several helpers to query timing modes supported by a NAND chip, but this implies that all NAND controller drivers have to imple
mtd: nand: automate NAND timings selection
The NAND framework provides several helpers to query timing modes supported by a NAND chip, but this implies that all NAND controller drivers have to implement the same timings selection dance. Also currently NAND devices can be resetted at arbitrary places which also resets the timing for ONFI chips to timing mode 0.
Provide a common logic to select the best timings based on ONFI or ->onfi_timing_mode_default information. Hook this into nand_reset() to make sure the new timing is applied each time during a reset.
NAND controller willing to support timings adjustment should just implement the ->setup_data_interface() method.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> [Linux commit: d8e725dd831186a3595036b2b1df9f68cbc6efa3] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
#
b893e833 |
| 21-Nov-2017 |
Sascha Hauer <s.hauer@pengutronix.de> |
mtd: nand: Expose data interface for ONFI mode 0
The nand layer will need ONFI mode 0 to use it as timing mode before and right after reset.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Sig
mtd: nand: Expose data interface for ONFI mode 0
The nand layer will need ONFI mode 0 to use it as timing mode before and right after reset.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Linux commit: 6e1f9708dbf3c50a8da93c1952a01a7a2acb5e66] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
#
46deff57 |
| 21-Nov-2017 |
Sascha Hauer <s.hauer@pengutronix.de> |
mtd: nand: convert ONFI mode into data interface
struct nand_data_interface is the designated type to pass to the NAND drivers to configure the timing. To simplify further patches convert the onfi_s
mtd: nand: convert ONFI mode into data interface
struct nand_data_interface is the designated type to pass to the NAND drivers to configure the timing. To simplify further patches convert the onfi_sdr_timings array from type struct nand_sdr_timings nand_data_interface.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Linux commit: b1dd3ca203fccd111926c3f6ac59bf903ec62b05] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
#
01042499 |
| 21-Nov-2017 |
Sascha Hauer <s.hauer@pengutronix.de> |
mtd: nand: Introduce nand_data_interface
Currently we have no data structure to fully describe a NAND timing. We only have struct nand_sdr_timings for NAND timings in SDR mode, but nothing for DDR m
mtd: nand: Introduce nand_data_interface
Currently we have no data structure to fully describe a NAND timing. We only have struct nand_sdr_timings for NAND timings in SDR mode, but nothing for DDR mode and also no container to store both types of timing. This patch adds struct nand_data_interface which stores the timing type and a union of different timings. This can be used to pass to drivers in order to configure the timing. Add kerneldoc for struct nand_sdr_timings while touching it anyway.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Linux commit: eee64b700e26b9bcc6fce024681c31f5e12271fc] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
#
1728eb57 |
| 21-Nov-2017 |
Sascha Hauer <s.hauer@pengutronix.de> |
mtd: nand: Create a NAND reset function
When NAND devices are resetted some initialization may have to be done, like for example they have to be configured for the timing mode that shall be used. To
mtd: nand: Create a NAND reset function
When NAND devices are resetted some initialization may have to be done, like for example they have to be configured for the timing mode that shall be used. To get a common place where this initialization can be implemented create a nand_reset() function. This currently only issues a NAND_CMD_RESET to the NAND device. The places issuing this command manually are replaced with a call to nand_reset().
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Linux commit: 2f94abfe35b210e7711af9202a3dcfc9e779219a] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
#
6a1ff76e |
| 21-Nov-2017 |
Sascha Hauer <s.hauer@pengutronix.de> |
mtd: nand: remove unnecessary 'extern' from function declarations
'extern' is not necessary for function declarations. To prevent people from adding the keyword to new declarations remove the existi
mtd: nand: remove unnecessary 'extern' from function declarations
'extern' is not necessary for function declarations. To prevent people from adding the keyword to new declarations remove the existing ones.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Linux commit: 79022591839f110f465cac0223e117b91d47d5db] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
#
19d30ded |
| 21-Nov-2017 |
Boris Brezillon <boris.brezillon@free-electrons.com> |
mtd: nand: Add an option to maximize the ECC strength
The generic NAND DT bindings allows one to tweak the ECC strength and step size to their need. It can be used to lower the ECC strength to match
mtd: nand: Add an option to maximize the ECC strength
The generic NAND DT bindings allows one to tweak the ECC strength and step size to their need. It can be used to lower the ECC strength to match a bootloader/firmware config, but might also be used to get a better reliability.
In the latter case, the user might want to use the maximum ECC strength without having to explicitly calculate the exact value (this value not only depends on the OOB size, but also on the NAND controller, and can be tricky to extract).
Add a generic 'nand-ecc-maximize' DT property and the associated NAND_ECC_MAXIMIZE flag, to let ECC controller drivers select the best ECC strength and step-size on their own.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Rob Herring <robh@kernel.org> [Linux commit: ba78ee00e1ff84de9b3ad33edbd3ec599099ee82] [masahiro: of_property_read_bool -> fdt_getprop for U-Boot] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
#
4c61f79b |
| 21-Nov-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
mtd: nand: add onfi_* stubs in case ONFI_DETECTION is disabled
Add stubs to the header in case CONFIG_SYS_NAND_ONFI_DETECTION is disabled. This is much easier than adding around #ifdef to the calle
mtd: nand: add onfi_* stubs in case ONFI_DETECTION is disabled
Add stubs to the header in case CONFIG_SYS_NAND_ONFI_DETECTION is disabled. This is much easier than adding around #ifdef to the caller side.
Also, I removed the #ifdef around onfi_params. In Linux, onfi_params and jedec_params are unified as union. It will be the right thing to do.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
Revision tags: v2017.11 |
|
#
b5bf5cb3 |
| 20-Sep-2016 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
treewide: use #include <...> to include public headers
We are supposed to use #include <...> to include headers in the public include paths. We should use #include "..." only for headers in local d
treewide: use #include <...> to include public headers
We are supposed to use #include <...> to include headers in the public include paths. We should use #include "..." only for headers in local directories.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
#
fd42e1b5 |
| 25-Jul-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-nand-flash
|
Revision tags: v2016.07, openbmc-20160624-1 |
|
#
c1fe6b5b |
| 15-Jun-2016 |
Boris Brezillon <boris.brezillon@free-electrons.com> |
mtd: nand: Increase the max OOB size
Some NANDs are now exposing 1664 OOB bytes per page. Adjust the NAND_MAX_OOBSIZE value accordingly.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electro
mtd: nand: Increase the max OOB size
Some NANDs are now exposing 1664 OOB bytes per page. Adjust the NAND_MAX_OOBSIZE value accordingly.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
show more ...
|