From 7ebafb7ec1a0285af8380623c009576f92583b98 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 21 Mar 2009 21:07:59 +0100 Subject: at91sam9/at91cap: move common spi initialisation to cpu Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- board/atmel/at91sam9263ek/at91sam9263ek.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'board/atmel/at91sam9263ek') diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index 37634a8..1a3e39c 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -87,20 +87,6 @@ static void at91sam9263ek_nand_hw_init(void) } #endif -#ifdef CONFIG_HAS_DATAFLASH -static void at91sam9263ek_spi_hw_init(void) -{ - at91_set_B_periph(AT91_PIN_PA5, 0); /* SPI0_NPCS0 */ - - at91_set_B_periph(AT91_PIN_PA0, 0); /* SPI0_MISO */ - at91_set_B_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ - at91_set_B_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ - - /* Enable clock */ - at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_SPI0); -} -#endif - #ifdef CONFIG_MACB static void at91sam9263ek_macb_hw_init(void) { @@ -280,7 +266,8 @@ int board_init(void) at91sam9263ek_nand_hw_init(); #endif #ifdef CONFIG_HAS_DATAFLASH - at91sam9263ek_spi_hw_init(); + at91_set_gpio_output(AT91_PIN_PE20, 1); /* select spi0 clock */ + at91_spi0_hw_init(1 << 0); #endif #ifdef CONFIG_MACB at91sam9263ek_macb_hw_init(); -- cgit v1.1