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
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
#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
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
*/
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);
}
}
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)
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",
write_seqlock(&xtime_lock);
do_timer(1);
- do_leds();
#ifndef CONFIG_SMP
update_process_times(user_mode(get_irq_regs()));