blob: 78f2675f2aacb3e4f08258270e604af40103a62c [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Michael Ellerman296167a2006-01-11 11:54:09 +11002 * (c) 2001, 2006 IBM Corporation.
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 *
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 Gibson35cd8782005-11-11 16:42:12 +110010#ifndef _ASM_POWERPC_UDBG_H
11#define _ASM_POWERPC_UDBG_H
Arnd Bergmann88ced032005-12-16 22:43:46 +010012#ifdef __KERNEL__
David Gibson35cd8782005-11-11 16:42:12 +110013
14#include <linux/compiler.h>
15#include <linux/init.h>
16
Benjamin Herrenschmidt51d30822005-11-23 17:57:25 +110017extern void (*udbg_putc)(char c);
Andrew Klossneraf9c7242009-03-09 07:52:41 +000018extern void (*udbg_flush)(void);
Benjamin Herrenschmidtbb6b9b22005-11-30 16:54:12 +110019extern int (*udbg_getc)(void);
Milton Millerc8f1c8b2005-09-06 11:56:42 +100020extern int (*udbg_getc_poll)(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070021
Milton Millerc8f1c8b2005-09-06 11:56:42 +100022extern void udbg_puts(const char *s);
23extern int udbg_write(const char *s, int n);
Milton Millerc8f1c8b2005-09-06 11:56:42 +100024
Milton Miller8d927392005-09-06 11:57:27 +100025extern void register_early_udbg_console(void);
jimix@watson.ibm.com8ae5b282006-05-17 12:00:35 -040026extern void udbg_printf(const char *fmt, ...)
27 __attribute__ ((format (printf, 1, 2)));
Kumar Galabe6b8432005-12-20 16:37:07 -060028extern void udbg_progress(char *s, unsigned short hex);
Milton Millerc8f1c8b2005-09-06 11:56:42 +100029
Benjamin Herrenschmidt30925742013-07-15 13:03:12 +100030extern void udbg_uart_init_mmio(void __iomem *addr, unsigned int stride);
31extern void udbg_uart_init_pio(unsigned long port, unsigned int stride);
32
33extern void udbg_uart_setup(unsigned int speed, unsigned int clock);
34extern unsigned int udbg_probe_uart_speed(unsigned int clock);
Paul Mackerras35499c02005-10-22 16:02:39 +100035
36struct device_node;
Benjamin Herrenschmidt51d30822005-11-23 17:57:25 +110037extern void udbg_scc_init(int force_scc);
38extern int udbg_adb_init(int force_btext);
39extern void udbg_adb_init_early(void);
40
Michael Ellerman296167a2006-01-11 11:54:09 +110041extern void __init udbg_early_init(void);
42extern void __init udbg_init_debug_lpar(void);
Benjamin Herrenschmidt4d2bb3f2011-05-12 13:46:38 +100043extern void __init udbg_init_debug_lpar_hvsi(void);
Michael Ellerman296167a2006-01-11 11:54:09 +110044extern void __init udbg_init_pmac_realmode(void);
45extern void __init udbg_init_maple_realmode(void);
Olof Johansson39c870d2007-02-04 16:36:49 -060046extern void __init udbg_init_pas_realmode(void);
Michael Ellermancc46bb92006-06-23 18:20:16 +100047extern void __init udbg_init_rtas_panel(void);
48extern void __init udbg_init_rtas_console(void);
Ishizaki Koud7480a92007-02-02 16:43:21 +090049extern void __init udbg_init_debug_beat(void);
David Gibson719c91c2007-02-13 15:54:22 +110050extern void __init udbg_init_btext(void);
David Gibsond9b55a02007-05-08 12:59:31 +100051extern void __init udbg_init_44x_as1(void);
Benjamin Herrenschmidt9dae8af2007-12-21 15:39:26 +110052extern void __init udbg_init_40x_realmode(void);
Scott Woodc374e002007-07-16 11:43:43 -050053extern void __init udbg_init_cpm(void);
Albert Herranzd1d56f82009-12-12 06:31:51 +000054extern void __init udbg_init_usbgecko(void);
Alistair Popple30650232013-04-29 18:07:47 +000055extern void __init udbg_init_memcons(void);
Timur Tabidcd83aa2011-07-08 19:06:12 -050056extern void __init udbg_init_ehv_bc(void);
Hector Martinc26afe92011-08-31 06:32:26 +000057extern void __init udbg_init_ps3gelic(void);
Benjamin Herrenschmidtdaea1172011-09-19 17:44:59 +000058extern void __init udbg_init_debug_opal_raw(void);
59extern void __init udbg_init_debug_opal_hvsi(void);
Michael Ellerman296167a2006-01-11 11:54:09 +110060
Arnd Bergmann88ced032005-12-16 22:43:46 +010061#endif /* __KERNEL__ */
David Gibson35cd8782005-11-11 16:42:12 +110062#endif /* _ASM_POWERPC_UDBG_H */