Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Michael Ellerman | 296167a | 2006-01-11 11:54:09 +1100 | [diff] [blame] | 2 | * (c) 2001, 2006 IBM Corporation. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; either version |
| 7 | * 2 of the License, or (at your option) any later version. |
| 8 | */ |
| 9 | |
David Gibson | 35cd878 | 2005-11-11 16:42:12 +1100 | [diff] [blame] | 10 | #ifndef _ASM_POWERPC_UDBG_H |
| 11 | #define _ASM_POWERPC_UDBG_H |
Arnd Bergmann | 88ced03 | 2005-12-16 22:43:46 +0100 | [diff] [blame] | 12 | #ifdef __KERNEL__ |
David Gibson | 35cd878 | 2005-11-11 16:42:12 +1100 | [diff] [blame] | 13 | |
| 14 | #include <linux/compiler.h> |
| 15 | #include <linux/init.h> |
| 16 | |
Benjamin Herrenschmidt | 51d3082 | 2005-11-23 17:57:25 +1100 | [diff] [blame] | 17 | extern void (*udbg_putc)(char c); |
Andrew Klossner | af9c724 | 2009-03-09 07:52:41 +0000 | [diff] [blame] | 18 | extern void (*udbg_flush)(void); |
Benjamin Herrenschmidt | bb6b9b2 | 2005-11-30 16:54:12 +1100 | [diff] [blame] | 19 | extern int (*udbg_getc)(void); |
Milton Miller | c8f1c8b | 2005-09-06 11:56:42 +1000 | [diff] [blame] | 20 | extern int (*udbg_getc_poll)(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | |
Milton Miller | c8f1c8b | 2005-09-06 11:56:42 +1000 | [diff] [blame] | 22 | extern void udbg_puts(const char *s); |
| 23 | extern int udbg_write(const char *s, int n); |
Milton Miller | c8f1c8b | 2005-09-06 11:56:42 +1000 | [diff] [blame] | 24 | |
Milton Miller | 8d92739 | 2005-09-06 11:57:27 +1000 | [diff] [blame] | 25 | extern void register_early_udbg_console(void); |
jimix@watson.ibm.com | 8ae5b28 | 2006-05-17 12:00:35 -0400 | [diff] [blame] | 26 | extern void udbg_printf(const char *fmt, ...) |
| 27 | __attribute__ ((format (printf, 1, 2))); |
Kumar Gala | be6b843 | 2005-12-20 16:37:07 -0600 | [diff] [blame] | 28 | extern void udbg_progress(char *s, unsigned short hex); |
Milton Miller | c8f1c8b | 2005-09-06 11:56:42 +1000 | [diff] [blame] | 29 | |
Benjamin Herrenschmidt | 3092574 | 2013-07-15 13:03:12 +1000 | [diff] [blame] | 30 | extern void udbg_uart_init_mmio(void __iomem *addr, unsigned int stride); |
| 31 | extern void udbg_uart_init_pio(unsigned long port, unsigned int stride); |
| 32 | |
| 33 | extern void udbg_uart_setup(unsigned int speed, unsigned int clock); |
| 34 | extern unsigned int udbg_probe_uart_speed(unsigned int clock); |
Paul Mackerras | 35499c0 | 2005-10-22 16:02:39 +1000 | [diff] [blame] | 35 | |
| 36 | struct device_node; |
Benjamin Herrenschmidt | 51d3082 | 2005-11-23 17:57:25 +1100 | [diff] [blame] | 37 | extern void udbg_scc_init(int force_scc); |
| 38 | extern int udbg_adb_init(int force_btext); |
| 39 | extern void udbg_adb_init_early(void); |
| 40 | |
Michael Ellerman | 296167a | 2006-01-11 11:54:09 +1100 | [diff] [blame] | 41 | extern void __init udbg_early_init(void); |
| 42 | extern void __init udbg_init_debug_lpar(void); |
Benjamin Herrenschmidt | 4d2bb3f | 2011-05-12 13:46:38 +1000 | [diff] [blame] | 43 | extern void __init udbg_init_debug_lpar_hvsi(void); |
Michael Ellerman | 296167a | 2006-01-11 11:54:09 +1100 | [diff] [blame] | 44 | extern void __init udbg_init_pmac_realmode(void); |
| 45 | extern void __init udbg_init_maple_realmode(void); |
Olof Johansson | 39c870d | 2007-02-04 16:36:49 -0600 | [diff] [blame] | 46 | extern void __init udbg_init_pas_realmode(void); |
Michael Ellerman | cc46bb9 | 2006-06-23 18:20:16 +1000 | [diff] [blame] | 47 | extern void __init udbg_init_rtas_panel(void); |
| 48 | extern void __init udbg_init_rtas_console(void); |
Ishizaki Kou | d7480a9 | 2007-02-02 16:43:21 +0900 | [diff] [blame] | 49 | extern void __init udbg_init_debug_beat(void); |
David Gibson | 719c91c | 2007-02-13 15:54:22 +1100 | [diff] [blame] | 50 | extern void __init udbg_init_btext(void); |
David Gibson | d9b55a0 | 2007-05-08 12:59:31 +1000 | [diff] [blame] | 51 | extern void __init udbg_init_44x_as1(void); |
Benjamin Herrenschmidt | 9dae8af | 2007-12-21 15:39:26 +1100 | [diff] [blame] | 52 | extern void __init udbg_init_40x_realmode(void); |
Scott Wood | c374e00 | 2007-07-16 11:43:43 -0500 | [diff] [blame] | 53 | extern void __init udbg_init_cpm(void); |
Albert Herranz | d1d56f8 | 2009-12-12 06:31:51 +0000 | [diff] [blame] | 54 | extern void __init udbg_init_usbgecko(void); |
Alistair Popple | 3065023 | 2013-04-29 18:07:47 +0000 | [diff] [blame] | 55 | extern void __init udbg_init_memcons(void); |
Timur Tabi | dcd83aa | 2011-07-08 19:06:12 -0500 | [diff] [blame] | 56 | extern void __init udbg_init_ehv_bc(void); |
Hector Martin | c26afe9 | 2011-08-31 06:32:26 +0000 | [diff] [blame] | 57 | extern void __init udbg_init_ps3gelic(void); |
Benjamin Herrenschmidt | daea117 | 2011-09-19 17:44:59 +0000 | [diff] [blame] | 58 | extern void __init udbg_init_debug_opal_raw(void); |
| 59 | extern void __init udbg_init_debug_opal_hvsi(void); |
Michael Ellerman | 296167a | 2006-01-11 11:54:09 +1100 | [diff] [blame] | 60 | |
Arnd Bergmann | 88ced03 | 2005-12-16 22:43:46 +0100 | [diff] [blame] | 61 | #endif /* __KERNEL__ */ |
David Gibson | 35cd878 | 2005-11-11 16:42:12 +1100 | [diff] [blame] | 62 | #endif /* _ASM_POWERPC_UDBG_H */ |