linux-mips
[Top] [All Lists]

[PATCH][2/4] move Cobalt UART base definition to arch/mips/cobalt/consol

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH][2/4] move Cobalt UART base definition to arch/mips/cobalt/console.c
From: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Date: Tue, 2 Oct 2007 23:13:17 +0900
Cc: yoichi_yuasa@tripeaks.co.jp, linux-mips <linux-mips@linux-mips.org>
In-reply-to: <20071002225441.63d935eb.yoichi_yuasa@tripeaks.co.jp>
Organization: TriPeaks Corporation
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20071002225441.63d935eb.yoichi_yuasa@tripeaks.co.jp>
Sender: linux-mips-bounce@linux-mips.org
Move Cobalt UART base definition to arch/mips/cobalt/console.c.
It's only used in arch/mips/cobalt/console.c.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/cobalt/console.c 
mips/arch/mips/cobalt/console.c
--- mips-orig/arch/mips/cobalt/console.c        2007-09-30 21:21:39.610319250 
+0900
+++ mips/arch/mips/cobalt/console.c     2007-09-30 21:26:10.135226000 +0900
@@ -1,16 +1,15 @@
 /*
  * (C) P. Horton 2006
  */
+#include <linux/io.h>
 #include <linux/serial_reg.h>
 
-#include <asm/addrspace.h>
-
-#include <cobalt.h>
+#define UART_BASE      ((void __iomem *)CKSEG1ADDR(0x1c800000))
 
 void prom_putchar(char c)
 {
-       while(!(COBALT_UART[UART_LSR] & UART_LSR_THRE))
+       while(!(readb(UART_BASE + UART_LSR) & UART_LSR_THRE))
                ;
 
-       COBALT_UART[UART_TX] = c;
+       writeb(c, UART_BASE + UART_TX);
 }
diff -pruN -X mips/Documentation/dontdiff 
mips-orig/include/asm-mips/mach-cobalt/cobalt.h 
mips/include/asm-mips/mach-cobalt/cobalt.h
--- mips-orig/include/asm-mips/mach-cobalt/cobalt.h     2007-09-30 
21:25:01.586942000 +0900
+++ mips/include/asm-mips/mach-cobalt/cobalt.h  2007-09-30 21:21:46.170729250 
+0900
@@ -39,6 +39,4 @@ extern int cobalt_board_id;
 # define COBALT_KEY_SELECT     (1 << 7)
 # define COBALT_KEY_MASK       0xfe
 
-#define COBALT_UART            ((volatile unsigned char *) 
CKSEG1ADDR(0x1c800000))
-
 #endif /* __ASM_COBALT_H */

<Prev in Thread] Current Thread [Next in Thread>