early_printk.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * File: include/asm-blackfin/early_printk.h
  3. * Author: Robin Getz <rgetz@blackfin.uclinux.org
  4. *
  5. * Created: 14Aug2007
  6. * Description: function prototpyes for early printk
  7. *
  8. * Modified:
  9. * Copyright 2004-2007 Analog Devices Inc.
  10. *
  11. * Bugs: Enter bugs at http://blackfin.uclinux.org/
  12. *
  13. * This program is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License as published by
  15. * the Free Software Foundation; either version 2 of the License, or
  16. * (at your option) any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. */
  23. #ifndef __ASM_EARLY_PRINTK_H__
  24. #define __ASM_EARLY_PRINTK_H__
  25. #ifdef CONFIG_EARLY_PRINTK
  26. /* For those that don't include it already */
  27. #include <linux/console.h>
  28. extern int setup_early_printk(char *);
  29. extern void enable_shadow_console(void);
  30. extern int shadow_console_enabled(void);
  31. extern void mark_shadow_error(void);
  32. extern void early_shadow_reg(unsigned long reg, unsigned int n);
  33. extern void early_shadow_write(struct console *con, const char *s,
  34. unsigned int n) __attribute__((nonnull(2)));
  35. #define early_shadow_puts(str) early_shadow_write(NULL, str, strlen(str))
  36. #define early_shadow_stamp() \
  37. do { \
  38. early_shadow_puts(__FILE__ " : " __stringify(__LINE__) " ["); \
  39. early_shadow_puts(__func__); \
  40. early_shadow_puts("]\n"); \
  41. } while (0)
  42. #else
  43. #define setup_early_printk(fmt) do { } while (0)
  44. #define enable_shadow_console(fmt) do { } while (0)
  45. #define early_shadow_stamp() do { } while (0)
  46. #endif /* CONFIG_EARLY_PRINTK */
  47. #endif /* __ASM_EARLY_PRINTK_H__ */