aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd
AgeCommit message (Collapse)AuthorFilesLines
2022-04-13Merge tag 'u-boot-imx-20220413' of ↵Tom Rini1-5/+0
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20220413 i.MX patches for 2022.07 CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/11710
2022-04-12mtd: nand: mxs_nand_spl: Remove the page aligned accessYe Li1-5/+0
The mxs_nand_spl driver can support to read from page unaligned offset, so don't need to set bl_len to ask spl_load_simple_fit to handle the page unaligned access. Actually spl_load_simple_fit has two parts of reading: spl_simple_fit_read and spl_load_fit_image. The spl_load_fit_image can handle the page unaligned offset, but the spl_simple_fit_read can't do it. spl_simple_fit_read requires the FIT location at page aligned offset. Hence, remove the nand_get_mtd overwrite function from mxs_nand_spl to use page unaligned read by driver. Signed-off-by: Ye Li <ye.li@nxp.com> Tested-by: Tim Harvey <tharvey@gateworks.com> #gw_ventana
2022-04-11mtd: Update the way partitions are parsedPatrice Chotard1-2/+6
In case mtd_info's dev field is not populated (raw nand's case), use the flash_node new field which reference the DT flash node where can be found "partitions" node with "fixed-partitions" compatible. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Farhan Ali <farhan.ali@broadcom.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Marek Behun <marek.behun@nic.cz> Cc: Miquel Raynal <miquel.raynal@bootlin.com> Cc: Simon Glass <sjg@chromium.org> Cc: Wolfgang Denk <wd@denx.de>
2022-04-11mtd: Add flash_node in struct mtd_infoPatrice Chotard1-0/+1
Currently, add_mtd_partitions_of() can be used only if dev field of mtd_info struct is populated. It's the case, for example, for a spi nor flash, which has a DT compatible "jedec,spi-nor" and an associated device. mtd->dev is populated in spi_nor_scan(). But in case of a raw nand node, mtd_info's dev field can't be populated as flash node has no compatible, so no associated device. add_mtd_partitions_of() can't be used to parse "partitions" subnode. To remove this constraint, add an ofnode field in mtd_info struct which reference the DT flash node. This new field is populated by nand_scan_tail(). This new field will be used by add_mtd_partitions_of() to parse the flash node for "partitions" defined in DT. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Farhan Ali <farhan.ali@broadcom.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Marek Behun <marek.behun@nic.cz> Cc: Miquel Raynal <miquel.raynal@bootlin.com> Cc: Simon Glass <sjg@chromium.org> Cc: Wolfgang Denk <wd@denx.de>
2022-04-06spi: Avoid checking console in SPLSimon Glass1-1/+1
When SPI flash is used in SPL there is no console, so ctrlc() cannot be called. Add a condition to fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-28Merge tag 'v2022.04-rc5' into nextTom Rini3-11/+71
Prepare v2022.04-rc5
2022-03-28mtd: gpmi: fix the bch setting backward compatible issueWIP/2022-03-28-critical-fixesHan Xu2-11/+62
Previous u-boot code changed the default bch setting behavior and caused backward compatible issue. This fix choose the legacy bch geometry back again as the default option. If the minimum ecc strength that NAND chips required need to be chosen, it can be enabled by either adding DT flag "fsl,use-minimum-ecc" or CONFIG_NAND_MXS_USE_MINIMUM_ECC in configs. The unused flag "fsl,legacy-bch-geometry" get removed. Fixes: 51cdf83eea (mtd: gpmi: provide the option to use legacy bch geometry) Fixes: 616f03daba (mtd: gpmi: change the BCH layout setting for large oob NAND) Tested-by: Tim Harvey <tharvey@gateworks.com> Tested-by: Sean Nyekjaer <sean@geanix.com> Signed-off-by: Han Xu <han.xu@nxp.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
2022-03-16Merge tag 'xilinx-for-v2022.07-rc1' of ↵WIP/16Mar2022-nextTom Rini1-3/+6
https://source.denx.de/u-boot/custodians/u-boot-microblaze into next Xilinx changes for v2022.07-rc1 microblaze: - Add support for reserved memory xilinx: - Update FRU code with MAC reading zynqmp: - Remove double AMS setting - DT updates (mostly for SOMs) - Add support for zcu106 rev 1.0 zynq: - Update nand binding nand: - Aligned zynq_nand to upstream DT binding net: - Add support for ethernet-phy-id mmc: - Workaround CD in zynq_sdhci driver also for ZynqMP - Add support for dynamic/run-time SD config for SOMs gpio: - Add driver for slg7xl45106 firmware: - Add support for dynamic SD config power-domain: - Update zynqmp driver with the latest firmware video: - Add skeleton driver for DP and DPDMA i2c: - Fix i2c to work with QEMU pinctrl: - Add driver for zynqmp pinctrl driver
2022-03-15mtd: rawnand: stm32_fmc2: add NAND Write Protect supportChristophe Kerello1-0/+9
This patch adds the support of the WP# signal. WP will be disabled before the first access to the NAND flash. Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-03-14Merge tag 'v2022.04-rc4' into nextTom Rini1-1/+1
Prepare v2022.04-rc4
2022-03-12mtd: spi-nor-ids: Enable quad read for Gigadevice gd25lq128Niklas Cassel1-1/+1
The Gigadevice gd25lq128 serial flash exists in different versions, all which identify themselves using the same JEDEC id. gd25lq128c: https://www.gigadevice.com/datasheet/gd25lq128 gd25lq128d: https://www.gigadevice.com/datasheet/gd25lq128d However, all versions support quad read, so enable it. Tested and verified on the Sipeed MAix BiT board. Fixes: 30b9a28a3f2d ("mtd: spi-nor-ids: Add Gigadevice gd25lq128 ID") Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2022-03-07nand: brcmnand: add bcm6753 supportPhilippe Reynes3-0/+131
This adds the nand support for chipset bcm6753. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-07mtd: nand: Update driver to match new DT bindingMichal Simek1-3/+6
New binding changed node name from flash@e1000000 to nand-controller@0,0 which should be reflected in the driver. Both names are supported for backward compatibility. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/61f6edd965e0c0b179184823d5283c6c61a1eb35.1645625433.git.michal.simek@xilinx.com
2022-03-03Convert CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS to KconfigTom Rini1-0/+7
This converts the following to Kconfig: CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS Signed-off-by: Tom Rini <trini@konsulko.com>
2022-02-01mtd: cfi_mtd: populate mtd->dev with flash_info->devPatrice Chotard1-0/+3
Populate mtd->dev with flash_info->dev which allows to get full mtd information using the "mtd list" command. Before, "mtd list" command returns : List of MTD devices: * nor0 - type: NOR flash - block size: 0x40000 bytes - min I/O: 0x1 bytes - 0x000000000000-0x000004000000 : "nor0" After this patch we get for example: List of MTD devices: * nor0 - device: flash@0 - parent: spi@40430000 - driver: cfi_flash - path: /soc/spi@40430000/flash@0 - type: NOR flash - block size: 0x40000 bytes - min I/O: 0x1 bytes - 0x000000000000-0x000004000000 : "nor0" Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-21configs: Migrate CONFIG_SYS_MAX_FLASH_BANKS to KconfigPatrick Delaunay2-2/+30
Use moveconfig.py script to convert define CONFIG_SYS_MAX_FLASH_BANKS and CONFIG_SYS_MAX_FLASH_BANKS_DETECT to Kconfig and move these entries to defconfigs. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> [trini: Re-switch to IS_ENABLED check in spi-nor-core.c, re-run migration] Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-21mtd: cfi: change CONFIG_SYS_MAX_FLASH_BANKS_DETECT as booleanPatrick Delaunay1-1/+1
Prepare migration to Kconfig. CONFIG_SYS_MAX_FLASH_BANKS_DETECT becomes boolean and CONFIG_SYS_MAX_FLASH_BANKS define the MAX size, also used for detection when CONFIG_SYS_MAX_FLASH_BANKS_DETECT=y (CFI_MAX_FLASH_BANKS = CONFIG_SYS_MAX_FLASH_BANKS). CONFIG_SYS_MAX_FLASH_BANKS become mandatory when CONFIG_SYS_MAX_FLASH_BANKS_DETECT is activated. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-21mtd: cfi: introduce CFI_FLASH_BANKSPatrick Delaunay3-7/+6
Replace CONFIG_SYS_MAX_FLASH_BANKS by CFI_FLASH_BANKS to prepare Kconfig migration and avoid to redefine CONFIG_SYS_MAX_FLASH_BANKS in cfi_flash.h. After this patch CONFIG_SYS_MAX_FLASH_BANKS should be never used in the cfi code: use CFI_MAX_FLASH_BANKS for struct size or CFI_FLASH_BANKS for number of CFI banks which can be dynamic. This patch modify all the files which include mtd/cfi_flash.h. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-19doc: replace @return by Return:Heinrich Schuchardt11-48/+48
Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-17mtd: nand: pxa3xx: set mtd->devRobert Marko1-0/+1
Currently the pxa3xx driver does not set the udevice in the mtd_info struct and this prevents the mtd from parsing the partitions via DTS like for SPI-NOR. So simply set the mtd->dev to the driver udevice. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-16nand: gpmc: Handle bitflips in erased pages when using BCH ECC engineDavid Rivshin1-9/+36
In the case of an erased (sub)page both the data and ECC are all 0xFF bytes. This fails the normal ECC verification, as the computed ECC of all-0xFF is not also 0xFF. The GPMC NAND driver attempted to detect erased pages by checking that the ECC bytes are all-0xFF, but this had two problems: 1) bitflips in the data were not corrected, so the data looked not-erased 2) bitflips in the ECC bytes were reported as uncorrectable ECC errors The equivalent Linux driver [1] correctly handles this by counting the number of 0-bits in the combination of data and ECC bytes. If the number of 0-bits is less than the amount of bits correctable by the selected ECC algorithm, then it is treated as an erased page with correctable bitflips. Implement similar, though simplified, logic in omap_correct_data_bch(). [1] see omap_elm_correct_data() in omap2.c Signed-off-by: David Rivshin <drivshin@allworx.com>
2022-01-14BRCMNAND: Fix reporting of uncorrectable errors on subpages during page readJoel Peshkin1-1/+1
Previously, a subpage with an uncorrectable error followed by a subpage with a correctable error would return an erroneous correctable status. Signed-off-by: Joel Peshkin <joel.peshkin@broadcom.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-14mtd: nand: pxa3xx: use marvell, prefix for custom DT propertiesPierre Bourdon1-2/+2
The DT properties for the "enable-arbiter" and "keep-config" config knobs were previously named inconsistently: - The u-boot driver used "nand-enable-arbiter" and "nand-keep-config" names, without Marvell prefixes. - The Linux driver uses "marvell,nand-keep-config" ("enable-arbiter" does not exist anymore in recent kernels, but it also used to be "marvell,nand-enable-arbiter"). - The device trees almost all use "marvell," prefixed names, except for one single instance of "nand-enable-arbiter" without vendor prefix. This commit standardizes on the vendor prefixed version, making the u-boot driver read from DT props "marvell,nand-enable-arbiter" and "marvell,nand-keep-config". The one device tree using the unprefixed version is also changed to use the new naming. This has the side effect of making the previously no-op "marvell," config knobs already present in some DTs actually do something. This was likely the original intention of the DT authors, but note that this commit was not tested on every single impacted board. Signed-off-by: Pierre Bourdon <delroth@gmail.com>
2022-01-13drivers/mtd/ubispl/ubispl.c: Fix spelling of "mismatched".Vagrant Cascadian1-1/+1
2022-01-09Merge tag 'u-boot-amlogic-20220107' of ↵WIP/09Jan2022-nextTom Rini2-6/+5
https://source.denx.de/u-boot/custodians/u-boot-amlogic into next - disable CONFIG_NET_RANDOM_ETHADDR when unnecessary on amlogic based configs - meson64_android: add board specific env settings, in order to support VIM3/L for android - add changes to support VIM3/L android boot by using meson64_android.h config
2021-12-27Finish conversion CONFIG_SYS_NAND_SELF_INIT to KconfigTom Rini3-3/+30
In order to finish this conversion we need to add a symbols for SPL_SYS_NAND_SELF_INIT and TPL_SYS_NAND_SELF_INIT as there are cases there where we need to, or need to not, use that framework as things stand. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-27Convert CONFIG_TEGRA_NAND to KconfigTom Rini1-0/+8
This converts the following to Kconfig: CONFIG_TEGRA_NAND Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-27Convert CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT to KconfigTom Rini1-2/+2
This converts the following to Kconfig: CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT In order to do this conversion, expose this option to the user and use "save" not "safe" in the text. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-27Convert CONFIG_FSL_IFC to KconfigTom Rini1-0/+1
This converts the following to Kconfig: CONFIG_FSL_IFC This is done via select statements to match previous logic. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-27Convert CONFIG_ENV_SPI_BUS et al to KconfigTom Rini1-1/+1
This converts the following to Kconfig: CONFIG_ENV_SPI_BUS CONFIG_ENV_SPI_CS CONFIG_ENV_SPI_MAX_HZ CONFIG_ENV_SPI_MODE As part of this, we use Kconfig to provide the defaults now that were done in include/spi_flash.h. We also in some cases change from using CONFIG_ENV_SPI_FOO to CONFIG_SF_DEFAULT_FOO as those were the values in use anyhow as ENV was not enabled. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-16mtd: spi-nor-ids: Add support for W25Q01JVRam Narayanan1-0/+5
Adds support for Winbond's new 128MB spi nor flash. datasheet: https://www.winbond.com/resource-files/W25Q01JV%20SPI%20RevC%2005032021%20Plus%20dummy.pdf Signed-off-by: Ram Narayanan <ramnara@linux.microsoft.com> Cc: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2021-12-02mtd: spi: Remove SF_DUAL_FLASH symbol from KconfigMichal Simek1-6/+0
This symbol is not used anywhere in the code. Just enable in couple of defconfigs but it does nothing that's why remove it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2021-11-05Convert CONFIG_SPL_DRIVERS_MISC et al to KconfigTom Rini1-3/+3
This converts the following to Kconfig: CONFIG_SPL_DRIVERS_MISC CONFIG_SPL_ENV_SUPPORT CONFIG_SPL_GPIO CONFIG_SPL_I2C CONFIG_SPL_LDSCRIPT CONFIG_SPL_LIBCOMMON_SUPPORT CONFIG_SPL_LIBGENERIC_SUPPORT CONFIG_SPL_LOAD_FIT_ADDRESS CONFIG_SPL_MMC CONFIG_SPL_NAND_SUPPORT CONFIG_SPL_NO_CPU_SUPPORT CONFIG_SPL_OS_BOOT CONFIG_SPL_POWER CONFIG_SPL_STACK_R CONFIG_SPL_STACK_R_ADDR CONFIG_SPL_WATCHDOG CONFIG_SPL_TEXT_BASE Signed-off-by: Tom Rini <trini@konsulko.com>
2021-10-23Merge https://source.denx.de/u-boot/custodians/u-boot-spiWIP/23Oct2021Tom Rini12-76/+79
- Fix mtd erase with mtdpart (Marek Behún) - NXP fspi driver fixes (Kuldeep Singh)
2021-10-23mtd: spi-nor-ids: Add SECT_4K to mt25qu512aKris Chaplin1-1/+1
The mt25qu512a supports 4K or 64K sectors, so adding SECT_4K to enable 4K sector usage. Tested on Intel n5x hardware with QSPI carrier card Signed-off-by: Kris Chaplin <kris.chaplin@linux.intel.com> Acked-by: Pratyush Yadav <p.yadav@ti.com> [jagan: droped Tested-by of patch author and datasheet link] Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2021-10-23mtd: spi-nor-ids: Add is25lp512 and is25wp512 devicesKris Chaplin1-0/+4
Add is25lp512 and is25wp512 devices to spi-nor id table Tested on Intel n5x hardware with QSPI carrier card Signed-off-by: Kris Chaplin <kris.chaplin@linux.intel.com> [jagan: droped Tested-by of patch author] Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2021-10-23mtd: Remove mtd_erase_callback() entirelyMarek Behún10-68/+2
The original purpose of mtd_erase_callback() in Linux at the time it was imported to U-Boot, was to inform the caller that erasing is done (since it was an asynchronous operation). All supplied callback methods in U-Boot do nothing, but the mtd_erase_callback() function was (until previous patch) grossly abused in U-Boot's mtdpart implementation for completely different purpose. Since we got rid of the abusement, remove the mtd_erase_callback() function and the .callback member from struct erase_info entirely, in order to avoid such problems in the future. Signed-off-by: Marek Behún <marek.behun@nic.cz>
2021-10-23mtd: mtdpart: Make mtdpart's _erase method saneMarek Behún1-8/+18
The _erase() method of the mtdpart driver, part_erase(), currently implements offset shifting (for given mtdpart partition) in a weird way: 1. part_erase() adds partition offset to block address 2. parent driver's _erase() method is called 3. parent driver's _erase() method calls mtd_erase_callback() 4. mtd_erase_callback() subtracts partition offset from block address so that the callback function is given correct address The problem here is that if the parent's driver does not call mtd_erase_callback() in some scenario (this was recently a case for spi_nor_erase(), which did not call mtd_erase_callback() at all), the offset is not shifted back. Moreover the code would be more readable if part_erase() not only added partition offset before calling parent's _erase(), but also subtracted it back afterwards. Currently the mtd_erase_callback() is expected to do this subtracting since it does have to do it anyway. Add the more steps to this procedure: 5. mtd_erase_callback() adds partition offset to block address so that it returns the the erase_info structure members as it received them 6. part_erase() subtracts partition offset from block address This makes the code more logical and also prevents errors in case parent's driver does not call mtd_erase_callback() for some reason. (BTW, the purpose of mtd_erase_callback() in Linux is to inform the caller that it is done, since in Linux erasing is done asynchronously. We are abusing the purpose of mtd_erase_callback() in U-Boot for completely different purpose. The callback function itself has empty implementation in all cases in U-Boot.) Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
2021-10-23mtd: spi-nor-core: Check for ctrlc() in spi_nor_erase()Marek Behún1-0/+5
May it possible to interrupt the spi_nor_erase() function. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
2021-10-23mtd: spi-nor-core: Call mtd_erase_callback() from spi_nor_erase()Marek Behún1-2/+18
The spi_nor_erase() function does not call mtd_erase_callback() as it should. The mtdpart code currently implements the subtraction of partition offset in mtd_erase_callback(). This results in partition offset being added prior calling spi_nor_erase(), but not subtracted back on return. The result is that the `mtd erase` command does not erase the whole partition, only some of it's blocks: => mtd erase "Rescue system" Erasing 0x00000000 ... 0x006fffff (1792 eraseblock(s)) jedec_spi_nor spi-nor@0: at 0x100000, len 4096 jedec_spi_nor spi-nor@0: at 0x201000, len 4096 jedec_spi_nor spi-nor@0: at 0x302000, len 4096 jedec_spi_nor spi-nor@0: at 0x403000, len 4096 jedec_spi_nor spi-nor@0: at 0x504000, len 4096 jedec_spi_nor spi-nor@0: at 0x605000, len 4096 jedec_spi_nor spi-nor@0: at 0x706000, len 4096 This is obviously wrong. Add proper calling of mtd_erase_callback() into the spi_nor_erase() function. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Reported-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Tested-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
2021-10-23mtd: spi-nor-core: Don't check for zero length in spi_nor_write() / ↵Marek Behún1-6/+0
spi_nor_erase() This check is already done in all callers: mtdcore's mtd_write() / mtd_erase(), legacy spi_nor_write() / spi_flash_erase(). No reason to do this here as well. Signed-off-by: Marek Behún <marek.behun@nic.cz>
2021-10-23mtd: spi-nor-core: Check return value of write_disable() in spi_nor_erase()Marek Behún1-1/+3
The cleanup code of spi_nor_erase() function calls write_disable(), but does not return it's return value even in case of failure. Fix this. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
2021-10-23mtd: spi-nor-core: Don't overwrite return value if it is non-zeroMarek Behún1-2/+4
The cleanup code of the spi_nor_erase() function overwrites the ret variable with return value of clean_bar(), even if the ret variable is already set. Fix this. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
2021-10-23mtd: spi-nor-core: Check return value of write_enable() in spi_nor_erase()Marek Behún1-1/+3
The spi_nor_erase() function does not check return value of the write_enable() call. Fix this. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Pratyush Yadav <p.yadav@ti.com> Tested-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
2021-10-23mtd: spi-nor-core: Try cleaning up in case writing BAR failedMarek Behún1-1/+1
Use the cleanup codepath of spi_nor_erase() also in the event of failure of writing the BAR register. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Pratyush Yadav <p.yadav@ti.com> Tested-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
2021-10-23mtd: spi-nor: Add support for Spansion S25FL256LTakahiro Kuwano2-0/+20
The S25FL256L is a part of the S25FL-L family and has the same feature set as S25FL128L except the density. The datasheet can be found in the following link. https://www.cypress.com/file/316171/download The S25FL256L is 32MB NOR Flash that does not support Bank Address Register. This fixup is activated if CONFIG_SPI_FLASH_BAR is enabled and returns ENOTSUPP in setup() hook to avoid further ops. Tested on Xilinx Zynq-7000 FPGA board. Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
2021-10-23mtd: spi-nor-ids: Add GD25LQ256D ChipYanhong Wang1-0/+5
Add Gigadevice GD25LQ256D SPI NOR chip. https://www.gigadevice.com/datasheet/gd25lq256d/ Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [jagan: updated commit message] Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2021-10-20Merge tag 'u-boot-imx-20211020' of ↵WIP/20Oct2021Tom Rini2-1/+7
https://source.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20211020 ------------------- First PR from u-boot-imx for 2022.01 CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/9535 - new board: kontron-sl-mx8mm - imx8m: - fix secure boot - imx ESDHC: fixes - i.MX53: Support thum2, bmode and fixes for Menlo board usbarmory switch to Ethernet driver model - imx6 : - DDR calibration for Toradex boards - imx7: - Fixes - Updated gateworks boards (ventana / venice) # gpg verification failed.
2021-10-12mtd: rawnand: Add Macronix raw NAND controller driverZhengxun Li3-0/+610
Add a driver for Macronix raw NAND controller. This patch referred from linux mxic_nand.c. The difference from the linux version is described here. 1. In order to adapt to the uboot nand framework, add function binding (cmdfunc, read_byte, read_buf, write_buf). 2. Added parsing command format to use hardware correctly. 3. Remove the incompatible functions of Uboot. Signed-off-by: Zhengxun Li <zhengxunli@mxic.com.tw>
2021-10-12Merge tag 'u-boot-stm32-20211012' of ↵Tom Rini1-0/+7
https://source.denx.de/u-boot/custodians/u-boot-stm - Disable ATAGS for STM32 MCU and MPU boards - Disable bi_boot_params for STM32 MCU and MPU boards - Update stm32-usbphyc node management - Convert CONFIG_STM32_FLASH to Kconfig for STM32 MCU boards - Convert some USB config flags to Kconfig for various boards - Convert CONFIG_BOOTCOMMAND flag to Kconfig for STM32 F429 board - Remove specific CONFIG_STV0991 flags - Remove unused CONFIG_USER_LOWLEVEL_INIT flag - Add ofdata_to_platdata() callback for stm32_spi driver - Update for stm32f7_i2c driver - Remove gpio_hog_probe_all() from STM32 MP1 board - Fix bind command Signed-off-by: Tom Rini <trini@konsulko.com>