summaryrefslogtreecommitdiff
path: root/board/ronetix/pm9263/led.c
diff options
context:
space:
mode:
authorAsen Dimov <dimov@ronetix.at>2010-04-19 14:18:43 +0300
committertrix <trix@windriver.com>2010-04-28 21:00:12 -0500
commit28897f9072c3cbbb07ce1653009b3812b4d6ee54 (patch)
treead032bb01a54371bf51dc940efb1dd4b194c04b2 /board/ronetix/pm9263/led.c
parent000b6dc6edfcb83c4fff9376f9a2a4af67f3fc83 (diff)
downloadu-boot-imx-28897f9072c3cbbb07ce1653009b3812b4d6ee54.zip
u-boot-imx-28897f9072c3cbbb07ce1653009b3812b4d6ee54.tar.gz
u-boot-imx-28897f9072c3cbbb07ce1653009b3812b4d6ee54.tar.bz2
pm9263 converted to at91 soc access
Signed-off-by: Asen Dimov <dimov@ronetix.at>
Diffstat (limited to 'board/ronetix/pm9263/led.c')
-rw-r--r--board/ronetix/pm9263/led.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/board/ronetix/pm9263/led.c b/board/ronetix/pm9263/led.c
index fe1a1d2..4e585a4 100644
--- a/board/ronetix/pm9263/led.c
+++ b/board/ronetix/pm9263/led.c
@@ -26,18 +26,19 @@
#include <common.h>
#include <asm/arch/at91sam9263.h>
#include <asm/arch/at91_pmc.h>
-#include <asm/arch/gpio.h>
+#include <asm/arch/at91_pio.h>
#include <asm/arch/io.h>
void coloured_LED_init(void)
{
+ at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
+
/* Enable clock */
- at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_PIOB |
- 1 << AT91SAM9263_ID_PIOCDE);
+ writel(1 << AT91SAM9263_ID_PIOB, &pmc->pcer);
- at91_set_gpio_output(CONFIG_RED_LED, 1);
- at91_set_gpio_output(CONFIG_GREEN_LED, 1);
+ at91_set_pio_output(CONFIG_RED_LED, 1);
+ at91_set_pio_output(CONFIG_GREEN_LED, 1);
- at91_set_gpio_value(CONFIG_RED_LED, 0);
- at91_set_gpio_value(CONFIG_GREEN_LED, 1);
+ at91_set_pio_value(CONFIG_RED_LED, 0);
+ at91_set_pio_value(CONFIG_GREEN_LED, 1);
}