The args to writel() is changed to (val,port). The base address is renamed to CONFIG_SYS_LED_PIO_BASE, which is consistent with the name used in altera example designs.
Signed-off-by: Thomas Chou <tho...@wytron.com.tw> --- board/altera/common/epled.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/board/altera/common/epled.c b/board/altera/common/epled.c index e5e7705..d092011 100644 --- a/board/altera/common/epled.c +++ b/board/altera/common/epled.c @@ -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 *)CONFIG_SYS_LEDPIO_ADDR; + nios_pio_t *pio = (nios_pio_t *)CONFIG_SYS_LED_PIO_BASE; if (state == STATUS_LED_ON) val &= ~mask; else val |= mask; - writel (&pio->data, val); + writel (val, &pio->data); } void __led_set (led_id_t mask, int state) { - nios_pio_t *pio = (nios_pio_t *)CONFIG_SYS_LEDPIO_ADDR; + nios_pio_t *pio = (nios_pio_t *)CONFIG_SYS_LED_PIO_BASE; if (state == STATUS_LED_ON) val &= ~mask; else val |= mask; - writel (&pio->data, val); + writel (val, &pio->data); } void __led_toggle (led_id_t mask) { - nios_pio_t *pio = (nios_pio_t *)CONFIG_SYS_LEDPIO_ADDR; + nios_pio_t *pio = (nios_pio_t *)CONFIG_SYS_LED_PIO_BASE; val ^= mask; - writel (&pio->data, val); + writel (val, &pio->data); } -- 1.6.6.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot