at91sam9/at91cap: move common spi initialisation to cpu
[platform/kernel/u-boot.git] / board / atmel / at91sam9260ek / at91sam9260ek.c
index 985daf7..ad9dfeb 100644 (file)
@@ -83,21 +83,6 @@ static void at91sam9260ek_nand_hw_init(void)
 }
 #endif
 
-#ifdef CONFIG_HAS_DATAFLASH
-static void at91sam9260ek_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);
-}
-#endif
-
 #ifdef CONFIG_MACB
 static void at91sam9260ek_macb_hw_init(void)
 {
@@ -196,7 +181,7 @@ int board_init(void)
        at91sam9260ek_nand_hw_init();
 #endif
 #ifdef CONFIG_HAS_DATAFLASH
-       at91sam9260ek_spi_hw_init();
+       at91_spi0_hw_init((1 << 0) || (1 << 1));
 #endif
 #ifdef CONFIG_MACB
        at91sam9260ek_macb_hw_init();