u-boot/arch/blackfin/cpu/os_log.c
Wolfgang Denk a5750b8058 blackfin: don't use 'bool' when it causes problems
The use of 'bool' data types in globally used header files cases build
errors like this:

In file included from arch/blackfin/include/asm/blackfin.h:13:0,
                 from include/common.h:92,
                 from cmd_test.c:17:
arch/blackfin/include/asm/blackfin_local.h:54:1: error: unknown type name 'bool'

Use plain 'int' instead to avoid such kind of trouble.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2013-11-25 10:41:55 -05:00

30 lines
531 B
C

/*
* 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)
int bfin_os_log_check(void)
{
if (*OS_LOG_MAGIC_ADDR != OS_LOG_MAGIC)
return 0;
*OS_LOG_MAGIC_ADDR = 0;
return 1;
}
void bfin_os_log_dump(void)
{
char *log = *OS_LOG_PTR_ADDR;
while (*log) {
puts(log);
log += strlen(log) + 1;
}
}