From: Mike Frysinger Date: Sun, 24 May 2009 02:37:41 -0400 Subject: [U-Boot] [PATCH] Blackfin: bf518f-ezbrd: setup portmux for async flash Message-ID: <1243147061-9232-1-git-send-email-vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Graf Yang 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 Signed-off-by: Mike Frysinger --- board/bf518f-ezbrd/bf518f-ezbrd.c | 16 ++++++++++++++++ include/configs/bf518f-ezbrd.h | 1 + 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/board/bf518f-ezbrd/bf518f-ezbrd.c b/board/bf518f-ezbrd/bf518f-ezbrd.c index ec5a7ed..63be7cf 100644 --- a/board/bf518f-ezbrd/bf518f-ezbrd.c +++ b/board/bf518f-ezbrd/bf518f-ezbrd.c @@ -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; +} diff --git a/include/configs/bf518f-ezbrd.h b/include/configs/bf518f-ezbrd.h index 77b94a8..06f2765 100644 --- a/include/configs/bf518f-ezbrd.h +++ b/include/configs/bf518f-ezbrd.h @@ -132,6 +132,7 @@ /* * Misc Settings */ +#define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_MISC_INIT_R #define CONFIG_RTC_BFIN #define CONFIG_UART_CONSOLE 0 -- 1.6.3.1