diff options
Diffstat (limited to 'arch/arm/mach-at91/arm920t')
-rw-r--r-- | arch/arm/mach-at91/arm920t/at91rm9200_devices.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-at91/arm920t/timer.c | 6 |
2 files changed, 6 insertions, 14 deletions
diff --git a/arch/arm/mach-at91/arm920t/at91rm9200_devices.c b/arch/arm/mach-at91/arm920t/at91rm9200_devices.c index fc54327..9b9800a 100644 --- a/arch/arm/mach-at91/arm920t/at91rm9200_devices.c +++ b/arch/arm/mach-at91/arm920t/at91rm9200_devices.c @@ -14,7 +14,7 @@ #include <common.h> #include <asm/io.h> #include <asm/arch/at91_common.h> -#include <asm/arch/at91_pmc.h> +#include <asm/arch/clk.h> #include <asm/arch/gpio.h> /* @@ -34,29 +34,23 @@ void at91_serial0_hw_init(void) { - at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC; - at91_set_a_periph(AT91_PIO_PORTA, 17, 1); /* TXD0 */ at91_set_a_periph(AT91_PIO_PORTA, 18, PUP); /* RXD0 */ - writel(1 << ATMEL_ID_USART0, &pmc->pcer); + at91_periph_clk_enable(ATMEL_ID_USART0); } void at91_serial1_hw_init(void) { - at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC; - at91_set_a_periph(AT91_PIO_PORTB, 20, PUP); /* RXD1 */ at91_set_a_periph(AT91_PIO_PORTB, 21, 1); /* TXD1 */ - writel(1 << ATMEL_ID_USART1, &pmc->pcer); + at91_periph_clk_enable(ATMEL_ID_USART1); } void at91_serial2_hw_init(void) { - at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC; - at91_set_a_periph(AT91_PIO_PORTA, 22, PUP); /* RXD2 */ at91_set_a_periph(AT91_PIO_PORTA, 23, 1); /* TXD2 */ - writel(1 << ATMEL_ID_USART2, &pmc->pcer); + at91_periph_clk_enable(ATMEL_ID_USART2); } void at91_seriald_hw_init(void) diff --git a/arch/arm/mach-at91/arm920t/timer.c b/arch/arm/mach-at91/arm920t/timer.c index 6aa2994..69ce6f9 100644 --- a/arch/arm/mach-at91/arm920t/timer.c +++ b/arch/arm/mach-at91/arm920t/timer.c @@ -19,7 +19,7 @@ #include <asm/io.h> #include <asm/arch/hardware.h> #include <asm/arch/at91_tc.h> -#include <asm/arch/at91_pmc.h> +#include <asm/arch/clk.h> DECLARE_GLOBAL_DATA_PTR; @@ -29,10 +29,8 @@ DECLARE_GLOBAL_DATA_PTR; int timer_init(void) { at91_tc_t *tc = (at91_tc_t *) ATMEL_BASE_TC; - at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC; - /* enables TC1.0 clock */ - writel(1 << ATMEL_ID_TC0, &pmc->pcer); /* enable clock */ + at91_periph_clk_enable(ATMEL_ID_TC0); writel(0, &tc->bcr); writel(AT91_TC_BMR_TC0XC0S_NONE | AT91_TC_BMR_TC1XC1S_NONE | |