powerpc/powermac: Use sane default baudrate for SCC debugging

Previous thread: powerpc: Make core id information available to userspace by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:10 am. (1 message)

Next thread: powerpc/mm: Implement _PAGE_SPECIAL & pte_special() for 64-bit by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:10 am. (1 message)
From: Linux Kernel Mailing List
Date: Monday, July 28, 2008 - 10:10 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f023bf...
Commit:     f023bf0f91f1f1b926ec8f5cf0ee24be134bf024
Parent:     83ac6a1ed40bfbe185cf2bac5505d8d97aad8b1d
Author:     Benjamin Herrenschmidt <benh@kernel.crashing.org>
AuthorDate: Mon Jul 28 12:06:19 2008 +1000
Committer:  Benjamin Herrenschmidt <benh@kernel.crashing.org>
CommitDate: Mon Jul 28 16:30:52 2008 +1000

    powerpc/powermac: Use sane default baudrate for SCC debugging
    
    When using the "sccdbg" option to route early kernel messages and
    xmon to the SCC serial port on PowerMacs, when this wasn't the
    configured output port of Open Firmware, we initialize the baudrate
    to 57600bps. This isn't a very good default on some powermacs where
    both the FW and pmac_zilog will default to 38400. This fixes it to
    use the same logic as pmac_zilog to pick a default speed.
    
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/platforms/powermac/udbg_scc.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/udbg_scc.c b/arch/powerpc/platforms/powermac/udbg_scc.c
index 47de4d3..572771f 100644
--- a/arch/powerpc/platforms/powermac/udbg_scc.c
+++ b/arch/powerpc/platforms/powermac/udbg_scc.c
@@ -125,13 +125,23 @@ void udbg_scc_init(int force_scc)
 	out_8(sccc, 0xc0);
 
 	/* If SCC was the OF output port, read the BRG value, else
-	 * Setup for 57600 8N1
+	 * Setup for 38400 or 57600 8N1 depending on the machine
 	 */
 	if (ch_def != NULL) {
 		out_8(sccc, 13);
 		scc_inittab[1] = in_8(sccc);
 		out_8(sccc, 12);
 		scc_inittab[3] = in_8(sccc);
+	} else if (machine_is_compatible("RackMac1,1")
+		   || machine_is_compatible("RackMac1,2")
+		   || machine_is_compatible("MacRISC4")) {
+		/* Xserves and G5s default to 57600 */
+		scc_inittab[1] = 0;
+		scc_inittab[3] = 0;
+	} else {
+		/* Others default to 38400 ...
Previous thread: powerpc: Make core id information available to userspace by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:10 am. (1 message)

Next thread: powerpc/mm: Implement _PAGE_SPECIAL & pte_special() for 64-bit by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:10 am. (1 message)