]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/arm926ejs/at91/at91sam9m10g45_devices.c
ARM: at91sam9m10g45ek: enable mci0 support
[karo-tx-uboot.git] / arch / arm / cpu / arm926ejs / at91 / at91sam9m10g45_devices.c
index 7d7725c4b831392c3bddff515f9df574de44cf9f..0e6c0da1bdd4cfeefb2c7f3e20d207550b76c4c6 100644 (file)
@@ -165,3 +165,20 @@ void at91_macb_hw_init(void)
 #endif
 }
 #endif
+
+#ifdef CONFIG_GENERIC_ATMEL_MCI
+void at91_mci_hw_init(void)
+{
+       struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
+
+       at91_set_a_periph(AT91_PIO_PORTA, 0, 0);        /* MCI0 CLK */
+       at91_set_a_periph(AT91_PIO_PORTA, 1, 0);        /* MCI0 CDA */
+       at91_set_a_periph(AT91_PIO_PORTA, 2, 0);        /* MCI0 DA0 */
+       at91_set_a_periph(AT91_PIO_PORTA, 3, 0);        /* MCI0 DA1 */
+       at91_set_a_periph(AT91_PIO_PORTA, 4, 0);        /* MCI0 DA2 */
+       at91_set_a_periph(AT91_PIO_PORTA, 5, 0);        /* MCI0 DA3 */
+
+       /* Enable clock */
+       writel(1 << ATMEL_ID_MCI0, &pmc->pcer);
+}
+#endif