From: Pekon Gupta Date: Tue, 1 Oct 2013 00:14:43 +0530 Subject: [U-Boot] [PATCH v2 1/2] ti814x: enable support for parallel NAND flash devices Message-ID: <1380566684-10459-1-git-send-email-pekon@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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(-) 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) \ -- 1.8.1