]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/blackfin/cpu/os_log.c
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
[karo-tx-uboot.git] / arch / blackfin / cpu / os_log.c
1 /*
2  * functions for handling OS log buffer
3  *
4  * Copyright (c) 2009 Analog Devices Inc.
5  *
6  * Licensed under the 2-clause BSD.
7  */
8
9 #include <common.h>
10
11 #define OS_LOG_MAGIC       0xDEADBEEF
12 #define OS_LOG_MAGIC_ADDR  ((unsigned long *)0x4f0)
13 #define OS_LOG_PTR_ADDR    ((char **)0x4f4)
14
15 int bfin_os_log_check(void)
16 {
17         if (*OS_LOG_MAGIC_ADDR != OS_LOG_MAGIC)
18                 return 0;
19         *OS_LOG_MAGIC_ADDR = 0;
20         return 1;
21 }
22
23 void bfin_os_log_dump(void)
24 {
25         char *log = *OS_LOG_PTR_ADDR;
26         while (*log) {
27                 puts(log);
28                 log += strlen(log) + 1;
29         }
30 }