forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[POWERPC] Add early debug console for CPM serial ports.
This code assumes that the ports have been previously set up, with buffers in DPRAM. Signed-off-by: Scott Wood <scottwood@freescale.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
- Loading branch information
Showing
8 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ config FADS | |
|
||
config CPM1 | ||
bool | ||
select CPM | ||
|
||
choice | ||
prompt "8xx Machine Type" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Common CPM code | ||
* | ||
* Author: Scott Wood <scottwood@freescale.com> | ||
* | ||
* Copyright 2007 Freescale Semiconductor, Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of version 2 of the GNU General Public License as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#include <linux/init.h> | ||
#include <asm/udbg.h> | ||
#include <asm/io.h> | ||
#include <asm/system.h> | ||
#include <mm/mmu_decl.h> | ||
|
||
#ifdef CONFIG_PPC_EARLY_DEBUG_CPM | ||
static u32 __iomem *cpm_udbg_txdesc = | ||
(u32 __iomem __force *)CONFIG_PPC_EARLY_DEBUG_CPM_ADDR; | ||
|
||
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'); | ||
|
||
while (in_be32(&cpm_udbg_txdesc[0]) & 0x80000000) | ||
; | ||
|
||
out_8(txbuf, c); | ||
out_be32(&cpm_udbg_txdesc[0], 0xa0000001); | ||
} | ||
|
||
void __init udbg_init_cpm(void) | ||
{ | ||
if (cpm_udbg_txdesc) { | ||
#ifdef CONFIG_CPM2 | ||
setbat(1, 0xf0000000, 0xf0000000, 1024*1024, _PAGE_IO); | ||
#endif | ||
udbg_putc = udbg_putc_cpm; | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters