diff options
Diffstat (limited to 'board/atmel/at91sam9n12ek/at91sam9n12ek.c')
-rw-r--r-- | board/atmel/at91sam9n12ek/at91sam9n12ek.c | 64 |
1 files changed, 13 insertions, 51 deletions
diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c index 58da2d2..1105428 100644 --- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c +++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c @@ -13,9 +13,9 @@ #include <asm/arch/at91_rstc.h> #include <asm/arch/at91_pio.h> #include <asm/arch/clk.h> +#include <debug_uart.h> #include <lcd.h> #include <atmel_hlcdc.h> -#include <atmel_mci.h> #include <netdev.h> #ifdef CONFIG_LCD_INFO @@ -132,48 +132,6 @@ void lcd_show_board_info(void) #endif /* CONFIG_LCD_INFO */ #endif /* CONFIG_LCD */ -/* SPI chip select control */ -#ifdef CONFIG_ATMEL_SPI -#include <spi.h> -int spi_cs_is_valid(unsigned int bus, unsigned int cs) -{ - return bus == 0 && cs < 2; -} - -void spi_cs_activate(struct spi_slave *slave) -{ - switch (slave->cs) { - case 0: - at91_set_pio_output(AT91_PIO_PORTA, 14, 0); - break; - case 1: - at91_set_pio_output(AT91_PIO_PORTA, 7, 0); - break; - } -} - -void spi_cs_deactivate(struct spi_slave *slave) -{ - switch (slave->cs) { - case 0: - at91_set_pio_output(AT91_PIO_PORTA, 14, 1); - break; - case 1: - at91_set_pio_output(AT91_PIO_PORTA, 7, 1); - break; - } -} -#endif /* CONFIG_ATMEL_SPI */ - -#ifdef CONFIG_GENERIC_ATMEL_MCI -int board_mmc_init(bd_t *bd) -{ - at91_mci_hw_init(); - - return atmel_mci_init((void *)ATMEL_BASE_HSMCI0); -} -#endif - #ifdef CONFIG_KS8851_MLL void at91sam9n12ek_ks8851_hw_init(void) { @@ -205,14 +163,22 @@ void at91sam9n12ek_usb_hw_init(void) } #endif -int board_early_init_f(void) +#ifdef CONFIG_DEBUG_UART_BOARD_INIT +void board_debug_uart_init(void) { - at91_periph_clk_enable(ATMEL_ID_PIOAB); - at91_periph_clk_enable(ATMEL_ID_PIOCD); - at91_seriald_hw_init(); +} +#endif + +#ifdef CONFIG_BOARD_EARLY_INIT_F +int board_early_init_f(void) +{ +#ifdef CONFIG_DEBUG_UART + debug_uart_init(); +#endif return 0; } +#endif int board_init(void) { @@ -223,10 +189,6 @@ int board_init(void) at91sam9n12ek_nand_hw_init(); #endif -#ifdef CONFIG_ATMEL_SPI - at91_spi0_hw_init(1 << 0); -#endif - #ifdef CONFIG_LCD at91_lcd_hw_init(); #endif |