Patchwork [U-Boot,v2,1/2] ti814x: enable support for parallel NAND flash devices

login
register
mail settings
Submitter pekon gupta
Date Sept. 30, 2013, 6:44 p.m.
Message ID <1380566684-10459-1-git-send-email-pekon@ti.com>
Download mbox | patch
Permalink /patch/279211/
State Superseded
Delegated to: Tom Rini
Headers show

Comments

pekon gupta - Sept. 30, 2013, 6:44 p.m.
TI81xx (TI816x, TI814x, TI813x) family of devices include in-built
GPMC and ELM hardware controllers which have the capability to support:
- x8 and x16 parallel NAND, NOR flash devices.
- generation and error detection of Hamming and BCH ECC schemes.

This patch enables support for detection and boot via NAND flash devices
for TI814x SoC.

Signed-off-by: Pekon Gupta <pekon@ti.com>
---
 arch/arm/cpu/armv7/am33xx/clock_ti814x.c      | 5 +++++
 arch/arm/include/asm/arch-am33xx/mux_ti814x.h | 5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

Patch

diff --git a/arch/arm/cpu/armv7/am33xx/clock_ti814x.c b/arch/arm/cpu/armv7/am33xx/clock_ti814x.c
index ef14f47..341f341 100644
--- a/arch/arm/cpu/armv7/am33xx/clock_ti814x.c
+++ b/arch/arm/cpu/armv7/am33xx/clock_ti814x.c
@@ -188,6 +188,11 @@  static void enable_per_clocks(void)
 	writel(PRCM_MOD_EN, &cmalwon->rtcclkctrl);
 	while (readl(&cmalwon->rtcclkctrl) != PRCM_MOD_EN)
 		;
+
+	/* GPMC */
+	writel(PRCM_MOD_EN, &cmalwon->gpmcclkctrl);
+	while (readl(&cmalwon->gpmcclkctrl) != PRCM_MOD_EN)
+		;
 }
 
 /*
diff --git a/arch/arm/include/asm/arch-am33xx/mux_ti814x.h b/arch/arm/include/asm/arch-am33xx/mux_ti814x.h
index a26e503..6105b27 100644
--- a/arch/arm/include/asm/arch-am33xx/mux_ti814x.h
+++ b/arch/arm/include/asm/arch-am33xx/mux_ti814x.h
@@ -19,8 +19,9 @@ 
 /* PAD Control Fields */
 #define PINCNTL_RSV_MSK	(0x3 << 18) /* Reserved bitmask */
 #define PULLUP_EN	(0x1 << 17) /* Pull UP Selection */
-#define PULLUDEN	(0x0 << 16) /* Pull up enabled */
-#define PULLUDDIS	(0x1 << 16) /* Pull up disabled */
+#define PULLDOWN_EN	(0x1 << 17) /* Pull UP Selection */
+#define PULL_ENABLE	(0x0 << 16) /* Pull up enabled */
+#define PULL_DISABLE	(0x1 << 16) /* Pull up disabled */
 #define MODE(val)	val	/* used for Readability */
 
 #define MUX_CFG(value, offset)				\