[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>
This commit is contained in:
parent
3ca32c1dc6
commit
54a1668ce5
|
@ -463,40 +463,6 @@ config BOOT_LOAD
|
||||||
memory region is used to capture NULL pointer references as well
|
memory region is used to capture NULL pointer references as well
|
||||||
as some core kernel functions.
|
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
|
choice
|
||||||
prompt "Blackfin Exception Scratch Register"
|
prompt "Blackfin Exception Scratch Register"
|
||||||
default BFIN_SCRATCH_REG_RETN
|
default BFIN_SCRATCH_REG_RETN
|
||||||
|
@ -543,41 +509,6 @@ config BFIN_SCRATCH_REG_CYCLES
|
||||||
|
|
||||||
endchoice
|
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
|
endmenu
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,9 +39,6 @@
|
||||||
#include <asm/blackfin.h>
|
#include <asm/blackfin.h>
|
||||||
#include <asm/fixed_code.h>
|
#include <asm/fixed_code.h>
|
||||||
|
|
||||||
#define LED_ON 0
|
|
||||||
#define LED_OFF 1
|
|
||||||
|
|
||||||
asmlinkage void ret_from_fork(void);
|
asmlinkage void ret_from_fork(void);
|
||||||
|
|
||||||
/* Points to the SDRAM backup memory for the stack that is currently in
|
/* 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;
|
void (*pm_power_off)(void) = NULL;
|
||||||
EXPORT_SYMBOL(pm_power_off);
|
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
|
* The idle loop on BFIN
|
||||||
*/
|
*/
|
||||||
|
@ -106,12 +77,10 @@ void cpu_idle(void)__attribute__((l1_text));
|
||||||
void default_idle(void)
|
void default_idle(void)
|
||||||
{
|
{
|
||||||
while (!need_resched()) {
|
while (!need_resched()) {
|
||||||
leds_switch(LED_OFF);
|
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
if (likely(!need_resched()))
|
if (likely(!need_resched()))
|
||||||
idle_with_irq_disabled();
|
idle_with_irq_disabled();
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
leds_switch(LED_ON);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -315,8 +315,6 @@ void __init setup_arch(char **cmdline_p)
|
||||||
init_mm.end_data = (unsigned long)_edata;
|
init_mm.end_data = (unsigned long)_edata;
|
||||||
init_mm.brk = (unsigned long)0;
|
init_mm.brk = (unsigned long)0;
|
||||||
|
|
||||||
init_leds();
|
|
||||||
|
|
||||||
_bfin_swrst = bfin_read_SWRST();
|
_bfin_swrst = bfin_read_SWRST();
|
||||||
|
|
||||||
if (_bfin_swrst & RESET_DOUBLE)
|
if (_bfin_swrst & RESET_DOUBLE)
|
||||||
|
|
|
@ -42,75 +42,6 @@
|
||||||
static void time_sched_init(irqreturn_t(*timer_routine)
|
static void time_sched_init(irqreturn_t(*timer_routine)
|
||||||
(int, void *));
|
(int, void *));
|
||||||
static unsigned long gettimeoffset(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 = {
|
static struct irqaction bfin_timer_irq = {
|
||||||
.name = "BFIN Timer Tick",
|
.name = "BFIN Timer Tick",
|
||||||
|
@ -205,7 +136,6 @@ irqreturn_t timer_interrupt(int irq, void *dummy)
|
||||||
write_seqlock(&xtime_lock);
|
write_seqlock(&xtime_lock);
|
||||||
|
|
||||||
do_timer(1);
|
do_timer(1);
|
||||||
do_leds();
|
|
||||||
|
|
||||||
#ifndef CONFIG_SMP
|
#ifndef CONFIG_SMP
|
||||||
update_process_times(user_mode(get_irq_regs()));
|
update_process_times(user_mode(get_irq_regs()));
|
||||||
|
|
Loading…
Reference in New Issue