11 #include <linux/types.h>
52 static void udbg_550_flush(
void)
60 static void udbg_550_putc(
char c)
66 out_8(&udbg_comport->thr, c);
70 static int udbg_550_getc_poll(
void)
74 return in_8(&udbg_comport->
rbr);
81 static int udbg_550_getc(
void)
86 return in_8(&udbg_comport->
rbr);
94 unsigned int dll, base_bauds;
101 base_bauds = clock / 16;
102 dll = base_bauds / speed;
105 udbg_comport = (
struct NS16550 __iomem *)comport;
110 out_8(&udbg_comport->dll, dll & 0xff);
111 out_8(&udbg_comport->dlm, dll >> 8);
137 dll =
in_8(&port->dll);
138 dlm =
in_8(&port->dlm);
139 divisor = dlm << 8 |
dll;
151 speed = (clock / prescaler) / (divisor * 16);
154 if (speed > (clock / 16))
160 #ifdef CONFIG_PPC_MAPLE
161 void udbg_maple_real_flush(
void)
169 void udbg_maple_real_putc(
char c)
173 udbg_maple_real_putc(
'\r');
174 udbg_maple_real_flush();
179 void __init udbg_init_maple_realmode(
void)
190 #ifdef CONFIG_PPC_PASEMI
191 void udbg_pas_real_flush(
void)
199 void udbg_pas_real_putc(
char c)
203 udbg_pas_real_putc(
'\r');
204 udbg_pas_real_flush();
209 void udbg_init_pas_realmode(
void)
220 #ifdef CONFIG_PPC_EARLY_DEBUG_44x
223 static void udbg_44x_as1_flush(
void)
231 static void udbg_44x_as1_putc(
char c)
235 udbg_44x_as1_putc(
'\r');
236 udbg_44x_as1_flush();
241 static int udbg_44x_as1_getc(
void)
251 void __init udbg_init_44x_as1(
void)
262 #ifdef CONFIG_PPC_EARLY_DEBUG_40x
263 static void udbg_40x_real_flush(
void)
271 static void udbg_40x_real_putc(
char c)
275 udbg_40x_real_putc(
'\r');
276 udbg_40x_real_flush();
281 static int udbg_40x_real_getc(
void)
291 void __init udbg_init_40x_realmode(
void)
294 CONFIG_PPC_EARLY_DEBUG_40x_PHYSADDR;
303 #ifdef CONFIG_PPC_EARLY_DEBUG_WSP
304 static void udbg_wsp_flush(
void)
312 static void udbg_wsp_putc(
char c)
322 static int udbg_wsp_getc(
void)
332 static int udbg_wsp_getc_poll(
void)
340 void __init udbg_init_wsp(
void)