]> git.sur5r.net Git - u-boot/blobdiff - board/ronetix/pm9261/led.c
Merge branch 'master' of git://git.denx.de/u-boot-net
[u-boot] / board / ronetix / pm9261 / led.c
index 396c3e734016e83a12797d89252137719e16f15b..ff21ce667b4be00a1774c1efd90d06f6914c9724 100644 (file)
 #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);
 }