summaryrefslogtreecommitdiff
path: root/board/ronetix/pm9261/led.c
diff options
context:
space:
mode:
authorAsen Dimov <dimov@ronetix.at>2010-04-06 16:18:04 +0300
committertrix <trix@windriver.com>2010-04-30 05:23:22 -0500
commite3150c77617c7d452420e6c87769b79b6671b12d (patch)
tree0f34fb112bd322a9f4dff25a0c5c6d69b730b422 /board/ronetix/pm9261/led.c
parent7bc8768039948e50cc149bea2ec214bde3245c4a (diff)
downloadu-boot-imx-e3150c77617c7d452420e6c87769b79b6671b12d.zip
u-boot-imx-e3150c77617c7d452420e6c87769b79b6671b12d.tar.gz
u-boot-imx-e3150c77617c7d452420e6c87769b79b6671b12d.tar.bz2
pm9261 converted to at91 soc access
Signed-off-by: Asen Dimov <dimov@ronetix.at>
Diffstat (limited to 'board/ronetix/pm9261/led.c')
-rw-r--r--board/ronetix/pm9261/led.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/board/ronetix/pm9261/led.c b/board/ronetix/pm9261/led.c
index 396c3e7..ff21ce6 100644
--- a/board/ronetix/pm9261/led.c
+++ b/board/ronetix/pm9261/led.c
@@ -26,19 +26,21 @@
#include <common.h>
#include <asm/arch/at91sam9261.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 << AT91SAM9261_ID_PIOC);
+ writel(1 << AT91SAM9261_ID_PIOC, &pmc->pcer);
- at91_set_gpio_output(CONFIG_RED_LED, 1);
- at91_set_gpio_output(CONFIG_GREEN_LED, 1);
- at91_set_gpio_output(CONFIG_YELLOW_LED, 1);
+ at91_set_pio_output(CONFIG_RED_LED, 1);
+ at91_set_pio_output(CONFIG_GREEN_LED, 1);
+ at91_set_pio_output(CONFIG_YELLOW_LED, 1);
- at91_set_gpio_value(CONFIG_RED_LED, 0);
- at91_set_gpio_value(CONFIG_GREEN_LED, 1);
- at91_set_gpio_value(CONFIG_YELLOW_LED, 1);
+ at91_set_pio_value(CONFIG_RED_LED, 0);
+ at91_set_pio_value(CONFIG_GREEN_LED, 1);
+ at91_set_pio_value(CONFIG_YELLOW_LED, 1);
}