blob: 68a910db8864f95cb32d39238681bd0dd5f6db3e [file] [log] [blame]
Robin Getz0ae53642007-10-09 17:24:49 +08001/*
Robin Getz96f10502009-09-24 14:11:24 +00002 * function prototpyes for early printk
Robin Getz0ae53642007-10-09 17:24:49 +08003 *
Robin Getz96f10502009-09-24 14:11:24 +00004 * Copyright 2007-2009 Analog Devices Inc.
Robin Getz0ae53642007-10-09 17:24:49 +08005 *
Robin Getz96f10502009-09-24 14:11:24 +00006 * Licensed under the GPL-2 or later.
Robin Getz0ae53642007-10-09 17:24:49 +08007 */
8
Robin Getz837ec2d2009-07-07 20:17:09 +00009#ifndef __ASM_EARLY_PRINTK_H__
10#define __ASM_EARLY_PRINTK_H__
11
Robin Getz0ae53642007-10-09 17:24:49 +080012#ifdef CONFIG_EARLY_PRINTK
Robin Getz837ec2d2009-07-07 20:17:09 +000013/* For those that don't include it already */
14#include <linux/console.h>
15
Robin Getz0ae53642007-10-09 17:24:49 +080016extern int setup_early_printk(char *);
Robin Getz3f871fe2009-07-06 14:53:19 +000017extern void enable_shadow_console(void);
Robin Getz837ec2d2009-07-07 20:17:09 +000018extern 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)
Robin Getz0ae53642007-10-09 17:24:49 +080030#else
31#define setup_early_printk(fmt) do { } while (0)
Robin Getz3f871fe2009-07-06 14:53:19 +000032#define enable_shadow_console(fmt) do { } while (0)
Robin Getz837ec2d2009-07-07 20:17:09 +000033#define early_shadow_stamp() do { } while (0)
Robin Getz0ae53642007-10-09 17:24:49 +080034#endif /* CONFIG_EARLY_PRINTK */
Robin Getz837ec2d2009-07-07 20:17:09 +000035
36#endif /* __ASM_EARLY_PRINTK_H__ */