[PATCH] ppc64: Make udbg_init_uart set the ppc_md udbg methods.

Anton Blanchard anton at samba.org
Tue Sep 6 11:55:38 EST 2005


From: Milton Miller <miltonm at bga.com>

make udbg_init_uart set the ppc_md udbg methods.

Signed-off-by: Milton Miller <miltonm at bga.com>
Signed-off-by: Anton Blanchard <anton at samba.org>

Index: build/arch/ppc64/kernel/maple_setup.c
===================================================================
--- build.orig/arch/ppc64/kernel/maple_setup.c	2005-09-05 20:29:29.000000000 +1000
+++ build/arch/ppc64/kernel/maple_setup.c	2005-09-05 20:29:39.000000000 +1000
@@ -207,9 +207,6 @@
 		comport = (void *)ioremap(physport, 16);
 		udbg_init_uart(comport, default_speed);
 
-		ppc_md.udbg_putc = udbg_putc;
-		ppc_md.udbg_getc = udbg_getc;
-		ppc_md.udbg_getc_poll = udbg_getc_poll;
 		DBG("Hello World !\n");
 	}
 
Index: build/arch/ppc64/kernel/pSeries_setup.c
===================================================================
--- build.orig/arch/ppc64/kernel/pSeries_setup.c	2005-09-05 20:29:29.000000000 +1000
+++ build/arch/ppc64/kernel/pSeries_setup.c	2005-09-05 20:29:39.000000000 +1000
@@ -397,9 +397,6 @@
 		comport = (void *)ioremap(physport, 16);
 		udbg_init_uart(comport, default_speed);
 
-		ppc_md.udbg_putc = udbg_putc;
-		ppc_md.udbg_getc = udbg_getc;
-		ppc_md.udbg_getc_poll = udbg_getc_poll;
 		DBG("Hello World !\n");
 	}
 
Index: build/arch/ppc64/kernel/udbg.c
===================================================================
--- build.orig/arch/ppc64/kernel/udbg.c	2005-09-05 20:29:38.000000000 +1000
+++ build/arch/ppc64/kernel/udbg.c	2005-09-05 20:29:39.000000000 +1000
@@ -70,6 +70,9 @@
 		out_8(&udbg_comport->lcr, 0x03);	/* 8 data, 1 stop, no parity */
 		out_8(&udbg_comport->mcr, 0x03);	/* RTS/DTR */
 		out_8(&udbg_comport->fcr ,0x07);	/* Clear & enable FIFOs */
+		ppc_md.udbg_putc = udbg_putc;		/* set access methods */
+		ppc_md.udbg_getc = udbg_getc;
+		ppc_md.udbg_getc_poll = udbg_getc_poll;
 	}
 }
 



More information about the Linuxppc64-dev mailing list