[PATCH 1/3] -NAND - nand driver configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
The patch configures the nand driver, enable the nand driver in default configuration. Provide the menuconfig option for ECC
computation.

Files modified:
1. arch/arm/configs/omap_3430sdp_defconfig 
2. drivers/mtd/nand/Kconfig
3. include/asm-arm/arch-omap/nand.h

Regards,
-Sameer


Description: This patch configures the generic nand driver, enables the nand
driver in default configuration. Provides menuconfig option for HW ECC support
Signed-off-by: Sameer U <sameersu@xxxxxx>
Ack-by: Nishant Kamat <nskamat@xxxxxx>
	  Rohit Choraria <rohitkc@xxxxxx>
---
 arch/arm/configs/omap_3430sdp_defconfig |   11 ++++++++++-
 drivers/mtd/nand/Kconfig                |   16 +++++++++++++---
 include/asm-arm/arch-omap/nand.h        |   10 +++++++++-
 3 files changed, 32 insertions(+), 5 deletions(-)

Index: linux-omap-git/drivers/mtd/nand/Kconfig
===================================================================
--- linux-omap-git.orig/drivers/mtd/nand/Kconfig
+++ linux-omap-git/drivers/mtd/nand/Kconfig
@@ -70,10 +70,20 @@ config MTD_NAND_AMS_DELTA
 	  Support for NAND flash on Amstrad E3 (Delta).
 
 config MTD_NAND_OMAP2
-	tristate "NAND Flash device on OMAP 2420H4/2430SDP boards"
-	depends on (ARM && ARCH_OMAP2 && MTD_NAND)
+	tristate "NAND Flash device on OMAP 3430SDP/2420H4/2430SDP boards"
+	depends on (ARM && (ARCH_OMAP2 || ARCH_OMAP3) && MTD_NAND)
 	help
-          Support for NAND flash on Texas Instruments 2430SDP/2420H4 platforms.
+          Support for NAND flash on Texas Instruments 3430SDP/2430SDP/2420H4 platforms.
+
+config MTD_NAND_OMAP_HWECC
+        bool "The hardware ECC support"
+        depends on MTD_NAND && MTD_NAND_OMAP2
+        default n
+        help
+          The ECC compuatation for the data to be written/read can be either by
+          software or omap has Hw ecc engine which calculates it.
+          MTD_NAND_OMAP_HWECC = y which enables the hw ecc
+          MTD_NAND_OMAP_HWECC = n, enables software ecc
 
 config MTD_NAND_OMAP
 	tristate "NAND Flash device on OMAP H3/H2/P2 boards"
Index: linux-omap-git/include/asm-arm/arch-omap/nand.h
===================================================================
--- linux-omap-git.orig/include/asm-arm/arch-omap/nand.h
+++ linux-omap-git/include/asm-arm/arch-omap/nand.h
@@ -17,8 +17,16 @@ struct omap_nand_platform_data {
 	struct mtd_partition	*parts;
 	int			nr_parts;
 	int			(*nand_setup)(void __iomem *);
-	int			(*dev_ready)(struct omap_nand_platform_data *);
+	unsigned int		(*dev_ready)(struct omap_nand_platform_data *);
 	int			dma_channel;
 	void __iomem		*gpmc_cs_baseaddr;
 	void __iomem		*gpmc_baseaddr;
+	unsigned int		plat_options;
+	char			device_width;
 };
+
+/* Platform specific options definitions */
+#define NAND_WAITPOL_LOW	0 << 0
+#define NAND_WAITPOL_HIGH	1 << 0
+#define NAND_WAITPOL_MASK	1 << 0
+
Index: linux-omap-git/arch/arm/configs/omap_3430sdp_defconfig
===================================================================
--- linux-omap-git.orig/arch/arm/configs/omap_3430sdp_defconfig
+++ linux-omap-git/arch/arm/configs/omap_3430sdp_defconfig
@@ -460,7 +460,16 @@ CONFIG_MTD_OMAP_NOR=y
 # CONFIG_MTD_DOC2000 is not set
 # CONFIG_MTD_DOC2001 is not set
 # CONFIG_MTD_DOC2001PLUS is not set
-# CONFIG_MTD_NAND is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+CONFIG_MTD_NAND_ECC_SMC=y
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+CONFIG_MTD_NAND_OMAP2=y
+#CONFIG_MTD_NAND_OMAP_HWECC is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
 CONFIG_MTD_ONENAND=y
 CONFIG_MTD_ONENAND_VERIFY_WRITE=y
 # CONFIG_MTD_ONENAND_GENERIC is not set

-
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux