[PATCH 4/4] ARM: OMAP: pcm051: Create own NAND mux struct

Teresa Gámez t.gamez at phytec.de
Tue Aug 6 05:53:07 EDT 2013


NAND_WPN is not used on PCM051 so create own NAND
pin mux struct.

Signed-off-by: Teresa Gámez <t.gamez at phytec.de>
---
 arch/arm/boards/pcm051/board.c |    2 +-
 arch/arm/boards/pcm051/mux.c   |   23 +++++++++++++++++++++++
 arch/arm/boards/pcm051/mux.h   |    1 +
 3 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/arch/arm/boards/pcm051/board.c b/arch/arm/boards/pcm051/board.c
index 1993f34..35a3a25 100644
--- a/arch/arm/boards/pcm051/board.c
+++ b/arch/arm/boards/pcm051/board.c
@@ -162,7 +162,7 @@ static void pcm051_i2c_init(void)
 
 static void pcm051_nand_init(void)
 {
-	am33xx_enable_nand_pin_mux();
+	pcm051_enable_nand_pin_mux();
 
 	gpmc_generic_init(0x12);
 
diff --git a/arch/arm/boards/pcm051/mux.c b/arch/arm/boards/pcm051/mux.c
index 6ef5af1..89b4496 100644
--- a/arch/arm/boards/pcm051/mux.c
+++ b/arch/arm/boards/pcm051/mux.c
@@ -14,6 +14,24 @@ static const struct module_pin_mux mmc0_pin_mux[] = {
 	{-1},
 };
 
+static const struct module_pin_mux nand_pin_mux[] = {
+	{OFFSET(gpmc_ad0), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD0 */
+	{OFFSET(gpmc_ad1), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD1 */
+	{OFFSET(gpmc_ad2), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD2 */
+	{OFFSET(gpmc_ad3), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD3 */
+	{OFFSET(gpmc_ad4), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD4 */
+	{OFFSET(gpmc_ad5), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD5 */
+	{OFFSET(gpmc_ad6), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD6 */
+	{OFFSET(gpmc_ad7), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD7 */
+	{OFFSET(gpmc_wait0), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* NAND WAIT */
+	{OFFSET(gpmc_csn0), (MODE(0) | PULLUDEN)},	/* NAND_CS0 */
+	{OFFSET(gpmc_advn_ale), (MODE(0) | PULLUDEN)},	/* NAND_ADV_ALE */
+	{OFFSET(gpmc_oen_ren), (MODE(0) | PULLUDEN)},	/* NAND_OE */
+	{OFFSET(gpmc_wen), (MODE(0) | PULLUDEN)},	/* NAND_WEN */
+	{OFFSET(gpmc_be0n_cle), (MODE(0) | PULLUDEN)},	/* NAND_BE_CLE */
+	{-1},
+};
+
 static const struct module_pin_mux user_led_pin_mux[] = {
 	{OFFSET(gpmc_csn1), MODE(7) | PULLUDEN}, /* USER LED1 */
 	{OFFSET(gpmc_csn2), MODE(7) | PULLUDEN}, /* USER LED2 */
@@ -31,6 +49,11 @@ void pcm051_enable_mmc0_pin_mux(void)
 	configure_module_pin_mux(mmc0_pin_mux);
 }
 
+void pcm051_enable_nand_pin_mux(void)
+{
+	configure_module_pin_mux(nand_pin_mux);
+}
+
 void pcm051_enable_user_led_pin_mux(void)
 {
 	configure_module_pin_mux(user_led_pin_mux);
diff --git a/arch/arm/boards/pcm051/mux.h b/arch/arm/boards/pcm051/mux.h
index 4008376..5cdbe0c 100644
--- a/arch/arm/boards/pcm051/mux.h
+++ b/arch/arm/boards/pcm051/mux.h
@@ -1,3 +1,4 @@
 extern void pcm051_enable_mmc0_pin_mux(void);
+extern void pcm051_enable_nand_pin_mux(void);
 extern void pcm051_enable_user_led_pin_mux(void);
 extern void pcm051_enable_user_btn_pin_mux(void);
-- 
1.7.0.4




More information about the barebox mailing list