summaryrefslogtreecommitdiff
path: root/board/atmel/at91sam9m10g45ek/led.c
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2011-08-04 11:08:50 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-09-03 22:40:45 +0200
commit5cfeec5125a1946da7d5f25576ea686047848182 (patch)
treed0c4e7cda20a18f73e04aaeeebfb7289658cc2be /board/atmel/at91sam9m10g45ek/led.c
parent55d11d22ca08fdff59a9716f942e161e0bd614f6 (diff)
downloadu-boot-imx-5cfeec5125a1946da7d5f25576ea686047848182.zip
u-boot-imx-5cfeec5125a1946da7d5f25576ea686047848182.tar.gz
u-boot-imx-5cfeec5125a1946da7d5f25576ea686047848182.tar.bz2
atmel: Update support of board AT91SAM9M10G45-EK to new style
Based on earlier work by Alex Waterman <awaterman@dawning.com>. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'board/atmel/at91sam9m10g45ek/led.c')
-rw-r--r--board/atmel/at91sam9m10g45ek/led.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/board/atmel/at91sam9m10g45ek/led.c b/board/atmel/at91sam9m10g45ek/led.c
index ff59a2d..dadbd6a 100644
--- a/board/atmel/at91sam9m10g45ek/led.c
+++ b/board/atmel/at91sam9m10g45ek/led.c
@@ -23,15 +23,17 @@
*/
#include <common.h>
+#include <asm/io.h>
#include <asm/arch/at91sam9g45.h>
#include <asm/arch/at91_pmc.h>
#include <asm/arch/gpio.h>
-#include <asm/arch/io.h>
void coloured_LED_init(void)
{
+ struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
+
/* Enable clock */
- at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9G45_ID_PIODE);
+ writel(1 << ATMEL_ID_PIODE, &pmc->pcer);
at91_set_gpio_output(CONFIG_RED_LED, 1);
at91_set_gpio_output(CONFIG_GREEN_LED, 1);