~ubuntu-branches/ubuntu/maverick/uboot-imx/maverick

« back to all changes in this revision

Viewing changes to cpu/blackfin/os_log.c

  • Committer: Bazaar Package Importer
  • Author(s): Oliver Grawert
  • Date: 2010-01-20 15:41:26 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100120154126-7bha1jeyjegu7xm5
Tags: 2009.08+really2009.01-0ubuntu1
* revert to the 2009.01 upstream version, 2009.08 has still to 
  many work in progress items in the freescale patchset (MMC and NIC
  dont work at all)
* add the latest patchset from freescale for 2009.01
* add 1002_enable_hush_shell_and_ext2.patch to enable hush shell and ext2 
* add 1003_fix_board_revision_numbers to make sure babbage 2.5 boards have 
  revision 51120 and babbage 3.0 boards have revision 51130 properly set in 
  their cpuinfo

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
bool bfin_os_log_check(void)
16
 
{
17
 
        if (*OS_LOG_MAGIC_ADDR != OS_LOG_MAGIC)
18
 
                return false;
19
 
        *OS_LOG_MAGIC_ADDR = 0;
20
 
        return true;
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
 
}