[Blackfin] arch: scrub dead alive/idle LED code
authorMike Frysinger <michael.frysinger@analog.com>
Mon, 24 Dec 2007 06:59:03 +0000 (14:59 +0800)
committerBryan Wu <bryan.wu@analog.com>
Mon, 24 Dec 2007 06:59:03 +0000 (14:59 +0800)
if it does get re-added, it needs to be in the boards directory,
not common code ... or it needs a re-implementation

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
arch/blackfin/Kconfig
arch/blackfin/kernel/process.c
arch/blackfin/kernel/setup.c
arch/blackfin/kernel/time.c

index 1364dcaccc18d2cc95e16de5cebd43f489227f3a..e4ccdcdb46395a86e5c741a7c5bc786188b0c06f 100644 (file)
@@ -463,40 +463,6 @@ config BOOT_LOAD
          memory region is used to capture NULL pointer references as well
          as some core kernel functions.
 
-comment "LED Status Indicators"
-       depends on (BFIN533_STAMP || BFIN533_BLUETECHNIX_CM)
-
-config BFIN_ALIVE_LED
-       bool "Enable Board Alive"
-       depends on (BFIN533_STAMP || BFIN533_BLUETECHNIX_CM)
-       default n
-       help
-         Blink the LEDs you select when the kernel is running.  Helps detect
-         a hung kernel.
-
-config BFIN_ALIVE_LED_NUM
-       int "LED"
-       depends on BFIN_ALIVE_LED
-       range 1 3 if BFIN533_STAMP
-       default "3" if BFIN533_STAMP
-       help
-         Select the LED (marked on the board) for you to blink.
-
-config BFIN_IDLE_LED
-       bool "Enable System Load/Idle LED"
-       depends on (BFIN533_STAMP || BFIN533_BLUETECHNIX_CM)
-       default n
-       help
-         Blinks the LED you select when to determine kernel load.
-
-config BFIN_IDLE_LED_NUM
-       int "LED"
-       depends on BFIN_IDLE_LED
-       range 1 3 if BFIN533_STAMP
-       default "2" if BFIN533_STAMP
-       help
-         Select the LED (marked on the board) for you to blink.
-
 choice
        prompt "Blackfin Exception Scratch Register"
        default BFIN_SCRATCH_REG_RETN
@@ -543,41 +509,6 @@ config BFIN_SCRATCH_REG_CYCLES
 
 endchoice
 
-#
-# Sorry - but you need to put the hex address here -
-#
-
-# Flag Data register
-config BFIN_ALIVE_LED_PORT
-       hex
-       default 0xFFC00700 if (BFIN533_STAMP)
-
-# Peripheral Flag Direction Register
-config BFIN_ALIVE_LED_DPORT
-       hex
-       default 0xFFC00730 if (BFIN533_STAMP)
-
-config BFIN_ALIVE_LED_PIN
-       hex
-       default 0x04 if (BFIN533_STAMP && BFIN_ALIVE_LED_NUM = 1)
-       default 0x08 if (BFIN533_STAMP && BFIN_ALIVE_LED_NUM = 2)
-       default 0x10 if (BFIN533_STAMP && BFIN_ALIVE_LED_NUM = 3)
-
-config BFIN_IDLE_LED_PORT
-       hex
-       default 0xFFC00700 if (BFIN533_STAMP)
-
-# Peripheral Flag Direction Register
-config BFIN_IDLE_LED_DPORT
-       hex
-       default 0xFFC00730 if (BFIN533_STAMP)
-
-config BFIN_IDLE_LED_PIN
-       hex
-       default 0x04 if (BFIN533_STAMP && BFIN_IDLE_LED_NUM = 1)
-       default 0x08 if (BFIN533_STAMP && BFIN_IDLE_LED_NUM = 2)
-       default 0x10 if (BFIN533_STAMP && BFIN_IDLE_LED_NUM = 3)
-
 endmenu
 
 
index fff3dd9eadda1b311b9449dc710acdc80fbc1aca..023dc80af1875864d8f350334fd5858e0ea78799 100644 (file)
@@ -39,9 +39,6 @@
 #include <asm/blackfin.h>
 #include <asm/fixed_code.h>
 
-#define        LED_ON  0
-#define        LED_OFF 1
-
 asmlinkage void ret_from_fork(void);
 
 /* Points to the SDRAM backup memory for the stack that is currently in
@@ -69,32 +66,6 @@ EXPORT_SYMBOL(pm_idle);
 void (*pm_power_off)(void) = NULL;
 EXPORT_SYMBOL(pm_power_off);
 
-/*
- * We are using a different LED from the one used to indicate timer interrupt.
- */
-#if defined(CONFIG_BFIN_IDLE_LED)
-static inline void leds_switch(int flag)
-{
-       unsigned short tmp = 0;
-
-       tmp = bfin_read_CONFIG_BFIN_IDLE_LED_PORT();
-       SSYNC();
-
-       if (flag == LED_ON)
-               tmp &= ~CONFIG_BFIN_IDLE_LED_PIN;       /* light on */
-       else
-               tmp |= CONFIG_BFIN_IDLE_LED_PIN;        /* light off */
-
-       bfin_write_CONFIG_BFIN_IDLE_LED_PORT(tmp);
-       SSYNC();
-
-}
-#else
-static inline void leds_switch(int flag)
-{
-}
-#endif
-
 /*
  * The idle loop on BFIN
  */
