summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorWu, Josh <Josh.wu@atmel.com>2015-02-02 17:51:00 +0800
committerAndreas Bießmann <andreas.devel@googlemail.com>2015-03-18 23:36:01 +0100
commit111ec4c65208bb13f3957d5a1c84b228eb83bdde (patch)
tree31d1051fca9d7675b6be60d4263d2ba4c1dab7ef /arch/arm
parent65b553b71cc9863c49f6973f13083159e935297f (diff)
downloadtalos-obmc-uboot-111ec4c65208bb13f3957d5a1c84b228eb83bdde.tar.gz
talos-obmc-uboot-111ec4c65208bb13f3957d5a1c84b228eb83bdde.zip
ARM: at91: at91sam9rlek: add mci support
This patch enable the MCI support for at91sam9rlek board. Signed-off-by: Josh Wu <josh.wu@atmel.com> [rebase on ToT] Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-at91/arm926ejs/at91sam9rl_devices.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/arm926ejs/at91sam9rl_devices.c b/arch/arm/mach-at91/arm926ejs/at91sam9rl_devices.c
index 0ec32c3ab9..857c864068 100644
--- a/arch/arm/mach-at91/arm926ejs/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/arm926ejs/at91sam9rl_devices.c
@@ -101,3 +101,20 @@ void at91_spi0_hw_init(unsigned long cs_mask)
}
}
#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, 2, 0); /* MCI CLK */
+ at91_set_a_periph(AT91_PIO_PORTA, 1, 0); /* MCI CDA */
+ at91_set_a_periph(AT91_PIO_PORTA, 0, 0); /* MCI DA0 */
+ at91_set_a_periph(AT91_PIO_PORTA, 3, 0); /* MCI DA1 */
+ at91_set_a_periph(AT91_PIO_PORTA, 4, 0); /* MCI DA2 */
+ at91_set_a_periph(AT91_PIO_PORTA, 5, 0); /* MCI DA3 */
+
+ /* Enable clock */
+ writel(1 << ATMEL_ID_MCI, &pmc->pcer);
+}
+#endif
OpenPOWER on IntegriCloud