From 70341e2ed9a0ff98a777febb7b56dbcee4d885c4 Mon Sep 17 00:00:00 2001 From: Wenyou Yang Date: Wed, 3 Feb 2016 10:16:50 +0800 Subject: board: atmel: clean up peripheral clock code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to introducing the new peripheral clock handle functions, use these functions to reduce duplicated code. Signed-off-by: Wenyou Yang Tested-by: Heiko Schocher [Rebased on current master, fixup for at91rm9200ek] Signed-off-by: Andreas Bießmann --- board/atmel/at91rm9200ek/led.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'board/atmel/at91rm9200ek/led.c') diff --git a/board/atmel/at91rm9200ek/led.c b/board/atmel/at91rm9200ek/led.c index 6761b14..fbe8e3d 100644 --- a/board/atmel/at91rm9200ek/led.c +++ b/board/atmel/at91rm9200ek/led.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include @@ -59,11 +59,9 @@ void red_led_off(void) void coloured_LED_init (void) { - at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC; at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO; - /* Enable PIOB clock */ - writel(1 << ATMEL_ID_PIOB, &pmc->pcer); + at91_periph_clk_enable(ATMEL_ID_PIOB); /* Disable peripherals on LEDs */ writel(GREEN_LED | YELLOW_LED | RED_LED, &pio->piob.per); -- cgit v1.1