linux-mips
[Top] [All Lists]

[PATCH][5/9][MIPS] move Cobalt UART base address definition.

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH][5/9][MIPS] move Cobalt UART base address definition.
From: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Date: Fri, 14 Sep 2007 17:14:41 +0900
Cc: yoichi_yuasa@tripeaks.co.jp, linux-mips <linux-mips@linux-mips.org>
In-reply-to: <20070914164228.333da5d9.yoichi_yuasa@tripeaks.co.jp>
Organization: TriPeaks Corporation
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20070914164228.333da5d9.yoichi_yuasa@tripeaks.co.jp>
Sender: linux-mips-bounce@linux-mips.org
Move Cobalt UART base address 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-08-24 11:14:29.808868500 
+0900
+++ mips/arch/mips/cobalt/console.c     2007-08-24 11:18:24.867558750 +0900
@@ -4,13 +4,14 @@
 #include <linux/serial_reg.h>
 
 #include <asm/addrspace.h>
+#include <asm/io.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-08-24 
11:19:03.585978500 +0900
+++ mips/include/asm-mips/mach-cobalt/cobalt.h  2007-08-24 11:18:24.891560250 
+0900
@@ -29,6 +29,4 @@ extern int cobalt_board_id;
 # define COBALT_LED_POWER_OFF  (1 << 3)        /* RaQ */
 # define COBALT_LED_RESET      0x0f
 
-#define COBALT_UART            ((volatile unsigned char *) 
CKSEG1ADDR(0x1c800000))
-
 #endif /* __ASM_COBALT_H */

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH][5/9][MIPS] move Cobalt UART base address definition., Yoichi Yuasa <=