@@ -106,12 +77,10 @@ void cpu_idle(void)__attribute__((l1_text));
 void default_idle(void)
 {
        while (!need_resched()) {
-               leds_switch(LED_OFF);
                local_irq_disable();
                if (likely(!need_resched()))
                        idle_with_irq_disabled();
                local_irq_enable();
-               leds_switch(LED_ON);
        }
 }
 
index d2822010b7ce4318ef2eed5446c9a7694fb10489..a03c2dfff4a399314fabbf0749c88e5e583975c5 100644 (file)
@@ -315,8 +315,6 @@ void __init setup_arch(char **cmdline_p)
        init_mm.end_data = (unsigned long)_edata;
        init_mm.brk = (unsigned long)0;
 
-       init_leds();
-
        _bfin_swrst = bfin_read_SWRST();
 
        if (_bfin_swrst & RESET_DOUBLE)
index beef057bd1dc74d0451acec312c7657cfd21ebf3..5bd64e341df39cb53c9f70b29229274a72a416c9 100644 (file)
 static void time_sched_init(irqreturn_t(*timer_routine)
                        (int, void *));
 static unsigned long gettimeoffset(void);
-static inline void do_leds(void);
-
-#if (defined(CONFIG_BFIN_ALIVE_LED) || defined(CONFIG_BFIN_IDLE_LED))
-void __init init_leds(void)
-{
-       unsigned int tmp = 0;
-
-#if defined(CONFIG_BFIN_ALIVE_LED)
-       /* config pins as output. */
-       tmp = bfin_read_CONFIG_BFIN_ALIVE_LED_DPORT();
-       SSYNC();
-       bfin_write_CONFIG_BFIN_ALIVE_LED_DPORT(tmp | CONFIG_BFIN_ALIVE_LED_PIN);
-       SSYNC();
-
-       /*      First set led be off */
-       tmp = bfin_read_CONFIG_BFIN_ALIVE_LED_PORT();
-       SSYNC();
-       bfin_write_CONFIG_BFIN_ALIVE_LED_PORT(tmp | CONFIG_BFIN_ALIVE_LED_PIN); /* light off */
-       SSYNC();
-#endif
-
-#if defined(CONFIG_BFIN_IDLE_LED)
-       /* config pins as output. */
-       tmp = bfin_read_CONFIG_BFIN_IDLE_LED_DPORT();
-       SSYNC();
-       bfin_write_CONFIG_BFIN_IDLE_LED_DPORT(tmp | CONFIG_BFIN_IDLE_LED_PIN);
-       SSYNC();
-
-       /*      First set led be off */
-       tmp = bfin_read_CONFIG_BFIN_IDLE_LED_PORT();
-       SSYNC();
-       bfin_write_CONFIG_BFIN_IDLE_LED_PORT(tmp | CONFIG_BFIN_IDLE_LED_PIN);   /* light off */
-       SSYNC();
-#endif
-}
-#else
-void __init init_leds(void)
-{
-}
-#endif
-
-#if defined(CONFIG_BFIN_ALIVE_LED)
-static inline void do_leds(void)
-{
-       static unsigned int count = 50;
-       static int flag;
-       unsigned short tmp = 0;
-
-       if (--count == 0) {
-               count = 50;
-               flag = ~flag;
-       }
-       tmp = bfin_read_CONFIG_BFIN_ALIVE_LED_PORT();
-       SSYNC();
-
-       if (flag)
-               tmp &= ~CONFIG_BFIN_ALIVE_LED_PIN;      /* light on */
-       else
-               tmp |= CONFIG_BFIN_ALIVE_LED_PIN;       /* light off */
-
-       bfin_write_CONFIG_BFIN_ALIVE_LED_PORT(tmp);
-       SSYNC();
-
-}
-#else
-static inline void do_leds(void)
-{
-}
-#endif
 
 static struct irqaction bfin_timer_irq = {
        .name = "BFIN Timer Tick",
@@ -205,7 +136,6 @@ irqreturn_t timer_interrupt(int irq, void *dummy)
        write_seqlock(&xtime_lock);
 
        do_timer(1);
-       do_leds();
 
 #ifndef CONFIG_SMP
        update_process_times(user_mode(get_irq_regs()));