Add coloured led interface for ARM boards.
Use it in cpu/arm920t/start.S to indicate U-Boot code has been entered.
This commit is contained in:
parent
7462fe0d5a
commit
9f5c3d3720
14
cpu/arm920t/start.S
Normal file → Executable file
14
cpu/arm920t/start.S
Normal file → Executable file
@ -27,9 +27,7 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <version.h>
|
#include <version.h>
|
||||||
#if defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) || defined(CONFIG_AT91RM9200DF)
|
#include <asm/led.h>
|
||||||
#include <led.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
@ -117,13 +115,13 @@ reset:
|
|||||||
bic r0,r0,#0x1f
|
bic r0,r0,#0x1f
|
||||||
orr r0,r0,#0xd3
|
orr r0,r0,#0xd3
|
||||||
msr cpsr,r0
|
msr cpsr,r0
|
||||||
|
/*
|
||||||
#if CONFIG_AT91RM9200
|
* if board has a red led use it to show U-Boot is running
|
||||||
#if defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) || defined(CONFIG_AT91RM9200DF)
|
*/
|
||||||
bl LED_init
|
bl coloured_LED_init
|
||||||
bl red_LED_on
|
bl red_LED_on
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#ifdef CONFIG_AT91RM9200
|
||||||
#ifdef CONFIG_BOOTBINFUNC
|
#ifdef CONFIG_BOOTBINFUNC
|
||||||
/* code based on entry.S from ATMEL */
|
/* code based on entry.S from ATMEL */
|
||||||
#define AT91C_BASE_CKGR 0xFFFFFC20
|
#define AT91C_BASE_CKGR 0xFFFFFC20
|
||||||
|
2
board/at91rm9200dk/led.h → include/asm-arm/led.h
Normal file → Executable file
2
board/at91rm9200dk/led.h → include/asm-arm/led.h
Normal file → Executable file
@ -26,7 +26,7 @@
|
|||||||
#define __LED_H
|
#define __LED_H
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
extern void LED_init (void);
|
extern void coloured_LED_init (void);
|
||||||
extern void red_LED_on(void);
|
extern void red_LED_on(void);
|
||||||
extern void red_LED_off(void);
|
extern void red_LED_off(void);
|
||||||
extern void green_LED_on(void);
|
extern void green_LED_on(void);
|
24
lib_arm/board.c
Normal file → Executable file
24
lib_arm/board.c
Normal file → Executable file
@ -111,6 +111,30 @@ void *sbrk (ptrdiff_t increment)
|
|||||||
return ((void *) old);
|
return ((void *) old);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* Coloured LED functionality
|
||||||
|
************************************************************************
|
||||||
|
* May be supplied by boards if desired
|
||||||
|
*/
|
||||||
|
void inline __coloured_LED_init (void) {}
|
||||||
|
void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init")));
|
||||||
|
void inline __red_LED_on (void) {}
|
||||||
|
void inline red_LED_on (void) __attribute__((weak, alias("__red_LED_on")));
|
||||||
|
void inline __red_LED_off(void) {}
|
||||||
|
void inline red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
|
||||||
|
void inline __green_LED_on(void) {}
|
||||||
|
void inline green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
|
||||||
|
void inline __green_LED_off(void) {}
|
||||||
|
void inline green_LED_off(void)__attribute__((weak, alias("__green_LED_off")));
|
||||||
|
void inline __yellow_LED_on(void) {}
|
||||||
|
void inline yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on")));
|
||||||
|
void inline __yellow_LED_off(void) {}
|
||||||
|
void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off")));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* Init Utilities *
|
* Init Utilities *
|
||||||
************************************************************************
|
************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user