Skip to contentSkip to conversation

mtd: nand : zynq_nand: Add nand driver support for zynq

PATCH New Siva Durga Prasad Paladugu 2 participants 3 messages Sep 27, 2016 – Oct 18, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 mtd: nand : zynq_nand: Add nand driver support for zynq

Add nand flash controller driver support for zynq SoC.

---
Changes for v3:
- Fixed compilation failure by correct errno.h inclusion
- Fixed compilation warning
Changes for v2:
- Corrected the from address

---
 drivers/mtd/nand/Kconfig     |    7 +
 drivers/mtd/nand/Makefile    |    1 +
 drivers/mtd/nand/zynq_nand.c | 1186 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 1194 insertions(+)
 create mode 100644 drivers/mtd/nand/zynq_nand.c
drivers/mtd/nand/Kconfig +7 -0
index 5ce7d6d..7e5c436 100644
@@ -80,6 +80,13 @@ config NAND_ARASAN
 	  controller. This uses the hardware ECC for read and
 	  write operations.
 
+config NAND_ZYNQ
+	bool "Support for Zynq Nand controller"
+	select SYS_NAND_SELF_INIT
+	help
+	  This enables Nand driver support for Nand flash controller
+	  found on Zynq SoC.
+
 comment "Generic NAND options"
 
 # Enhance depends when converting drivers to Kconfig which use this config
drivers/mtd/nand/Makefile +1 -0
index 1df9273..fd4bb66 100644
@@ -67,6 +67,7 @@ obj-$(CONFIG_NAND_OMAP_GPMC) += omap_gpmc.o
 obj-$(CONFIG_NAND_OMAP_ELM) += omap_elm.o
 obj-$(CONFIG_NAND_PLAT) += nand_plat.o
 obj-$(CONFIG_NAND_SUNXI) += sunxi_nand.o
+obj-$(CONFIG_NAND_ZYNQ) += zynq_nand.o
 
 else  # minimal SPL drivers
 
drivers/mtd/nand/zynq_nand.c new file +1186 -0

1,186 lines not on this page · raw message

Signature · 1 line
2.7.4
#1 lore raw

PATCH v3 2/2 zynq: nand: Enable Nand flash controller driver a zynq board

Enable zynq Nand flash controller driver for a zynq ZC770 XM011(dc2) board.

---
Changes for v3:
- None
Changes for v2:
- Corrected the from address

---
 configs/zynq_zc770_xm011_defconfig | 2 ++
 include/configs/zynq-common.h      | 7 +++++++
 2 files changed, 9 insertions(+)
configs/zynq_zc770_xm011_defconfig +2 -0
index b841fdc..3ce7114 100644
@@ -4,6 +4,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm011"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_SIGNATURE=y
+CONFIG_NAND_ZYNQ=y
 CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM011"
 CONFIG_SYS_NO_FLASH=y
 CONFIG_SPL=y
@@ -18,6 +19,7 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
+CONFIG_CMD_NAND=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ZYNQ_GEM=y
include/configs/zynq-common.h +7 -0
index 260df2f..27c02e5 100644
@@ -76,6 +76,13 @@
 # define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
 #endif
 
+#ifdef CONFIG_NAND_ZYNQ
+#define CONFIG_CMD_NAND_LOCK_UNLOCK
+#define CONFIG_SYS_MAX_NAND_DEVICE	1
+#define CONFIG_SYS_NAND_ONFI_DETECTION
+#define CONFIG_MTD_DEVICE
+#endif
+
 /* MMC */
 #if defined(CONFIG_ZYNQ_SDHCI)
 # define CONFIG_MMC
Signature · 1 line
2.7.4
Applied
#2 lore raw

PATCH v3 2/2 zynq: nand: Enable Nand flash controller driver a zynq board

Quoted 43 lines · Siva Durga Prasad Paladugu

Enable zynq Nand flash controller driver for a zynq ZC770 XM011(dc2) board.

---
Changes for v3:
- None
Changes for v2:
- Corrected the from address

---
 configs/zynq_zc770_xm011_defconfig | 2 ++
 include/configs/zynq-common.h      | 7 +++++++
 2 files changed, 9 insertions(+)
configs/zynq_zc770_xm011_defconfig +2 -0
index b841fdc..3ce7114 100644
@@ -4,6 +4,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm011"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_SIGNATURE=y
+CONFIG_NAND_ZYNQ=y
 CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM011"
 CONFIG_SYS_NO_FLASH=y
 CONFIG_SPL=y
@@ -18,6 +19,7 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
+CONFIG_CMD_NAND=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ZYNQ_GEM=y
include/configs/zynq-common.h +0 -0
index 260df2f..27c02e5 100644
@@ -76,6 +76,13 @@
 # define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
 #endif
 

include/configs/zynq-common.h line 88

Quoted 10 lines
include/configs/zynq-common.h +7 -0
+#ifdef CONFIG_NAND_ZYNQ
+#define CONFIG_CMD_NAND_LOCK_UNLOCK
+#define CONFIG_SYS_MAX_NAND_DEVICE	1
+#define CONFIG_SYS_NAND_ONFI_DETECTION
+#define CONFIG_MTD_DEVICE
+#endif
+
 /* MMC */
 #if defined(CONFIG_ZYNQ_SDHCI)
 # define CONFIG_MMC

Applied both to my tree.

Thanks,
Michal

Signature · 15 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161018/64668edc/attachment.sig>