All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 00/27] SPI-NAND support
Date: Tue, 31 Jul 2018 21:48:26 +0200	[thread overview]
Message-ID: <20180731214826.77de1903@bbrezillon> (raw)
In-Reply-To: <20180731212553.7f26b368@bbrezillon>

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 at 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 at 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

  reply	other threads:[~2018-07-31 19:48 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-30 15:46 [U-Boot] [PATCH v5 00/27] SPI-NAND support Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 01/27] mtd: Fallback to ->_read/write_oob() when ->_read/write() is missing Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 02/27] mtd: Uninline mtd_write_oob and move it to mtdcore.c Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 03/27] mtd: Add sanity checks in mtd_write/read_oob() Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 04/27] mtd: Fallback to ->_read/write() when ->_read/write_oob() is missing Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 05/27] mtd: add get/set of_node/flash_node helpers Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 06/27] mtd: fix build issue with includes Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 07/27] mtd: move definitions to enlarge their range Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 08/27] mtd: move all flash categories inside MTD submenu Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 09/27] mtd: move NAND files into a raw/ subdirectory Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 10/27] mtd: rename nand into rawnand in Kconfig prompt Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 11/27] mtd: nand: Add core infrastructure to deal with NAND devices Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 12/27] mtd: nand: Pass mode information to nand_page_io_req Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 13/27] spi: Extend the core to ease integration of SPI memory controllers Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 14/27] mtd: nand: Add core infrastructure to support SPI NANDs Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 15/27] mtd: spinand: Add initial support for Micron MT29F2G01ABAGD Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 16/27] mtd: spinand: Add initial support for Winbond W25M02GV Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 17/27] mtd: spinand: Add initial support for the MX35LF1GE4AB chip Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 18/27] mtd: spinand: Add initial support for the MX35LF2GE4AB chip Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 19/27] dt-bindings: Add bindings for SPI NAND devices Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 20/27] mtd: declare MTD_PARTITIONS symbol in Kconfig Miquel Raynal
2018-07-31  7:24   ` Jagan Teki
2018-07-30 15:46 ` [U-Boot] [PATCH v5 21/27] cmd: ubi: delete useless and misleading definitions Miquel Raynal
2018-07-31  7:25   ` Jagan Teki
2018-07-30 15:46 ` [U-Boot] [PATCH v5 22/27] cmd: mtdparts: accept spi-nand devices Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 23/27] cmd: mtdparts: add a generic 'mtdparts' parser Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 24/27] cmd: mtdparts: remove useless 'mtdparts=' prefix Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 25/27] mtd: uclass: add probe function Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 26/27] cmd: mtd: add 'mtd' command Miquel Raynal
2018-07-30 15:46 ` [U-Boot] [PATCH v5 27/27] cmd: mtdparts: try to probe the MTD devices as a fallback Miquel Raynal
2018-07-31  7:29 ` [U-Boot] [PATCH v5 00/27] SPI-NAND support Jagan Teki
2018-07-31 14:33   ` Jagan Teki
2018-07-31 19:25     ` Boris Brezillon
2018-07-31 19:48       ` Boris Brezillon [this message]
2018-08-01  6:25       ` Jagan Teki
2018-08-01  8:14         ` Miquel Raynal
2018-08-02 13:46 Jose Landeros

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180731214826.77de1903@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.