linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] POWERPC CPM: Minor cosmetic changes to udbg_putc
@ 2008-06-27 20:01 Nye Liu
  2008-06-27 20:11 ` Scott Wood
  2008-07-02  7:37 ` Kumar Gala
  0 siblings, 2 replies; 3+ messages in thread
From: Nye Liu @ 2008-06-27 20:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: scottwood, linuxppc-dev

From: Nye Liu <nyet@mrv.com>

udbg_putc is a *function pointer* that is initialized during
udbg_init_cpm. It might not be initialized properly when called from
udbg_putc_cpm(), so (recursively) call udbg_putc_cpm() directly.

Printing an "X" on initialization is ugly. How about a "\n" instead?

Signed-off-by: Nye Liu <nyet@mrv.com>

---

diff --git a/arch/powerpc/sysdev/cpm_common.c b/arch/powerpc/sysdev/cpm_common.c
index cb7df2d..dcde743 100644
--- a/arch/powerpc/sysdev/cpm_common.c
+++ b/arch/powerpc/sysdev/cpm_common.c
@@ -37,7 +37,7 @@ static void udbg_putc_cpm(char c)
 	u8 __iomem *txbuf = (u8 __iomem __force *)in_be32(&cpm_udbg_txdesc[1]);
 
 	if (c == '\n')
-		udbg_putc('\r');
+		udbg_putc_cpm('\r');
 
 	while (in_be32(&cpm_udbg_txdesc[0]) & 0x80000000)
 		;
@@ -53,7 +53,7 @@ void __init udbg_init_cpm(void)
 		setbat(1, 0xf0000000, 0xf0000000, 1024*1024, _PAGE_IO);
 #endif
 		udbg_putc = udbg_putc_cpm;
-		udbg_putc('X');
+		udbg_putc('\n');
 	}
 }
 #endif

-- 
Nye Liu
nliu@mrv.com
(818) 772-6235x248
(818) 772-0576 fax

"Who would be stupid enough to quote a fictitious character?"
	-- Don Quixote

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-02  7:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-27 20:01 [PATCH] POWERPC CPM: Minor cosmetic changes to udbg_putc Nye Liu
2008-06-27 20:11 ` Scott Wood
2008-07-02  7:37 ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).