diff options
author | Haavard Skinnemoen | 2006-12-17 18:55:37 +0100 |
---|---|---|
committer | Haavard Skinnemoen | 2007-04-14 16:14:06 +0200 |
commit | 05fdab1ef6a10d049a50021a86f1226f444d9b9f (patch) | |
tree | 6856cbb2e3b65106b6f892be2012bc00c981ae56 | |
parent | 7fac3f69e9f05c5e5326681976c35d129324c4de (diff) |
AVR32: Add clk and gpio infrastructure for mmci
Implement functions for configuring the mmci pins, as well as
functions for getting the clock rate of the mmci controller.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
-rw-r--r-- | cpu/at32ap/at32ap7000/gpio.c | 10 | ||||
-rw-r--r-- | include/asm-avr32/arch-at32ap7000/clk.h | 4 | ||||
-rw-r--r-- | include/asm-avr32/arch-at32ap7000/gpio.h | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/cpu/at32ap/at32ap7000/gpio.c b/cpu/at32ap/at32ap7000/gpio.c index cab5bf0dd12..52f5372a607 100644 --- a/cpu/at32ap/at32ap7000/gpio.c +++ b/cpu/at32ap/at32ap7000/gpio.c @@ -125,3 +125,13 @@ void gpio_enable_macb1(void) gpio_select_periph_B(GPIO_PIN_PD15, 0); /* SPD */ #endif } + +void gpio_enable_mmci(void) +{ + gpio_select_periph_A(GPIO_PIN_PA10, 0); /* CLK */ + gpio_select_periph_A(GPIO_PIN_PA11, 0); /* CMD */ + gpio_select_periph_A(GPIO_PIN_PA12, 0); /* DATA0 */ + gpio_select_periph_A(GPIO_PIN_PA13, 0); /* DATA1 */ + gpio_select_periph_A(GPIO_PIN_PA14, 0); /* DATA2 */ + gpio_select_periph_A(GPIO_PIN_PA15, 0); /* DATA3 */ +} diff --git a/include/asm-avr32/arch-at32ap7000/clk.h b/include/asm-avr32/arch-at32ap7000/clk.h index 1ca5b48955e..7e20d97b7f9 100644 --- a/include/asm-avr32/arch-at32ap7000/clk.h +++ b/include/asm-avr32/arch-at32ap7000/clk.h @@ -62,5 +62,9 @@ static inline unsigned long get_macb_hclk_rate(unsigned int dev_id) { return get_hsb_clk_rate(); } +static inline unsigned long get_mci_clk_rate(void) +{ + return get_pbb_clk_rate(); +} #endif /* __ASM_AVR32_ARCH_CLK_H__ */ diff --git a/include/asm-avr32/arch-at32ap7000/gpio.h b/include/asm-avr32/arch-at32ap7000/gpio.h index ca966e13428..8d9b092750c 100644 --- a/include/asm-avr32/arch-at32ap7000/gpio.h +++ b/include/asm-avr32/arch-at32ap7000/gpio.h @@ -207,6 +207,7 @@ void gpio_enable_usart2(void); void gpio_enable_usart3(void); void gpio_enable_macb0(void); void gpio_enable_macb1(void); +void gpio_enable_mmci(void); #endif /* __ASM_AVR32_ARCH_GPIO_H__ */ |