Skip to contentSkip to conversation

POWERPC CPM: Minor cosmetic changes to udbg_putc

PATCH Applied Nye Liu 3 participants 3 messages Jun 27, 2008 – Jul 2, 2008 PowerPC

lore
Share & tools
lore

Nye Liu

author
#0 lore raw

PATCH 1/1 POWERPC CPM: Minor cosmetic changes to udbg_putc

From: Nye Liu <[email protected]>

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?

---

arch/powerpc/sysdev/cpm_common.c +2 -2
index cb7df2d..dcde743 100644
@@ -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
Signature · 7 lines
Nye Liu
[email protected]
(818) 772-6235x248
(818) 772-0576 fax

"Who would be stupid enough to quote a fictitious character?"
	-- Don Quixote
#1 lore raw
Quoted 3 lines · Nye Liu

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.

ACK

Quoted 1 line

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

D'oh, that was a debugging leftover that I missed when cleaning things up. Just remove it.

-Scott

Applied
#2 lore raw
In reply to Nye Liu
Quoted 11 lines · Nye Liu

From: Nye Liu <[email protected]>

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?

---

Applied. I removed the "\n" per Scott's feedback.

- k