summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-07-20 22:55:29 +0200
committerWolfgang Denk <wd@denx.de>2009-07-20 22:55:29 +0200
commit725e53a70dfc8e96965715c1f61ae002061dac6b (patch)
tree10d026062a6e09f3c98fd421d9258a0c2db1ed5f /cpu
parent23b5b1d3e1e33e9650cc7a4e09901272a3811c64 (diff)
parent8d1fea2c4041e665c96944e3f6fcffbde55db34b (diff)
downloadu-boot-imx-725e53a70dfc8e96965715c1f61ae002061dac6b.zip
u-boot-imx-725e53a70dfc8e96965715c1f61ae002061dac6b.tar.gz
u-boot-imx-725e53a70dfc8e96965715c1f61ae002061dac6b.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-blackfin
Diffstat (limited to 'cpu')
-rw-r--r--cpu/blackfin/Makefile8
-rw-r--r--cpu/blackfin/os_log.c30
2 files changed, 37 insertions, 1 deletions
diff --git a/cpu/blackfin/Makefile b/cpu/blackfin/Makefile
index 1378fd1..5eef6a3 100644
--- a/cpu/blackfin/Makefile
+++ b/cpu/blackfin/Makefile
@@ -17,8 +17,14 @@ EXTRA :=
CEXTRA := initcode.o
SEXTRA := start.o
SOBJS := interrupt.o cache.o
-COBJS-y := cpu.o traps.o interrupts.o reset.o serial.o watchdog.o
+COBJS-y += cpu.o
+COBJS-y += interrupts.o
COBJS-$(CONFIG_JTAG_CONSOLE) += jtag-console.o
+COBJS-y += os_log.o
+COBJS-y += reset.o
+COBJS-y += serial.o
+COBJS-y += traps.o
+COBJS-y += watchdog.o
ifeq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
COBJS-y += initcode.o
diff --git a/cpu/blackfin/os_log.c b/cpu/blackfin/os_log.c
new file mode 100644
index 0000000..e1c8e29
--- /dev/null
+++ b/cpu/blackfin/os_log.c
@@ -0,0 +1,30 @@
+/*
+ * functions for handling OS log buffer
+ *
+ * Copyright (c) 2009 Analog Devices Inc.
+ *
+ * Licensed under the 2-clause BSD.
+ */
+
+#include <common.h>
+
+#define OS_LOG_MAGIC 0xDEADBEEF
+#define OS_LOG_MAGIC_ADDR ((unsigned long *)0x4f0)
+#define OS_LOG_PTR_ADDR ((char **)0x4f4)
+
+bool bfin_os_log_check(void)
+{
+ if (*OS_LOG_MAGIC_ADDR != OS_LOG_MAGIC)
+ return false;
+ *OS_LOG_MAGIC_ADDR = 0;
+ return true;
+}
+
+void bfin_os_log_dump(void)
+{
+ char *log = *OS_LOG_PTR_ADDR;
+ while (*log) {
+ puts(log);
+ log += strlen(log) + 1;
+ }
+}