summaryrefslogtreecommitdiff
path: root/drivers/mtd
AgeCommit message (Collapse)Author
2017-08-12Convert CONFIG_NAND to KconfigAdam Ford
This converts the following to Kconfig: CONFIG_NAND Signed-off-by: Adam Ford <aford173@gmail.com> [trini: Sync up a few more, add imply's] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-07-31configs: Migrate CMD_NAND*Tom Rini
Migrate all remaining instances of CMD_NAND, CMD_NAND_TRIMFFS CMD_NAND_LOCK_UNLOCK and CMD_NAND_TORTURE from the headers into the defconfig files. Tested-by: Adam Ford <aford173@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-24ubi: Kconfig: Make MTD_UBI select MTD_PARTITIONSKarl Beldan
This missing dependency has probably remained under the radar because MTD_PARTITIONS is still whitelisted. Signed-off-by: Karl Beldan <karl.beldan-ext@sagemcom.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-24ubi: Kconfig: Fix MTD_UBI selection dependencyKarl Beldan
Remove the ARCH_SUNXI dependency on selection of RBTREE. Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Jagan Teki <jagan@openedev.com> Signed-off-by: Karl Beldan <karl.beldan-ext@sagemcom.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-18Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini
2017-07-12imx: reorganize IMX code as other SOCsStefano Babic
Change is consistent with other SOCs and it is in preparation for adding SOMs. SOC's related files are moved from cpu/ to mach-imx/<SOC>. This change is also coherent with the structure in kernel. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Fabio Estevam <fabio.estevam@nxp.com> CC: Akshay Bhat <akshaybhat@timesys.com> CC: Ken Lin <Ken.Lin@advantech.com.tw> CC: Marek Vasut <marek.vasut@gmail.com> CC: Heiko Schocher <hs@denx.de> CC: "Sébastien Szymanski" <sebastien.szymanski@armadeus.com> CC: Christian Gmeiner <christian.gmeiner@gmail.com> CC: Stefan Roese <sr@denx.de> CC: Patrick Bruenn <p.bruenn@beckhoff.com> CC: Troy Kisky <troy.kisky@boundarydevices.com> CC: Nikita Kiryanov <nikita@compulab.co.il> CC: Otavio Salvador <otavio@ossystems.com.br> CC: "Eric Bénard" <eric@eukrea.com> CC: Jagan Teki <jagan@amarulasolutions.com> CC: Ye Li <ye.li@nxp.com> CC: Peng Fan <peng.fan@nxp.com> CC: Adrian Alonso <adrian.alonso@nxp.com> CC: Alison Wang <b18965@freescale.com> CC: Tim Harvey <tharvey@gateworks.com> CC: Martin Donnelly <martin.donnelly@ge.com> CC: Marcin Niestroj <m.niestroj@grinn-global.com> CC: Lukasz Majewski <lukma@denx.de> CC: Adam Ford <aford173@gmail.com> CC: "Albert ARIBAUD (3ADEV)" <albert.aribaud@3adev.fr> CC: Boris Brezillon <boris.brezillon@free-electrons.com> CC: Soeren Moch <smoch@web.de> CC: Richard Hu <richard.hu@technexion.com> CC: Wig Cheng <wig.cheng@technexion.com> CC: Vanessa Maegima <vanessa.maegima@nxp.com> CC: Max Krummenacher <max.krummenacher@toradex.com> CC: Stefan Agner <stefan.agner@toradex.com> CC: Markus Niebel <Markus.Niebel@tq-group.com> CC: Breno Lima <breno.lima@nxp.com> CC: Francesco Montefoschi <francesco.montefoschi@udoo.org> CC: Jaehoon Chung <jh80.chung@samsung.com> CC: Scott Wood <oss@buserror.net> CC: Joe Hershberger <joe.hershberger@ni.com> CC: Anatolij Gustschin <agust@denx.de> CC: Simon Glass <sjg@chromium.org> CC: "Andrew F. Davis" <afd@ti.com> CC: "Łukasz Majewski" <l.majewski@samsung.com> CC: Patrice Chotard <patrice.chotard@st.com> CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> CC: Hans de Goede <hdegoede@redhat.com> CC: Masahiro Yamada <yamada.masahiro@socionext.com> CC: Stephen Warren <swarren@nvidia.com> CC: Andre Przywara <andre.przywara@arm.com> CC: "Álvaro Fernández Rojas" <noltari@gmail.com> CC: York Sun <york.sun@nxp.com> CC: Xiaoliang Yang <xiaoliang.yang@nxp.com> CC: Chen-Yu Tsai <wens@csie.org> CC: George McCollister <george.mccollister@gmail.com> CC: Sven Ebenfeld <sven.ebenfeld@gmail.com> CC: Filip Brozovic <fbrozovic@gmail.com> CC: Petr Kulhavy <brain@jikos.cz> CC: Eric Nelson <eric@nelint.com> CC: Bai Ping <ping.bai@nxp.com> CC: Anson Huang <Anson.Huang@nxp.com> CC: Sanchayan Maity <maitysanchayan@gmail.com> CC: Lokesh Vutla <lokeshvutla@ti.com> CC: Patrick Delaunay <patrick.delaunay@st.com> CC: Gary Bisson <gary.bisson@boundarydevices.com> CC: Alexander Graf <agraf@suse.de> CC: u-boot@lists.denx.de Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-07-12mx6: soc: Move mxs_dma_init() into the mxs nand driverFabio Estevam
Currently the following build error is seen when a board using MMC SPL is built and the MXS nand driver is also selected: arch/arm/cpu/armv7/built-in.o: In function `arch_cpu_init': arch/arm/cpu/armv7/mx6/soc.c:432: undefined reference to 'mxs_dma_init' On mx6 the only user of mxs_dma_init() is the mxs nand driver, so move it there. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-07-12mtd: nand: make nand_info array staticGrygorii Strashko
Make make nand_info array static, since all direct users of nand_info array have been converted to use get_nand_dev_by_index() API. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-12mtd: nand: drv: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-12cmd: nand: abstract global variable usage for dm conversionMugunthan V N
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 <mugunthanvnm@ti.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-10mtd: stm32: use parameter instead of default valuePatrice Chotard
To set wait state, a hard coded value is used instead of using latency parameter. stm32_flash_latency_cfg() is currently used in arch/arm/mach-stm32/stm32f4/clock.c and in drivers/clk/clk_stm32f7.c with, in both case, "5" as parameter. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-06-23mtd: OneNAND: Fix onenand_block_markbadLadislav Michl
commit dfe64e2c89731a3f9950d7acd8681b68df2bae03 Author: Sergey Lapin <slapin@ossfans.org> Date: Mon Jan 14 03:46:50 2013 +0000 mtd: resync with Linux-3.7.1 modified onenand_block_markbad to call mtd_block_markbad, but as _block_markbad function pointer used by mtd_block_markbad to do actual job is by default pointing back to onenand_block_markbad there is no way this function ever finishes its job. Fix it by changing function body according current (4.12-rc6) linux implementation. Tested on IGEPv2 board with Muxed OneNAND(DDP) 512MB containing several unerasable blocks this function marked bad. Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
2017-06-23onenand_spl_simple: Add DDP OneNAND supportLadislav Michl
Current implementation is unable to access second half of DDP OneNAND flash (reads first half mirrored). Use block and bufferram address calculations from onenand_base to fix this. Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
2017-06-23onenand_spl_simple: Call onenand_spl_get_geometry() only onceLadislav Michl
Do not call onenand_spl_get_geometry() for each block read. Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
2017-06-20arm: zynq: Move CONFIG_SF_DUAL_FLASH to defconfigMike Looijmans
Move the only use of CONFIG_SF_DUAL_FLASH to defconfig. This makes the associated topic_miamiplus.h header obsolete, so remove that as well. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-06-16powerpc, 5xxx, 512x: remove support for mpc5xxx and mpc512xHeiko Schocher
There was for long time no activity in the mpx5xxx area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in mpc5xxx, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
2017-06-16treewide: remove unneeded semicolonsMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-06-05samsung: nand: Drop s3c2410_nand driverSimon Glass
This is not used anymore. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-01dm: sandbox: spi: Convert driver to support livetreeSimon Glass
Update this driver to support a live device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-01dm: spi-flash: Convert uclass to livetreeSimon Glass
Update the SPI flash uclass to support a live device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-01fdt: Rename a few functions in fdt_supportSimon Glass
These two functions have an of_ prefix which conflicts with naming used in of_addr. Rename them: fdt_read_number fdt_support_bus_default_count_cells Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-01dm: gpio: Add live tree supportSimon Glass
Add support for requesting GPIOs with a live device tree. This involves adjusting the function signature for the legacy function gpio_request_by_name_nodev(), so fix up all callers. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes to stm32f746-disco.c: Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-09fix: nand: pxa3xx: Remove hardcode values from the driverKonstantin Porotchkin
Obtain NAND controller setup parameters from the device tree instead of using hardcoded values. Signed-off-by: Konstantin Porotchkin <kostap@marvell.com> Cc: Scott Wood <oss@buserror.net> Cc: Stefan Roese <sr@denx.de> Cc: Igal Liberman <igall@marvell.com> Cc: Nadav Haklai <nadavh@marvell.com> Signed-off-by: Stefan Roese <sr@denx.de>
2017-05-08mtd: nand: Consolidate nand spl loaders implementationLadislav Michl
nand_spl_load_image implementation was copied over into three different drivers and now with nand_spl_read_block used for ubispl situation gets even worse. For now use least intrusive solution and #include the same implementation to nand drivers. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Tested-by: Pau Pajuelo <ppajuel@gmail.com>
2017-04-18drivers: remove Blackfin specific driversMasahiro Yamada
These drivers have no user since commit ea3310e8aafa ("Blackfin: Remove"). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
2017-04-13mtd: nand: atmel: use another functions to set gpio valueWenyou Yang
Because there isn't the implementation of gpio_set/get_value() and gpio_set/get_value() after the at91 gpio driver is converted to support the driver model, use at91_set_gpio_value() and at91_get_gpio_value() Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-04-09mtd: nand: am335x_spl_bch: Incorporate tWB delay in nand_command functionCooper Jr., Franklin
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.c Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> [trini: Reformat comments slightly] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-07nand: sunxi: Add options for the SPL NAND configurationMaxime Ripard
The SPL image needs to be built with a different ECC configuration than the U-Boot binary. Add Kconfig options with defaults to provide a value that should work for anyone, but is still configurable if needs be. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Scott Wood <oss@buserror.net> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-04-07mtd: sunxi: Change U-Boot offsetMaxime Ripard
The default U-Boot offset for the Allwinner SoCs was set to 32kB. This was probably to try to maintain some compatibility with the current image that we build for the MMC where the U-Boot binary is also located at a 32kB offset. However, this causes a number of issues. The first one is that it prevents us from using a backup SPL entirely, which is troublesome in case where the first would be corrupt (especially on MLC which have a higher number of bitflips). We also cannot use the original MMC image on the NAND, because we need to prepare the SPL image to include the ECCs and randomizer settings, which reduces the interest of setting it at that particular offset. It also prevents us from upgrading and flashing the U-Boot and SPLs independantly, since it's very likely that it will fall in the same erase block. Since that default wasn't used by any board, change it for 8MB, which will be in an erase block of its own, all the erase blocks being multiple of two. The highest erase block size we encountered is 4MB, which means that in this particular setup, the first and second erase blocks will be for the SPL and its backup, and the third for U-Boot. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-04-07mtd: sunxi: Select the U-Boot location config optionMaxime Ripard
We'll need that symbol so that the default offset are defined Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-04-07mtd: ubi: Select RBTREE option from MTD_UBI Kconfig entryBoris Brezillon
Expose the RBTREE feature through Kconfig and select this option from the MTD_UBI option. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Jagan Teki <jagan@openedev.com> [Rebased on master] Signed-off-by: Jagan Teki <jagan@openedev.com>
2017-04-07nand: sunxi: Fix modulo by zero errorMaxime Ripard
When trying to autodetect the ECC and randomization configurations, the driver starts with a randomization disabled and no seeds. In this case, the number of seeds is obviously 0, and the randomize boolean is set to false. However, the logic that retrieves the seed for a given page offset will blindly use the number of seeds, without testing if the randomization is enabled, basically doing a modulo by 0. As it turns out, the libgcc in the common toolchain returns 0 here, which was our expected value in such a case, and why we would not detect it. However, U-Boot's libgcc will for some reason return from the function instead, resulting in an error to load the U-Boot binary in the SPL. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Scott Wood <oss@buserror.net> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-04-07Merge branch 'master' of git://git.denx.de/u-boot-sunxiTom Rini
trini: Disable CONFIG_SPL_USE_ARCH_MEMSET on orangepi_2 Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-05Blackfin: RemoveTom Rini
The architecture is currently unmaintained, remove. Cc: Benjamin Matthews <mben12@gmail.com> Cc: Chong Huang <chuang@ucrobotics.com> Cc: Dimitar Penev <dpn@switchfin.org> Cc: Haitao Zhang <hzhang@ucrobotics.com> Cc: I-SYST Micromodule <support@i-syst.com> Cc: M.Hasewinkel (MHA) <info@ssv-embedded.de> Cc: Marek Vasut <marex@denx.de> Cc: Martin Strubel <strubel@section5.ch> Cc: Peter Meerwald <devel@bct-electronic.com> Cc: Sonic Zhang <sonic.adi@gmail.com> Cc: Valentin Yakovenkov <yakovenkov@niistt.ru> Cc: Wojtek Skulski <info@skutek.com> Cc: Wojtek Skulski <skulski@pas.rochester.edu> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-05sunxi: prepare for sharing MACH_SUN8I_H3 config symbolAndre Przywara
The Allwinner H5 is very close to the H3 SoC, but has ARMv8 cores. To allow sharing the clocks, GPIO and driver code easily, create an architecture agnostic MACH_SUNXI_H3_H5 Kconfig symbol. Rename the existing symbol to MACH_SUNXI_H3_H5 where code is shared and let it be selected by a new shared Kconfig option. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-05SPI: SPL: sunxi: fix 64-bit buildAndre Przywara
Addresses passed on to readl and writel are expected to be of the same size as a pointer. Change the parameter types of sunxi_spi0_read_data() to make the compiler happy and allow a warning-free aarch64 compile. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-04-05dm: core: Add flags parameter to device_remove()Stefan Roese
This patch adds the flags parameter to device_remove() and changes all calls to this function to provide the default value of DM_REMOVE_NORMAL for "normal" device removal. This is in preparation for the driver specific pre-OS (e.g. DMA cancelling) remove support. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
2017-03-28mtd: nand: remove nand size print from nand_init functionHou Zhiqiang
Add nand_size() function to move the nand size print into initr_nand(). Remove nand size print from nand_init() to allow other function to call nand_init() without printing nand size. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
2017-03-28mtd: nand: add initialization flagHou Zhiqiang
Add initialization flag to avoid initializing NAND Flash multiple times, otherwise it will calculate a wrong total size. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
2017-02-19mtd: nand: build MXS driver for MX7 as wellAndrey Yurovsky
The i.MX7 has the same GPMI controller as i.MX6 and is covered by the MXS driver. Tell Kconfig that we can use this driver on the MX7 platform (the MXS driver already has the few i.MX7-specific changes needed for basic operation and the board itself sets the pinmux correctly). Tested on i.MX7D with the Sabre board and a NAND Flash soldered to U12. Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
2017-02-12flash: complete CONFIG_SYS_NO_FLASH move with renamingMasahiro Yamada
We repeated partial moves for CONFIG_SYS_NO_FLASH, but this is not completed. Finish this work by the tool. During this move, let's rename it to CONFIG_MTD_NOR_FLASH. Actually, we have more instances of "#ifndef CONFIG_SYS_NO_FLASH" than those of "#ifdef CONFIG_SYS_NO_FLASH". Flipping the logic will make the code more readable. Besides, negative meaning symbols do not fit in obj-$(CONFIG_...) style Makefiles. This commit was created as follows: [1] Edit "default n" to "default y" in the config entry in common/Kconfig. [2] Run "tools/moveconfig.py -y -r HEAD SYS_NO_FLASH" [3] Rename the instances in defconfigs by the following: find . -path './configs/*_defconfig' | xargs sed -i \ -e '/CONFIG_SYS_NO_FLASH=y/d' \ -e 's/# CONFIG_SYS_NO_FLASH is not set/CONFIG_MTD_NOR_FLASH=y/' [4] Change the conditionals by the following: find . -name '*.[ch]' | xargs sed -i \ -e 's/ifndef CONFIG_SYS_NO_FLASH/ifdef CONFIG_MTD_NOR_FLASH/' \ -e 's/ifdef CONFIG_SYS_NO_FLASH/ifndef CONFIG_MTD_NOR_FLASH/' \ -e 's/!defined(CONFIG_SYS_NO_FLASH)/defined(CONFIG_MTD_NOR_FLASH)/' \ -e 's/defined(CONFIG_SYS_NO_FLASH)/!defined(CONFIG_MTD_NOR_FLASH)/' [5] Modify the following manually - Rename the rest of instances - Remove the description from README - Create the new Kconfig entry in drivers/mtd/Kconfig - Remove the old Kconfig entry from common/Kconfig - Remove the garbage comments from include/configs/*.h Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-02-08dm: core: Replace of_offset with accessorSimon Glass
At present devices use a simple integer offset to record the device tree node associated with the device. In preparation for supporting a live device tree, which uses a node pointer instead, refactor existing code to access this field through an inline function. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-01-14omap-gpmc: use SECTOR_BYTES instead of hardcoded valueLadislav Michl
Replace hardcoded value with defined constant SECTOR_BYTES. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-01-10Merge branch 'master' of git://git.denx.de/u-boot-sunxiTom Rini
2017-01-04mtd: nand: mxs_nand_spl: Fix to remove twise 'NAND' printJagan Teki
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 MiB After the fix: ------------- U-Boot SPL 2017.01-rc2-gf84dd8b-dirty (Jan 02 2017 - 23:17:00) Trying to boot from NAND: 512 MiB Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Jagan Teki <jagan@openedev.com>
2017-01-04spl: sunxi: Fix build error with CONFIG_SPL_SPI_SUNXIPriit Laes
Fix typo introduced in ebc4ef61d76fc182773fe225151adc9b913c62eb Signed-off-by: Priit Laes <plaes@plaes.org> Reviewed-by: Jagan Teki <jagan@openedev.com>
2016-12-15Revert "sf: Fix quad bit set for micron devices"Cyrille Pitchen
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 <cyrille.pitchen@atmel.com> [Rebase on master, use JEDEC_MFR(info) in place of idcode0] Signed-off-by: Jagan Teki <jagan@openedev.com>
2016-12-15sf: Do not force the DT memory map size to exactly match the devicePhil Edworthy
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 <phil.edworthy@renesas.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2016-12-15mtd: spi: don't return -1 when scan succeedFabien Parent
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 <fparent@baylibre.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2016-12-09spl: Add a name to the SPL load-image methodsSimon Glass
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 <sjg@chromium.org>