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/afeb9260/afeb9260.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'board/afeb9260') diff --git a/board/afeb9260/afeb9260.c b/board/afeb9260/afeb9260.c index dd29d9163..0f9c50486 100644 --- a/board/afeb9260/afeb9260.c +++ b/board/afeb9260/afeb9260.c @@ -78,19 +78,6 @@ static void afeb9260_nand_hw_init(void) at91_set_gpio_output(AT91_PIN_PC14, 1); } -static void afeb9260_spi_hw_init(void) -{ - at91_set_A_periph(AT91_PIN_PA3, 0); /* SPI0_NPCS0 */ - at91_set_B_periph(AT91_PIN_PC11, 0); /* SPI0_NPCS1 */ - - at91_set_A_periph(AT91_PIN_PA0, 0); /* SPI0_MISO */ - at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ - at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ - - /* Enable clock */ - at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_SPI0); -} - #ifdef CONFIG_MACB static void afeb9260_macb_hw_init(void) { @@ -179,7 +166,7 @@ int board_init(void) #ifdef CONFIG_CMD_NAND afeb9260_nand_hw_init(); #endif - afeb9260_spi_hw_init(); + at91_spi0_hw_init((1 << 0) || (1 << 1)); #ifdef CONFIG_MACB afeb9260_macb_hw_init(); #endif -- cgit v1.2.3