diff options
author | Wolfgang Denk <wd@pollux.denx.de> | 2006-06-10 01:36:27 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@pollux.denx.de> | 2006-06-10 01:36:27 +0200 |
commit | 9d4d3e3833ca7f4dada190ddcb3fea1da9bb9b5b (patch) | |
tree | 2e48d77afa769a4515101e4ce4ef2c6ba48cbeff /board/psyent/pk1c20/led.c | |
parent | 5d7022b0418b3aab977ac51dbfd179c296ae442e (diff) | |
parent | 9cc833783206efd25b4655aa451ce81e5cc28fc2 (diff) | |
download | u-boot-imx-9d4d3e3833ca7f4dada190ddcb3fea1da9bb9b5b.zip u-boot-imx-9d4d3e3833ca7f4dada190ddcb3fea1da9bb9b5b.tar.gz u-boot-imx-9d4d3e3833ca7f4dada190ddcb3fea1da9bb9b5b.tar.bz2 |
Merge with http://www.psyent.com/git/uboot (NIOS2 - Scott McNutt)
Diffstat (limited to 'board/psyent/pk1c20/led.c')
-rw-r--r-- | board/psyent/pk1c20/led.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/board/psyent/pk1c20/led.c b/board/psyent/pk1c20/led.c index c175c9b..c75fe8c 100644 --- a/board/psyent/pk1c20/led.c +++ b/board/psyent/pk1c20/led.c @@ -22,7 +22,7 @@ */ #include <common.h> -#include <nios2.h> +#include <asm/io.h> #include <nios2-io.h> #include <status_led.h> @@ -33,30 +33,30 @@ static led_id_t val = 0; void __led_init (led_id_t mask, int state) { - nios_pio_t *pio = (nios_pio_t *)CACHE_BYPASS(CFG_LEDPIO_ADDR); + nios_pio_t *pio = (nios_pio_t *)CFG_LEDPIO_ADDR; if (state == STATUS_LED_ON) val &= ~mask; else val |= mask; - pio->data = val; + writel (&pio->data, val); } void __led_set (led_id_t mask, int state) { - nios_pio_t *pio = (nios_pio_t *)CACHE_BYPASS(CFG_LEDPIO_ADDR); + nios_pio_t *pio = (nios_pio_t *)CFG_LEDPIO_ADDR; if (state == STATUS_LED_ON) val &= ~mask; else val |= mask; - pio->data = val; + writel (&pio->data, val); } void __led_toggle (led_id_t mask) { - nios_pio_t *pio = (nios_pio_t *)CACHE_BYPASS(CFG_LEDPIO_ADDR); + nios_pio_t *pio = (nios_pio_t *)CFG_LEDPIO_ADDR; val ^= mask; - pio->data = val; + writel (&pio->data, val); } |