Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38486
b: refs/heads/master
c: 2ec6ef1
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Oct 4, 2006
1 parent eb2479b commit 37bd491
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 54c9941288e86fad983e307e540808e155b16b34
refs/heads/master: 2ec6ef1034632c67896955d52bf8efb99195b742
14 changes: 12 additions & 2 deletions trunk/arch/powerpc/platforms/powermac/udbg_scc.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ void udbg_scc_init(int force_scc)
pmac_call_feature(PMAC_FTR_SCC_ENABLE, ch,
PMAC_SCC_ASYNC | PMAC_SCC_FLAG_XMON, 1);


/* Setup for 57600 8N1 */
if (ch == ch_a)
addr += 0x20;
sccc = ioremap(addr & PAGE_MASK, PAGE_SIZE) ;
Expand All @@ -125,9 +123,21 @@ void udbg_scc_init(int force_scc)
x = in_8(sccc);
out_8(sccc, 0x09); /* reset A or B side */
out_8(sccc, 0xc0);

/* If SCC was the OF output port, read the BRG value, else
* Setup for 57600 8N1
*/
if (ch_def != NULL) {
out_8(sccc, 13);
scc_inittab[1] = in_8(sccc);
out_8(sccc, 12);
scc_inittab[3] = in_8(sccc);
}

for (i = 0; i < sizeof(scc_inittab); ++i)
out_8(sccc, scc_inittab[i]);


udbg_putc = udbg_scc_putc;
udbg_getc = udbg_scc_getc;
udbg_getc_poll = udbg_scc_getc_poll;
Expand Down

0 comments on commit 37bd491

Please sign in to comment.