summaryrefslogtreecommitdiff
path: root/board/atmel/at91sam9263ek/led.c
diff options
context:
space:
mode:
authorJens Scharsig <js_at_ng@scharsoft.de>2010-02-03 22:47:18 +0100
committerTom Rix <Tom.Rix@windriver.com>2010-02-12 12:31:55 -0600
commit1b34f00c28a3023693d9b31e7bd1a9212af8352f (patch)
treee889b5e2c9ad9c73585ab24813fa9e96ea014e73 /board/atmel/at91sam9263ek/led.c
parent0cf0b93161beb3f3ed5e37e6112aedf15da17e8a (diff)
downloadu-boot-imx-1b34f00c28a3023693d9b31e7bd1a9212af8352f.zip
u-boot-imx-1b34f00c28a3023693d9b31e7bd1a9212af8352f.tar.gz
u-boot-imx-1b34f00c28a3023693d9b31e7bd1a9212af8352f.tar.bz2
update at91sam9263ek board to new SoC access
* convert at91sam9263ek board to use c stucture SoC access * change gpio access to at91_gpio syntax Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
Diffstat (limited to 'board/atmel/at91sam9263ek/led.c')
-rw-r--r--board/atmel/at91sam9263ek/led.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/board/atmel/at91sam9263ek/led.c b/board/atmel/at91sam9263ek/led.c
index 82c5388..fa1f05b 100644
--- a/board/atmel/at91sam9263ek/led.c
+++ b/board/atmel/at91sam9263ek/led.c
@@ -23,22 +23,25 @@
*/
#include <common.h>
-#include <asm/arch/at91sam9263.h>
+#include <asm/arch/hardware.h>
#include <asm/arch/at91_pmc.h>
+#include <asm/arch/at91_pio.h>
#include <asm/arch/gpio.h>
#include <asm/arch/io.h>
void coloured_LED_init(void)
{
/* Enable clock */
- at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_PIOB |
- 1 << AT91SAM9263_ID_PIOCDE);
+ at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
- at91_set_gpio_output(CONFIG_RED_LED, 1);
- at91_set_gpio_output(CONFIG_GREEN_LED, 1);
- at91_set_gpio_output(CONFIG_YELLOW_LED, 1);
+ writel(1 << AT91SAM9263_ID_PIOB | 1 << AT91SAM9263_ID_PIOCDE,
+ &pmc->pcer);
- 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_output(CONFIG_RED_LED, 1);
+ at91_set_pio_output(CONFIG_GREEN_LED, 1);
+ at91_set_pio_output(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);
}