From 8a8594a738e2e6abcfb9370629ed95035505668f Mon Sep 17 00:00:00 2001 From: Yoichi Yuasa Date: Mon, 8 Feb 2010 21:01:22 +0900 Subject: [PATCH] MIPS: Cobalt: Move to 8250/16550 serial early printk driver Signed-off-by: Yoichi Yuasa Cc: linux-mips Patchwork: https://patchwork.linux-mips.org/patch/948/ Signed-off-by: Ralf Baechle --- arch/mips/Kconfig | 1 + arch/mips/cobalt/Makefile | 1 - arch/mips/cobalt/console.c | 20 -------------------- arch/mips/cobalt/setup.c | 3 +++ 4 files changed, 4 insertions(+), 21 deletions(-) delete mode 100644 arch/mips/cobalt/console.c diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 0cff92315ac4..e70cf31c6ba3 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -146,6 +146,7 @@ config MIPS_COBALT select CSRC_R4K select CEVT_GT641XX select DMA_NONCOHERENT + select EARLY_PRINTK_8250 if EARLY_PRINTK select HW_HAS_PCI select I8253 select I8259 diff --git a/arch/mips/cobalt/Makefile b/arch/mips/cobalt/Makefile index 61a334ac43ac..558e94977942 100644 --- a/arch/mips/cobalt/Makefile +++ b/arch/mips/cobalt/Makefile @@ -5,5 +5,4 @@ obj-y := buttons.o irq.o lcd.o led.o reset.o rtc.o serial.o setup.o time.o obj-$(CONFIG_PCI) += pci.o -obj-$(CONFIG_EARLY_PRINTK) += console.o obj-$(CONFIG_MTD_PHYSMAP) += mtd.o diff --git a/arch/mips/cobalt/console.c b/arch/mips/cobalt/console.c deleted file mode 100644 index d1ba701c9dd1..000000000000 --- a/arch/mips/cobalt/console.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * (C) P. Horton 2006 - */ -#include -#include - -#include - -#define UART_BASE ((void __iomem *)CKSEG1ADDR(0x1c800000)) - -void prom_putchar(char c) -{ - if (cobalt_board_id <= COBALT_BRD_ID_QUBE1) - return; - - while (!(readb(UART_BASE + UART_LSR) & UART_LSR_THRE)) - ; - - writeb(c, UART_BASE + UART_TX); -} diff --git a/arch/mips/cobalt/setup.c b/arch/mips/cobalt/setup.c index ec3b2c417f7c..9a8c2fe8d334 100644 --- a/arch/mips/cobalt/setup.c +++ b/arch/mips/cobalt/setup.c @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -112,6 +113,8 @@ void __init prom_init(void) } add_memory_region(0x0, memsz, BOOT_MEM_RAM); + + setup_8250_early_printk_port(CKSEG1ADDR(0x1c800000), 0, 0); } void __init prom_free_prom_memory(void)