Message ID | 20180730154657.20738-1-miquel.raynal@bootlin.com |
---|---|
Headers | show |
Series | SPI-NAND support | expand |
On Mon, Jul 30, 2018 at 9:16 PM, Miquel Raynal <miquel.raynal@bootlin.com> wrote: > During the last months, Boris Brezillon shared his work to support > serial flashes within Linux. First, he delivered (and merged) a new > layer called spi-mem. He also initiated in Linux MTD subsystem the move > of all 'raw' NAND related code to a raw/ subdirectory, adding at the > same time a NAND core that would be shared with all NAND devices. Then, > he contributed a generic SPI-NAND driver, making use of this NAND core, > as well as some vendor code to drive a few chips. > > On top of this work, I added an 'mtd' U-Boot command to handle all sort > of MTD devices. This should become the default command instead of having > one per flash flavor ('sf', 'nand', 'spi-nand' ?). > > The series has been tested on an Ocelot board PCB123 (VSC7514), > featuring a Macronix SPI NAND chip. > > TL;DR: the series contains: > - A few patches from Linux to resynchronize some areas of the MTD layer. > - Various fixes and re-organization of the MTD subsystem. > - The introduction of the SPI-mem interface. > - The addition of the generic SPI-NAND driver (and its bindings). > - Several SPI NAND chip drivers (Macronix, Micron, Winbond). > - A new 'mtd' command. > - Support for spi-nand devices in mtdparts. > > To test your SPI-NAND device with U-Boot simply follow these lines: > >> setenv mtdparts mtdparts=spi-nand0:1m(foo),-(bar) >> setenv mtdids spi-nand0=spi-nand0 >> mtdparts # show the spi-nand device partitions >> ubi part bar # create a static UBI volume in the bar partition > > Thanks, > Miquèl > > Changes since v4: > ----------------- > * Added Jagan's Acked-by tags to every patch related to the > SPI-mem/SPI-NAND addition. > * Rebased on top of master. > > Changes since v3: > ----------------- > * Fixed the debug messages in spi-mem to print either Rx or Tx data. > * Fixed a Kconfig error that prevented to build mtdparts with plain > defconfig. > * Fixed a compilation error due to the above error that prevented one > file to be compiled. > * Adapted the mtd command to probe MTD partitions also. > * Declared mtd_probe_devices() in a header so mtdparts or UBI could > use it too (to probe all devices and MTD partitions in a clean way). > * As I worked on mtdparts, I found annoying and completely useless the > fact that we need to prefix the environment variable with > "mtdparts=". Canceled this obligation. > * Added one patch to allow spi-nand devices to be recognized by mtdparts > (this is purely useless but needed to be done in order to use this > command). > * Removed useless definitions of MTD device types in UBI code. > * Wrote a generic mtdparts environment variable parser, used by the mtd > command. > * Used the mtd_probe_devices() function from get_mtd_info() in > cmd/mtdparts.c to be sure the desired partition really does not exist > (otherwise it will be probed and then found). > > Changes since v2: > ----------------- > * Rebased on u-boot master branch. > * Removed extra-parenthesis in > "mtd: Fallback to ->_read/write() when ->_read/write_oob() is missing" > * s/fiels/files/ in "mtd: move NAND fiels into a raw/ subdirectory" > * Do not describe generic SPI device properties in SPI NAND bindings. > * Changes in the mtd command: > * Printing more information in 'mtd list' (device type, device > characteristics) > * Switch to do_div() instead of '(u32)value64b % value32b' which only > worked because value32b was a power of 2. > * Removed erase.chip option. > * By default, erase/read/write happen on the full MTD device while a > dump will only work on a single page. > > Changes since v1: > ----------------- > * Fixed the nand_memorg structure of the MX35LF2GE4AB chip. > * Added Reviewed-by tags from Jagan. > * Backported and squashed two patches fixing things in the SPI NAND core > received on the Linux ML. > * Backported more changes in mtdcore.c from Linux. > * Added a patch to add a fallback on mtd->_read/_write() in mtdcore.c > when mtd->_read/write_oob() is not supported. > * Removed the DT changes, useless as the DTs are not available in > mainline yet. > * Addressed Boris/Stefan comments on the 'mtd' command. > * Added support for multi-pages OOB read/write. > > > Boris Brezillon (7): > mtd: Fallback to ->_read/write_oob() when ->_read/write() is missing > mtd: Add sanity checks in mtd_write/read_oob() > mtd: nand: Add core infrastructure to deal with NAND devices > mtd: nand: Pass mode information to nand_page_io_req > spi: Extend the core to ease integration of SPI memory controllers > mtd: spinand: Add initial support for the MX35LF1GE4AB chip > dt-bindings: Add bindings for SPI NAND devices > > Brian Norris (1): > mtd: add get/set of_node/flash_node helpers > > Ezequiel Garcia (1): > mtd: Uninline mtd_write_oob and move it to mtdcore.c > > Frieder Schrempf (1): > mtd: spinand: Add initial support for Winbond W25M02GV > > Miquel Raynal (15): > mtd: Fallback to ->_read/write() when ->_read/write_oob() is missing > mtd: fix build issue with includes > mtd: move definitions to enlarge their range > mtd: move all flash categories inside MTD submenu > mtd: move NAND files into a raw/ subdirectory > mtd: rename nand into rawnand in Kconfig prompt > mtd: spinand: Add initial support for the MX35LF2GE4AB chip > mtd: declare MTD_PARTITIONS symbol in Kconfig > cmd: ubi: delete useless and misleading definitions > cmd: mtdparts: accept spi-nand devices > cmd: mtdparts: add a generic 'mtdparts' parser > cmd: mtdparts: remove useless 'mtdparts=' prefix > mtd: uclass: add probe function > cmd: mtd: add 'mtd' command > cmd: mtdparts: try to probe the MTD devices as a fallback > > Peter Pan (2): > mtd: nand: Add core infrastructure to support SPI NANDs > mtd: spinand: Add initial support for Micron MT29F2G01ABAGD Applied to u-boot-spi/master
On Tue, Jul 31, 2018 at 12:59 PM, Jagan Teki <jagan@amarulasolutions.com> wrote: > On Mon, Jul 30, 2018 at 9:16 PM, Miquel Raynal > <miquel.raynal@bootlin.com> wrote: >> During the last months, Boris Brezillon shared his work to support >> serial flashes within Linux. First, he delivered (and merged) a new >> layer called spi-mem. He also initiated in Linux MTD subsystem the move >> of all 'raw' NAND related code to a raw/ subdirectory, adding at the >> same time a NAND core that would be shared with all NAND devices. Then, >> he contributed a generic SPI-NAND driver, making use of this NAND core, >> as well as some vendor code to drive a few chips. >> >> On top of this work, I added an 'mtd' U-Boot command to handle all sort >> of MTD devices. This should become the default command instead of having >> one per flash flavor ('sf', 'nand', 'spi-nand' ?). >> >> The series has been tested on an Ocelot board PCB123 (VSC7514), >> featuring a Macronix SPI NAND chip. >> >> TL;DR: the series contains: >> - A few patches from Linux to resynchronize some areas of the MTD layer. >> - Various fixes and re-organization of the MTD subsystem. >> - The introduction of the SPI-mem interface. >> - The addition of the generic SPI-NAND driver (and its bindings). >> - Several SPI NAND chip drivers (Macronix, Micron, Winbond). >> - A new 'mtd' command. >> - Support for spi-nand devices in mtdparts. >> >> To test your SPI-NAND device with U-Boot simply follow these lines: >> >>> setenv mtdparts mtdparts=spi-nand0:1m(foo),-(bar) >>> setenv mtdids spi-nand0=spi-nand0 >>> mtdparts # show the spi-nand device partitions >>> ubi part bar # create a static UBI volume in the bar partition >> >> Thanks, >> Miquèl >> >> Changes since v4: >> ----------------- >> * Added Jagan's Acked-by tags to every patch related to the >> SPI-mem/SPI-NAND addition. >> * Rebased on top of master. >> >> Changes since v3: >> ----------------- >> * Fixed the debug messages in spi-mem to print either Rx or Tx data. >> * Fixed a Kconfig error that prevented to build mtdparts with plain >> defconfig. >> * Fixed a compilation error due to the above error that prevented one >> file to be compiled. >> * Adapted the mtd command to probe MTD partitions also. >> * Declared mtd_probe_devices() in a header so mtdparts or UBI could >> use it too (to probe all devices and MTD partitions in a clean way). >> * As I worked on mtdparts, I found annoying and completely useless the >> fact that we need to prefix the environment variable with >> "mtdparts=". Canceled this obligation. >> * Added one patch to allow spi-nand devices to be recognized by mtdparts >> (this is purely useless but needed to be done in order to use this >> command). >> * Removed useless definitions of MTD device types in UBI code. >> * Wrote a generic mtdparts environment variable parser, used by the mtd >> command. >> * Used the mtd_probe_devices() function from get_mtd_info() in >> cmd/mtdparts.c to be sure the desired partition really does not exist >> (otherwise it will be probed and then found). >> >> Changes since v2: >> ----------------- >> * Rebased on u-boot master branch. >> * Removed extra-parenthesis in >> "mtd: Fallback to ->_read/write() when ->_read/write_oob() is missing" >> * s/fiels/files/ in "mtd: move NAND fiels into a raw/ subdirectory" >> * Do not describe generic SPI device properties in SPI NAND bindings. >> * Changes in the mtd command: >> * Printing more information in 'mtd list' (device type, device >> characteristics) >> * Switch to do_div() instead of '(u32)value64b % value32b' which only >> worked because value32b was a power of 2. >> * Removed erase.chip option. >> * By default, erase/read/write happen on the full MTD device while a >> dump will only work on a single page. >> >> Changes since v1: >> ----------------- >> * Fixed the nand_memorg structure of the MX35LF2GE4AB chip. >> * Added Reviewed-by tags from Jagan. >> * Backported and squashed two patches fixing things in the SPI NAND core >> received on the Linux ML. >> * Backported more changes in mtdcore.c from Linux. >> * Added a patch to add a fallback on mtd->_read/_write() in mtdcore.c >> when mtd->_read/write_oob() is not supported. >> * Removed the DT changes, useless as the DTs are not available in >> mainline yet. >> * Addressed Boris/Stefan comments on the 'mtd' command. >> * Added support for multi-pages OOB read/write. >> >> >> Boris Brezillon (7): >> mtd: Fallback to ->_read/write_oob() when ->_read/write() is missing >> mtd: Add sanity checks in mtd_write/read_oob() >> mtd: nand: Add core infrastructure to deal with NAND devices >> mtd: nand: Pass mode information to nand_page_io_req >> spi: Extend the core to ease integration of SPI memory controllers >> mtd: spinand: Add initial support for the MX35LF1GE4AB chip >> dt-bindings: Add bindings for SPI NAND devices >> >> Brian Norris (1): >> mtd: add get/set of_node/flash_node helpers >> >> Ezequiel Garcia (1): >> mtd: Uninline mtd_write_oob and move it to mtdcore.c >> >> Frieder Schrempf (1): >> mtd: spinand: Add initial support for Winbond W25M02GV >> >> Miquel Raynal (15): >> mtd: Fallback to ->_read/write() when ->_read/write_oob() is missing >> mtd: fix build issue with includes >> mtd: move definitions to enlarge their range >> mtd: move all flash categories inside MTD submenu >> mtd: move NAND files into a raw/ subdirectory >> mtd: rename nand into rawnand in Kconfig prompt >> mtd: spinand: Add initial support for the MX35LF2GE4AB chip >> mtd: declare MTD_PARTITIONS symbol in Kconfig >> cmd: ubi: delete useless and misleading definitions >> cmd: mtdparts: accept spi-nand devices >> cmd: mtdparts: add a generic 'mtdparts' parser >> cmd: mtdparts: remove useless 'mtdparts=' prefix >> mtd: uclass: add probe function >> cmd: mtd: add 'mtd' command >> cmd: mtdparts: try to probe the MTD devices as a fallback >> >> Peter Pan (2): >> mtd: nand: Add core infrastructure to support SPI NANDs >> mtd: spinand: Add initial support for Micron MT29F2G01ABAGD > > Applied to u-boot-spi/master Look like we have some build issues [1]? [1] https://travis-ci.org/openedev/u-boot-amarula/builds/410197101
Hi Jagan, On Tue, 31 Jul 2018 20:03:47 +0530 Jagan Teki <jagan@amarulasolutions.com> wrote: > > Applied to u-boot-spi/master > > Look like we have some build issues [1]? Yep, I reproduced the issue. Looks like u-boot Makefile hierarchy is a bit different from Linux one, and patch is breaking raw/parallel NAND build. I fixed it up (see below diff). This diff should be merged in patch 9, and you'll have to fix a few conflicts when rebasing. Here is a branch [1] containing this fixup commit (placed just after the offending one) in case you want to check the end result. Regards, Boris [1]https://github.com/bbrezillon/u-boot/commits/wip-spi --->8--- diff --git a/Makefile b/Makefile index 884b7d943cf7..a38146003d77 100644 --- a/Makefile +++ b/Makefile @@ -685,7 +685,7 @@ libs-y += drivers/dma/ libs-y += drivers/gpio/ libs-y += drivers/i2c/ libs-y += drivers/mtd/ -libs-$(CONFIG_CMD_NAND) += drivers/mtd/nand/ +libs-$(CONFIG_CMD_NAND) += drivers/mtd/nand/raw/ libs-y += drivers/mtd/onenand/ libs-$(CONFIG_CMD_UBI) += drivers/mtd/ubi/ libs-y += drivers/mtd/spi/ diff --git a/drivers/Makefile b/drivers/Makefile index 276e5ee4d7ee..ccd1b648d058 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -6,7 +6,7 @@ obj-$(CONFIG_$(SPL_TPL_)DRIVERS_MISC_SUPPORT) += misc/ sysreset/ firmware/ obj-$(CONFIG_$(SPL_TPL_)I2C_SUPPORT) += i2c/ obj-$(CONFIG_$(SPL_TPL_)LED) += led/ obj-$(CONFIG_$(SPL_TPL_)MMC_SUPPORT) += mmc/ -obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += mtd/nand/ +obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += mtd/nand/raw/ obj-$(CONFIG_$(SPL_TPL_)PHY) += phy/ obj-$(CONFIG_$(SPL_TPL_)PINCTRL) += pinctrl/ obj-$(CONFIG_$(SPL_TPL_)RAM) += ram/ diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 8b2d0e118d1c..69f40d15635d 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -1,3 +1,2 @@ # SPDX-License-Identifier: GPL-2.0+ -obj-$(CONFIG_MTD_NAND) += raw/
On Tue, 31 Jul 2018 21:25:53 +0200 Boris Brezillon <boris.brezillon@bootlin.com> wrote: > Hi Jagan, > > On Tue, 31 Jul 2018 20:03:47 +0530 > Jagan Teki <jagan@amarulasolutions.com> wrote: > > > > Applied to u-boot-spi/master > > > > Look like we have some build issues [1]? > > Yep, I reproduced the issue. Looks like u-boot Makefile hierarchy is a > bit different from Linux one, and patch is breaking raw/parallel NAND > build. I fixed it up (see below diff). This diff should be merged in > patch 9, and you'll have to fix a few conflicts when rebasing. Here is > a branch [1] containing this fixup commit (placed just after the > offending one) in case you want to check the end result. > New diff, this time with all tree-wide s/drivers\/mtd\/nand/drivers\/mtd\/nand\/raw/ My branch has been updated accordingly. --->8--- diff --git a/MAINTAINERS b/MAINTAINERS index fe8423530c10..db3db2ec8a43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -281,7 +281,7 @@ F: drivers/i2c/i2c-cdns.c F: drivers/i2c/muxes/pca954x.c F: drivers/i2c/zynq_i2c.c F: drivers/mmc/zynq_sdhci.c -F: drivers/mtd/nand/zynq_nand.c +F: drivers/mtd/nand/raw/zynq_nand.c F: drivers/net/phy/xilinx_phy.c F: drivers/net/zynq_gem.c F: drivers/serial/serial_zynq.c @@ -305,7 +305,7 @@ F: drivers/i2c/i2c-cdns.c F: drivers/i2c/muxes/pca954x.c F: drivers/i2c/zynq_i2c.c F: drivers/mmc/zynq_sdhci.c -F: drivers/mtd/nand/zynq_nand.c +F: drivers/mtd/nand/raw/zynq_nand.c F: drivers/net/phy/xilinx_phy.c F: drivers/net/zynq_gem.c F: drivers/serial/serial_zynq.c @@ -441,7 +441,7 @@ NAND FLASH #M: Scott Wood <oss@buserror.net> S: Orphaned (Since 2018-07) T: git git://git.denx.de/u-boot-nand-flash.git -F: drivers/mtd/nand/ +F: drivers/mtd/nand/raw/ NDS32 M: Macpaul Lin <macpaul@andestech.com> diff --git a/Makefile b/Makefile index 884b7d943cf7..a38146003d77 100644 --- a/Makefile +++ b/Makefile @@ -685,7 +685,7 @@ libs-y += drivers/dma/ libs-y += drivers/gpio/ libs-y += drivers/i2c/ libs-y += drivers/mtd/ -libs-$(CONFIG_CMD_NAND) += drivers/mtd/nand/ +libs-$(CONFIG_CMD_NAND) += drivers/mtd/nand/raw/ libs-y += drivers/mtd/onenand/ libs-$(CONFIG_CMD_UBI) += drivers/mtd/ubi/ libs-y += drivers/mtd/spi/ diff --git a/README b/README index aee0f7371c42..fd5034ce91f2 100644 --- a/README +++ b/README @@ -3264,8 +3264,8 @@ Low Level (hardware related) configuration options: a 16 bit bus. Not all NAND drivers use this symbol. Example of drivers that use it: - - drivers/mtd/nand/ndfc.c - - drivers/mtd/nand/mxc_nand.c + - drivers/mtd/nand/raw/ndfc.c + - drivers/mtd/nand/raw/mxc_nand.c - CONFIG_SYS_NDFC_EBC0_CFG Sets the EBC0_CFG register for the NDFC. If not defined @@ -3382,7 +3382,7 @@ Low Level (hardware related) configuration options: - CONFIG_SYS_NAND_NO_SUBPAGE_WRITE Option to disable subpage write in NAND driver driver that uses this: - drivers/mtd/nand/davinci_nand.c + drivers/mtd/nand/raw/davinci_nand.c Freescale QE/FMAN Firmware Support: ----------------------------------- diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c index 8ffb9a8d3c2c..1b871c62ced2 100644 --- a/arch/arm/mach-uniphier/board_late_init.c +++ b/arch/arm/mach-uniphier/board_late_init.c @@ -12,7 +12,7 @@ #include <stdio.h> #include <linux/io.h> #include <linux/printk.h> -#include <../drivers/mtd/nand/denali.h> +#include <../drivers/mtd/nand/raw/denali.h> #include "init.h" diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 2af26a881af0..7bf7a2354221 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -479,7 +479,7 @@ config SPL_NAND_SUPPORT help Enable support for NAND (Negative AND) flash in SPL. NAND flash can be used to allow SPL to load U-Boot from supported devices. - This enables the drivers in drivers/mtd/nand as part of an SPL + This enables the drivers in drivers/mtd/nand/raw as part of an SPL build. config SPL_NET_SUPPORT diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c index ba60a3a3c505..0016d4973905 100644 --- a/common/spl/spl_spi.c +++ b/common/spl/spl_spi.c @@ -2,7 +2,7 @@ /* * Copyright (C) 2011 OMICRON electronics GmbH * - * based on drivers/mtd/nand/nand_spl_load.c + * based on drivers/mtd/nand/raw/nand_spl_load.c * * Copyright (C) 2011 * Heiko Schocher, DENX Software Engineering, hs@denx.de. diff --git a/doc/README.SPL b/doc/README.SPL index 3ba313caa8f7..fc1ca1ad4f51 100644 --- a/doc/README.SPL +++ b/doc/README.SPL @@ -57,11 +57,11 @@ CONFIG_SPL_FAT_SUPPORT (fs/fat/libfat.o) CONFIG_SPL_EXT_SUPPORT CONFIG_SPL_LIBGENERIC_SUPPORT (lib/libgeneric.o) CONFIG_SPL_POWER_SUPPORT (drivers/power/libpower.o) -CONFIG_SPL_NAND_SUPPORT (drivers/mtd/nand/libnand.o) +CONFIG_SPL_NAND_SUPPORT (drivers/mtd/nand/raw/libnand.o) CONFIG_SPL_DRIVERS_MISC_SUPPORT (drivers/misc) CONFIG_SPL_DMA_SUPPORT (drivers/dma/libdma.o) CONFIG_SPL_POST_MEM_SUPPORT (post/drivers/memory.o) -CONFIG_SPL_NAND_LOAD (drivers/mtd/nand/nand_spl_load.o) +CONFIG_SPL_NAND_LOAD (drivers/mtd/nand/raw/nand_spl_load.o) CONFIG_SPL_SPI_LOAD (drivers/mtd/spi/spi_spl_load.o) CONFIG_SPL_RAM_DEVICE (common/spl/spl.c) CONFIG_SPL_WATCHDOG_SUPPORT (drivers/watchdog/libwatchdog.o) diff --git a/doc/README.arm-relocation b/doc/README.arm-relocation index 645b3746c8a8..d2a7e8122e90 100644 --- a/doc/README.arm-relocation +++ b/doc/README.arm-relocation @@ -84,7 +84,7 @@ Relocation with SPL (example for the tx25 booting from NAND Flash): - cpu copies the first page from NAND to 0xbb000000 (IMX_NFC_BASE) and start with code execution on this address. -- The First page contains u-boot code from drivers/mtd/nand/mxc_nand_spl.c +- The First page contains u-boot code from drivers/mtd/nand/raw/mxc_nand_spl.c which inits the dram, cpu registers, reloacte itself to CONFIG_SPL_TEXT_BASE and loads the "real" u-boot to CONFIG_SYS_NAND_U_BOOT_DST and starts execution @CONFIG_SYS_NAND_U_BOOT_START diff --git a/doc/README.nand b/doc/README.nand index cda11b43ffc5..ec461b2dc933 100644 --- a/doc/README.nand +++ b/doc/README.nand @@ -116,7 +116,7 @@ Configuration Options: The maximum number of NAND chips per device to be supported. CONFIG_SYS_NAND_SELF_INIT - Traditionally, glue code in drivers/mtd/nand/nand.c has driven + Traditionally, glue code in drivers/mtd/nand/raw/nand.c has driven the initialization process -- it provides the mtd and nand structs, calls a board init function for a specific device, calls nand_scan(), and registers with mtd. @@ -125,7 +125,7 @@ Configuration Options: run code between nand_scan_ident() and nand_scan_tail(), or other deviations from the "normal" flow. - If a board defines CONFIG_SYS_NAND_SELF_INIT, drivers/mtd/nand/nand.c + If a board defines CONFIG_SYS_NAND_SELF_INIT, drivers/mtd/nand/raw/nand.c will make one call to board_nand_init(), with no arguments. That function is responsible for calling a driver init function for each NAND device on the board, that performs all initialization @@ -280,7 +280,7 @@ NOTE: ===== The Disk On Chip driver is currently broken and has been for some time. -There is a driver in drivers/mtd/nand, taken from Linux, that works with +There is a driver in drivers/mtd/nand/raw, taken from Linux, that works with the current NAND system but has not yet been adapted to the u-boot environment. diff --git a/doc/README.zynq b/doc/README.zynq index 5b0672c50359..da977b2016a6 100644 --- a/doc/README.zynq +++ b/doc/README.zynq @@ -63,7 +63,7 @@ bootmode strings at runtime. spi - drivers/spi/zynq_spi.c qspi - drivers/spi/zynq_qspi.c i2c - drivers/i2c/zynq_i2c.c - nand - drivers/mtd/nand/zynq_nand.c + nand - drivers/mtd/nand/raw/zynq_nand.c - Done proper cleanups on board configurations - Added basic FDT support for zynq boards - d-cache support for zynq_gem.c diff --git a/drivers/Makefile b/drivers/Makefile index 276e5ee4d7ee..ccd1b648d058 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -6,7 +6,7 @@ obj-$(CONFIG_$(SPL_TPL_)DRIVERS_MISC_SUPPORT) += misc/ sysreset/ firmware/ obj-$(CONFIG_$(SPL_TPL_)I2C_SUPPORT) += i2c/ obj-$(CONFIG_$(SPL_TPL_)LED) += led/ obj-$(CONFIG_$(SPL_TPL_)MMC_SUPPORT) += mmc/ -obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += mtd/nand/ +obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += mtd/nand/raw/ obj-$(CONFIG_$(SPL_TPL_)PHY) += phy/ obj-$(CONFIG_$(SPL_TPL_)PINCTRL) += pinctrl/ obj-$(CONFIG_$(SPL_TPL_)RAM) += ram/ diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 8b2d0e118d1c..69f40d15635d 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -1,3 +1,2 @@ # SPDX-License-Identifier: GPL-2.0+ -obj-$(CONFIG_MTD_NAND) += raw/ diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index 305e68ad4936..e6a84a52b42b 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -9,7 +9,7 @@ /* * - * linux/drivers/mtd/nand/nand_davinci.c + * linux/drivers/mtd/nand/raw/nand_davinci.c * * NAND Flash Driver * diff --git a/drivers/mtd/nand/raw/nand_ecc.c b/drivers/mtd/nand/raw/nand_ecc.c index 05e55fce9af6..2bc329be1a3b 100644 --- a/drivers/mtd/nand/raw/nand_ecc.c +++ b/drivers/mtd/nand/raw/nand_ecc.c @@ -3,7 +3,7 @@ * This file contains an ECC algorithm from Toshiba that detects and * corrects 1 bit errors in a 256 byte block of data. * - * drivers/mtd/nand/nand_ecc.c + * drivers/mtd/nand/raw/nand_ecc.c * * Copyright (C) 2000-2004 Steven J. Hill (sjhill@realitydiluted.com) * Toshiba America Electronics Components, Inc. diff --git a/drivers/mtd/nand/raw/nand_util.c b/drivers/mtd/nand/raw/nand_util.c index 1ded7aa9207d..fc2235c1a0ec 100644 --- a/drivers/mtd/nand/raw/nand_util.c +++ b/drivers/mtd/nand/raw/nand_util.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * drivers/mtd/nand/nand_util.c + * drivers/mtd/nand/raw/nand_util.c * * Copyright (C) 2006 by Weiss-Electronic GmbH. * All rights reserved. diff --git a/drivers/mtd/nand/raw/pxa3xx_nand.c b/drivers/mtd/nand/raw/pxa3xx_nand.c index 9d02fd8eb113..67b2b62f76cc 100644 --- a/drivers/mtd/nand/raw/pxa3xx_nand.c +++ b/drivers/mtd/nand/raw/pxa3xx_nand.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * drivers/mtd/nand/pxa3xx_nand.c + * drivers/mtd/nand/raw/pxa3xx_nand.c * * Copyright © 2005 Intel Corporation * Copyright © 2006 Marvell International Ltd. diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h index 1f56deb15182..2a58058ebb56 100644 --- a/include/configs/MPC8313ERDB.h +++ b/include/configs/MPC8313ERDB.h @@ -242,7 +242,7 @@ /* LB refresh timer prescal, 266MHz/32 */ #define CONFIG_SYS_LBC_MRTPR 0x20000000 /*TODO */ -/* drivers/mtd/nand/nand.c */ +/* drivers/mtd/nand/raw/nand.c */ #if defined(CONFIG_NAND) && defined(CONFIG_SPL_BUILD) #define CONFIG_SYS_NAND_BASE 0xFFF00000 #else
On Wed, Aug 1, 2018 at 12:55 AM, Boris Brezillon <boris.brezillon@bootlin.com> wrote: > Hi Jagan, > > On Tue, 31 Jul 2018 20:03:47 +0530 > Jagan Teki <jagan@amarulasolutions.com> wrote: > >> > Applied to u-boot-spi/master >> >> Look like we have some build issues [1]? > > Yep, I reproduced the issue. Looks like u-boot Makefile hierarchy is a > bit different from Linux one, and patch is breaking raw/parallel NAND > build. I fixed it up (see below diff). This diff should be merged in > patch 9, and you'll have to fix a few conflicts when rebasing. Here is > a branch [1] containing this fixup commit (placed just after the > offending one) in case you want to check the end result. Thanks, better send a patch v5.1 and point me where we need to apply with in the series so-that it can't break individual commits.
Hi Jagan, Jagan Teki <jagan@amarulasolutions.com> wrote on Wed, 1 Aug 2018 11:55:19 +0530: > On Wed, Aug 1, 2018 at 12:55 AM, Boris Brezillon > <boris.brezillon@bootlin.com> wrote: > > Hi Jagan, > > > > On Tue, 31 Jul 2018 20:03:47 +0530 > > Jagan Teki <jagan@amarulasolutions.com> wrote: > > > >> > Applied to u-boot-spi/master > >> > >> Look like we have some build issues [1]? > > > > Yep, I reproduced the issue. Looks like u-boot Makefile hierarchy is a > > bit different from Linux one, and patch is breaking raw/parallel NAND > > build. I fixed it up (see below diff). This diff should be merged in > > patch 9, and you'll have to fix a few conflicts when rebasing. Here is > > a branch [1] containing this fixup commit (placed just after the > > offending one) in case you want to check the end result. > > Thanks, better send a patch v5.1 and point me where we need to apply > with in the series so-that it can't break individual commits. Thanks Boris for fixing the build, while I actually forgot some changes in MAINTAINERS, doc, README... The current way of compiling the NAND subsystem from the root Makefile is clearly something to fix. I'll send a v6 with Boris fixup included, you'll just have to apply. Thanks, Miquèl