aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <michael.frysinger@analog.com>2007-12-24 01:59:03 -0500
committerBryan Wu <bryan.wu@analog.com>2007-12-24 01:59:03 -0500
commit54a1668ce53fe701f1d36651b591ced388e97275 (patch)
tree852b588db2069b353d51a0631221b5d10b8196b8
parent3ca32c1dc62dabe67d7e51f6e8568e3965f52236 (diff)
[Blackfin] arch: scrub dead alive/idle LED code
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>
-rw-r--r--arch/blackfin/Kconfig69
-rw-r--r--arch/blackfin/kernel/process.c31
-rw-r--r--arch/blackfin/kernel/setup.c2
-rw-r--r--arch/blackfin/kernel/time.c70
4 files changed, 0 insertions, 172 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 1364dcaccc18..e4ccdcdb4639 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -463,40 +463,6 @@ config BOOT_LOAD
463 memory region is used to capture NULL pointer references as well 463 memory region is used to capture NULL pointer references as well
464 as some core kernel functions. 464 as some core kernel functions.
465 465
466comment "LED Status Indicators"
467 depends on (BFIN533_STAMP || BFIN533_BLUETECHNIX_CM)
468
469config BFIN_ALIVE_LED
470 bool "Enable Board Alive"
471 depends on (BFIN533_STAMP || BFIN533_BLUETECHNIX_CM)
472 default n
473 help
474 Blink the LEDs you select when the kernel is running. Helps detect
475 a hung kernel.
476
477config BFIN_ALIVE_LED_NUM
478 int "LED"
479 depends on BFIN_ALIVE_LED
480 range 1 3 if BFIN533_STAMP
481 default "3" if BFIN533_STAMP
482 help
483 Select the LED (marked on the board) for you to blink.
484
485config BFIN_IDLE_LED
486 bool "Enable System Load/Idle LED"
487 depends on (BFIN533_STAMP || BFIN533_BLUETECHNIX_CM)
488 default n
489 help
490 Blinks the LED you select when to determine kernel load.
491
492config BFIN_IDLE_LED_NUM
493 int "LED"
494 depends on BFIN_IDLE_LED
495 range 1 3 if BFIN533_STAMP
496 default "2" if BFIN533_STAMP
497 help
498 Select the LED (marked on the board) for you to blink.
499
500choice 466choice
501 prompt "Blackfin Exception Scratch Register" 467 prompt "Blackfin Exception Scratch Register"
502 default BFIN_SCRATCH_REG_RETN 468 default BFIN_SCRATCH_REG_RETN
@@ -543,41 +509,6 @@ config BFIN_SCRATCH_REG_CYCLES
543 509
544endchoice 510endchoice
545 511
546#
547# Sorry - but you need to put the hex address here -
548#
549
550# Flag Data register
551config BFIN_ALIVE_LED_PORT
552 hex
553 default 0xFFC00700 if (BFIN533_STAMP)
554
555# Peripheral Flag Direction Register
556config BFIN_ALIVE_LED_DPORT
557 hex
558 default 0xFFC00730 if (BFIN533_STAMP)
559
560config BFIN_ALIVE_LED_PIN
561 hex
562 default 0x04 if (BFIN533_STAMP && BFIN_ALIVE_LED_NUM = 1)
563 default 0x08 if (BFIN533_STAMP && BFIN_ALIVE_LED_NUM = 2)
564 default 0x10 if (BFIN533_STAMP && BFIN_ALIVE_LED_NUM = 3)
565
566config BFIN_IDLE_LED_PORT
567 hex
568 default 0xFFC00700 if (BFIN533_STAMP)
569
570# Peripheral Flag Direction Register
571config BFIN_IDLE_LED_DPORT
572 hex
573 default 0xFFC00730 if (BFIN533_STAMP)
574
575config BFIN_IDLE_LED_PIN
576 hex
577 default 0x04 if (BFIN533_STAMP && BFIN_IDLE_LED_NUM = 1)
578 default 0x08 if (BFIN533_STAMP && BFIN_IDLE_LED_NUM = 2)
579 default 0x10 if (BFIN533_STAMP && BFIN_IDLE_LED_NUM = 3)
580
581endmenu 512endmenu
582 513
583 514
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index fff3dd9eadda..023dc80af187 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -39,9 +39,6 @@
39#include <asm/blackfin.h> 39#include <asm/blackfin.h>
40#include <asm/fixed_code.h> 40#include <asm/fixed_code.h>
41 41
42#define LED_ON 0
43#define LED_OFF 1
44
45asmlinkage void ret_from_fork(void); 42asmlinkage void ret_from_fork(void);
46 43
47/* Points to the SDRAM backup memory for the stack that is currently in 44/* Points to the SDRAM backup memory for the stack that is currently in
@@ -70,32 +67,6 @@ void (*pm_power_off)(void) = NULL;
70EXPORT_SYMBOL(pm_power_off); 67EXPORT_SYMBOL(pm_power_off);
71 68
72/* 69/*
73 * We are using a different LED from the one used to indicate timer interrupt.
74 */
75#if defined(CONFIG_BFIN_IDLE_LED)
76static inline void leds_switch(int flag)
77{
78 unsigned short tmp = 0;
79
80 tmp = bfin_read_CONFIG_BFIN_IDLE_LED_PORT();
81 SSYNC();
82
83 if (flag == LED_ON)
84 tmp &= ~CONFIG_BFIN_IDLE_LED_PIN; /* light on */
85 else
86 tmp |= CONFIG_BFIN_IDLE_LED_PIN; /* light off */
87
88 bfin_write_CONFIG_BFIN_IDLE_LED_PORT(tmp);
89 SSYNC();
90
91}
92#else
93static inline void leds_switch(int flag)
94{
95}
96#endif
97
98/*
99 * The idle loop on BFIN 70 * The idle loop on BFIN
100 */ 71 */
101#ifdef CONFIG_IDLE_L1 72#ifdef CONFIG_IDLE_L1
@@ -106,12 +77,10 @@ void cpu_idle(void)__attribute__((l1_text));
106void default_idle(void) 77void default_idle(void)
107{ 78{
108 while (!need_resched()) { 79 while (!need_resched()) {
109 leds_switch(LED_OFF);
110 local_irq_disable(); 80 local_irq_disable();
111 if (likely(!need_resched())) 81 if (likely(!need_resched()))
112 idle_with_irq_disabled(); 82 idle_with_irq_disabled();
113 local_irq_enable(); 83 local_irq_enable();
114 leds_switch(LED_ON);
115 } 84 }
116} 85}
117 86
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index d2822010b7ce..a03c2dfff4a3 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -315,8 +315,6 @@ void __init setup_arch(char **cmdline_p)
315 init_mm.end_data = (unsigned long)_edata; 315 init_mm.end_data = (unsigned long)_edata;
316 init_mm.brk = (unsigned long)0; 316 init_mm.brk = (unsigned long)0;
317 317
318 init_leds();
319
320 _bfin_swrst = bfin_read_SWRST(); 318 _bfin_swrst = bfin_read_SWRST();
321 319
322 if (_bfin_swrst & RESET_DOUBLE) 320 if (_bfin_swrst & RESET_DOUBLE)
diff --git a/arch/blackfin/kernel/time.c b/arch/blackfin/kernel/time.c
index beef057bd1dc..5bd64e341df3 100644
--- a/arch/blackfin/kernel/time.c
+++ b/arch/blackfin/kernel/time.c
@@ -42,75 +42,6 @@
42static void time_sched_init(irqreturn_t(*timer_routine) 42static void time_sched_init(irqreturn_t(*timer_routine)
43 (int, void *)); 43 (int, void *));
44static unsigned long gettimeoffset(void); 44static unsigned long gettimeoffset(void);
45static inline void do_leds(void);
46
47#if (defined(CONFIG_BFIN_ALIVE_LED) || defined(CONFIG_BFIN_IDLE_LED))
48void __init init_leds(void)
49{
50 unsigned int tmp = 0;
51
52#if defined(CONFIG_BFIN_ALIVE_LED)
53 /* config pins as output. */
54 tmp = bfin_read_CONFIG_BFIN_ALIVE_LED_DPORT();
55 SSYNC();
56 bfin_write_CONFIG_BFIN_ALIVE_LED_DPORT(tmp | CONFIG_BFIN_ALIVE_LED_PIN);
57 SSYNC();
58
59 /* First set led be off */
60 tmp = bfin_read_CONFIG_BFIN_ALIVE_LED_PORT();
61 SSYNC();
62 bfin_write_CONFIG_BFIN_ALIVE_LED_PORT(tmp | CONFIG_BFIN_ALIVE_LED_PIN); /* light off */
63 SSYNC();
64#endif
65
66#if defined(CONFIG_BFIN_IDLE_LED)
67 /* config pins as output. */
68 tmp = bfin_read_CONFIG_BFIN_IDLE_LED_DPORT();
69 SSYNC();
70 bfin_write_CONFIG_BFIN_IDLE_LED_DPORT(tmp | CONFIG_BFIN_IDLE_LED_PIN);
71 SSYNC();
72
73 /* First set led be off */
74 tmp = bfin_read_CONFIG_BFIN_IDLE_LED_PORT();
75 SSYNC();
76 bfin_write_CONFIG_BFIN_IDLE_LED_PORT(tmp | CONFIG_BFIN_IDLE_LED_PIN); /* light off */
77 SSYNC();
78#endif
79}
80#else
81void __init init_leds(void)
82{
83}
84#endif
85
86#if defined(CONFIG_BFIN_ALIVE_LED)
87static inline void do_leds(void)
88{
89 static unsigned int count = 50;
90 static int flag;
91 unsigned short tmp = 0;
92
93 if (--count == 0) {
94 count = 50;
95 flag = ~flag;
96 }
97 tmp = bfin_read_CONFIG_BFIN_ALIVE_LED_PORT();
98 SSYNC();
99
100 if (flag)
101 tmp &= ~CONFIG_BFIN_ALIVE_LED_PIN; /* light on */
102 else
103 tmp |= CONFIG_BFIN_ALIVE_LED_PIN; /* light off */
104
105 bfin_write_CONFIG_BFIN_ALIVE_LED_PORT(tmp);
106 SSYNC();
107
108}
109#else
110static inline void do_leds(void)
111{
112}
113#endif
114 45
115static struct irqaction bfin_timer_irq = { 46static struct irqaction bfin_timer_irq = {
116 .name = "BFIN Timer Tick", 47 .name = "BFIN Timer Tick",
@@ -205,7 +136,6 @@ irqreturn_t timer_interrupt(int irq, void *dummy)
205 write_seqlock(&xtime_lock); 136 write_seqlock(&xtime_lock);
206 137
207 do_timer(1); 138 do_timer(1);
208 do_leds();
209 139
210#ifndef CONFIG_SMP 140#ifndef CONFIG_SMP
211 update_process_times(user_mode(get_irq_regs())); 141 update_process_times(user_mode(get_irq_regs()));