Blackfin: bf518f-ezbrd: setup portmux for async flash
authorGraf Yang <graf.yang@analog.com>
Sun, 24 May 2009 06:34:34 +0000 (02:34 -0400)
committerMike Frysinger <vapier@gentoo.org>
Tue, 26 May 2009 02:38:42 +0000 (22:38 -0400)
The pins for async memory where parallel flash lives are not enabled by
default, so make sure we mux them as needed.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
board/bf518f-ezbrd/bf518f-ezbrd.c
include/configs/bf518f-ezbrd.h

index ec5a7ed0b1dfc523d07d0719265e6a678dbaa08d..63be7cf06c90dea9e711ef440ac3d0221e24305a 100644 (file)
@@ -146,3 +146,19 @@ int misc_init_r(void)
 
        return 0;
 }
+
+int board_early_init_f(void)
+{
+#if !defined(CONFIG_SYS_NO_FLASH)
+       /* setup BF518-EZBRD GPIO pin PG11 to AMS2. */
+       bfin_write_PORTG_MUX((bfin_read_PORTG_MUX() & ~PORT_x_MUX_6_MASK) | PORT_x_MUX_6_FUNC_2);
+       bfin_write_PORTG_FER(bfin_read_PORTG_FER() | PG11);
+
+# if !defined(CONFIG_BFIN_SPI)
+       /* setup BF518-EZBRD GPIO pin PG15 to AMS3. */
+       bfin_write_PORTG_MUX((bfin_read_PORTG_MUX() & ~PORT_x_MUX_7_MASK) | PORT_x_MUX_7_FUNC_3);
+       bfin_write_PORTG_FER(bfin_read_PORTG_FER() | PG15);
+# endif
+#endif
+       return 0;
+}
index 77b94a8baf9939e62d376285df7927d9d4a898ab..06f2765a0d586b30de748a3a81d1f8ec1d317884 100644 (file)
 /*
  * Misc Settings
  */
+#define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_MISC_INIT_R
 #define CONFIG_RTC_BFIN
 #define CONFIG_UART_CONSOLE    0