summaryrefslogtreecommitdiffstats
path: root/board/bf526-ezbrd
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-06-02 05:12:11 -0400
committerMike Frysinger <vapier@gentoo.org>2010-07-05 05:30:07 -0400
commita84774f56a97c5a2b0521b85ac9eb8b1c7fb15b3 (patch)
tree9368fa520b62623a8301d6996ffd9054df76c574 /board/bf526-ezbrd
parentca86ba11da0f3e2971de58dfd171d1cd617b39d6 (diff)
downloadblackbird-obmc-uboot-a84774f56a97c5a2b0521b85ac9eb8b1c7fb15b3.tar.gz
blackbird-obmc-uboot-a84774f56a97c5a2b0521b85ac9eb8b1c7fb15b3.zip
Blackfin: switch to common GPIO LED driver
Now that we have a unified gpio layer, the different status led implementations can be switched to the common gpio led driver. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'board/bf526-ezbrd')
-rw-r--r--board/bf526-ezbrd/Makefile1
-rw-r--r--board/bf526-ezbrd/status-led.c56
2 files changed, 0 insertions, 57 deletions
diff --git a/board/bf526-ezbrd/Makefile b/board/bf526-ezbrd/Makefile
index a9ff760073..f2bd2c247d 100644
--- a/board/bf526-ezbrd/Makefile
+++ b/board/bf526-ezbrd/Makefile
@@ -30,7 +30,6 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).a
COBJS-y := $(BOARD).o
-COBJS-$(CONFIG_STATUS_LED) += status-led.o
SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS-y))
diff --git a/board/bf526-ezbrd/status-led.c b/board/bf526-ezbrd/status-led.c
deleted file mode 100644
index 6327022ccf..0000000000
--- a/board/bf526-ezbrd/status-led.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * U-boot - status leds
- *
- * Copyright (c) 2005-2009 Analog Devices Inc.
- *
- * Licensed under the GPL-2 or later.
- */
-
-#include <common.h>
-#include <config.h>
-#include <command.h>
-#include <status_led.h>
-
-static void set_led_f(int pf, int state)
-{
- switch (state) {
- case STATUS_LED_OFF: bfin_write_PORTFIO_CLEAR(pf); break;
- case STATUS_LED_BLINKING: bfin_write_PORTFIO_TOGGLE(pf); break;
- case STATUS_LED_ON: bfin_write_PORTFIO_SET(pf); break;
- }
-}
-static void set_led_g(int pf, int state)
-{
- switch (state) {
- case STATUS_LED_OFF: bfin_write_PORTGIO_CLEAR(pf); break;
- case STATUS_LED_BLINKING: bfin_write_PORTGIO_TOGGLE(pf); break;
- case STATUS_LED_ON: bfin_write_PORTGIO_SET(pf); break;
- }
-}
-
-static void set_leds(led_id_t mask, int state)
-{
- if (mask & 0x1) set_led_f(PF8, state);
- if (mask & 0x2) set_led_g(PG11, state);
- if (mask & 0x4) set_led_g(PG12, state);
-}
-
-void __led_init(led_id_t mask, int state)
-{
- bfin_write_PORTF_FER(bfin_read_PORTF_FER() & ~(PF8));
- bfin_write_PORTG_FER(bfin_read_PORTG_FER() & ~(PG11 | PG12));
- bfin_write_PORTFIO_INEN(bfin_read_PORTFIO_INEN() & ~(PF8));
- bfin_write_PORTGIO_INEN(bfin_read_PORTGIO_INEN() & ~(PG11 | PG12));
- bfin_write_PORTFIO_DIR(bfin_read_PORTFIO_DIR() | (PF8));
- bfin_write_PORTGIO_DIR(bfin_read_PORTGIO_DIR() | (PG11 | PG12));
-}
-
-void __led_set(led_id_t mask, int state)
-{
- set_leds(mask, state);
-}
-
-void __led_toggle(led_id_t mask)
-{
- set_leds(mask, STATUS_LED_BLINKING);
-}
OpenPOWER on IntegriCloud