summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]cpu/arm920t/start.S14
-rwxr-xr-x[-rw-r--r--]include/asm-arm/led.h (renamed from board/at91rm9200dk/led.h)2
-rwxr-xr-x[-rw-r--r--]lib_arm/board.c24
3 files changed, 31 insertions, 9 deletions
diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S
index b9c364b..1bc6099 100644..100755
--- a/cpu/arm920t/start.S
+++ b/cpu/arm920t/start.S
@@ -27,9 +27,7 @@
#include <config.h>
#include <version.h>
-#if defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) || defined(CONFIG_AT91RM9200DF)
-#include <led.h>
-#endif
+#include <asm/led.h>
/*
*************************************************************************
@@ -117,13 +115,13 @@ reset:
bic r0,r0,#0x1f
orr r0,r0,#0xd3
msr cpsr,r0
-
-#if CONFIG_AT91RM9200
-#if defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) || defined(CONFIG_AT91RM9200DF)
- bl LED_init
+ /*
+ * if board has a red led use it to show U-Boot is running
+ */
+ bl coloured_LED_init
bl red_LED_on
-#endif
+#ifdef CONFIG_AT91RM9200
#ifdef CONFIG_BOOTBINFUNC
/* code based on entry.S from ATMEL */
#define AT91C_BASE_CKGR 0xFFFFFC20
diff --git a/board/at91rm9200dk/led.h b/include/asm-arm/led.h
index 57c2b4a..f78a4b1 100644..100755
--- a/board/at91rm9200dk/led.h
+++ b/include/asm-arm/led.h
@@ -26,7 +26,7 @@
#define __LED_H
#ifndef __ASSEMBLY__
-extern void LED_init (void);
+extern void coloured_LED_init (void);
extern void red_LED_on(void);
extern void red_LED_off(void);
extern void green_LED_on(void);
diff --git a/lib_arm/board.c b/lib_arm/board.c
index d37e5da..6b49925 100644..100755
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -112,6 +112,30 @@ void *sbrk (ptrdiff_t increment)
}
/************************************************************************
+ * 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 *
************************************************************************
* Some of this code should be moved into the core functions,