1/*
2 * function prototpyes for early printk
3 *
4 * Copyright 2007-2009 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#ifndef __ASM_EARLY_PRINTK_H__
10#define __ASM_EARLY_PRINTK_H__
11
12#ifdef CONFIG_EARLY_PRINTK
13/* For those that don't include it already */
14#include <linux/console.h>
15
16extern int setup_early_printk(char *);
17extern void enable_shadow_console(void);
18extern int shadow_console_enabled(void);
19extern void mark_shadow_error(void);
20extern void early_shadow_reg(unsigned long reg, unsigned int n);
21extern void early_shadow_write(struct console *con, const char *s,
22	unsigned int n) __attribute__((nonnull(2)));
23#define early_shadow_puts(str) early_shadow_write(NULL, str, strlen(str))
24#define early_shadow_stamp() \
25	do { \
26		early_shadow_puts(__FILE__ " : " __stringify(__LINE__) " ["); \
27		early_shadow_puts(__func__); \
28		early_shadow_puts("]\n"); \
29	} while (0)
30#else
31#define setup_early_printk(fmt) do { } while (0)
32#define enable_shadow_console(fmt)  do { } while (0)
33#define early_shadow_stamp() do { } while (0)
34#endif /* CONFIG_EARLY_PRINTK */
35
36#endif /* __ASM_EARLY_PRINTK_H__ */
37