early_printk.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. #ifndef __ASM_EARLY_PRINTK_H__
  9. #define __ASM_EARLY_PRINTK_H__
  10. #ifdef CONFIG_EARLY_PRINTK
  11. /* For those that don't include it already */
  12. #include <linux/console.h>
  13. extern int setup_early_printk(char *);
  14. extern void enable_shadow_console(void);
  15. extern int shadow_console_enabled(void);
  16. extern void mark_shadow_error(void);
  17. extern void early_shadow_reg(unsigned long reg, unsigned int n);
  18. extern void early_shadow_write(struct console *con, const char *s,
  19. unsigned int n) __attribute__((nonnull(2)));
  20. #define early_shadow_puts(str) early_shadow_write(NULL, str, strlen(str))
  21. #define early_shadow_stamp() \
  22. do { \
  23. early_shadow_puts(__FILE__ " : " __stringify(__LINE__) " ["); \
  24. early_shadow_puts(__func__); \
  25. early_shadow_puts("]\n"); \
  26. } while (0)
  27. #else
  28. #define setup_early_printk(fmt) do { } while (0)
  29. #define enable_shadow_console(fmt) do { } while (0)
  30. #define early_shadow_stamp() do { } while (0)
  31. #endif /* CONFIG_EARLY_PRINTK */
  32. #endif /* __ASM_EARLY_PRINTK_H__ */