Robin Getz | 0ae5364 | 2007-10-09 17:24:49 +0800 | [diff] [blame] | 1 | /* |
Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 2 | * function prototpyes for early printk |
Robin Getz | 0ae5364 | 2007-10-09 17:24:49 +0800 | [diff] [blame] | 3 | * |
Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 4 | * Copyright 2007-2009 Analog Devices Inc. |
Robin Getz | 0ae5364 | 2007-10-09 17:24:49 +0800 | [diff] [blame] | 5 | * |
Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 6 | * Licensed under the GPL-2 or later. |
Robin Getz | 0ae5364 | 2007-10-09 17:24:49 +0800 | [diff] [blame] | 7 | */ |
| 8 | |
Robin Getz | 837ec2d | 2009-07-07 20:17:09 +0000 | [diff] [blame] | 9 | #ifndef __ASM_EARLY_PRINTK_H__ |
| 10 | #define __ASM_EARLY_PRINTK_H__ |
| 11 | |
Robin Getz | 0ae5364 | 2007-10-09 17:24:49 +0800 | [diff] [blame] | 12 | #ifdef CONFIG_EARLY_PRINTK |
Robin Getz | 837ec2d | 2009-07-07 20:17:09 +0000 | [diff] [blame] | 13 | /* For those that don't include it already */ |
| 14 | #include <linux/console.h> |
| 15 | |
Robin Getz | 0ae5364 | 2007-10-09 17:24:49 +0800 | [diff] [blame] | 16 | extern int setup_early_printk(char *); |
Robin Getz | 3f871fe | 2009-07-06 14:53:19 +0000 | [diff] [blame] | 17 | extern void enable_shadow_console(void); |
Robin Getz | 837ec2d | 2009-07-07 20:17:09 +0000 | [diff] [blame] | 18 | extern int shadow_console_enabled(void); |
| 19 | extern void mark_shadow_error(void); |
| 20 | extern void early_shadow_reg(unsigned long reg, unsigned int n); |
| 21 | extern 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 Getz | 0ae5364 | 2007-10-09 17:24:49 +0800 | [diff] [blame] | 30 | #else |
| 31 | #define setup_early_printk(fmt) do { } while (0) |
Robin Getz | 3f871fe | 2009-07-06 14:53:19 +0000 | [diff] [blame] | 32 | #define enable_shadow_console(fmt) do { } while (0) |
Robin Getz | 837ec2d | 2009-07-07 20:17:09 +0000 | [diff] [blame] | 33 | #define early_shadow_stamp() do { } while (0) |
Robin Getz | 0ae5364 | 2007-10-09 17:24:49 +0800 | [diff] [blame] | 34 | #endif /* CONFIG_EARLY_PRINTK */ |
Robin Getz | 837ec2d | 2009-07-07 20:17:09 +0000 | [diff] [blame] | 35 | |
| 36 | #endif /* __ASM_EARLY_PRINTK_H__ */ |