Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] cobalt: group UART definition into header
@ 2008-08-21 11:03 Florian Fainelli
  2008-08-21 13:45 ` Yoichi Yuasa
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2008-08-21 11:03 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf

This patch groups the UART base address definition into
the cobalt.h header file making it easier to reuse
this code.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/arch/mips/cobalt/console.c b/arch/mips/cobalt/console.c
index d1ba701..48e2094 100644
--- a/arch/mips/cobalt/console.c
+++ b/arch/mips/cobalt/console.c
@@ -6,7 +6,7 @@
 
 #include <cobalt.h>
 
-#define UART_BASE	((void __iomem *)CKSEG1ADDR(0x1c800000))
+#define UART_BASE	((void __iomem *)CKSEG1ADDR(COBALT_UART_ADDR))
 
 void prom_putchar(char c)
 {
diff --git a/arch/mips/cobalt/serial.c b/arch/mips/cobalt/serial.c
index 53b8d0d..d12202e 100644
--- a/arch/mips/cobalt/serial.c
+++ b/arch/mips/cobalt/serial.c
@@ -28,8 +28,8 @@
 
 static struct resource cobalt_uart_resource[] __initdata = {
 	{
-		.start	= 0x1c800000,
-		.end	= 0x1c800007,
+		.start	= COBALT_UART_ADDR,
+		.end	= COBALT_UART_ADDR + 0x7,
 		.flags	= IORESOURCE_MEM,
 	},
 	{
@@ -45,7 +45,7 @@ static struct plat_serial8250_port cobalt_serial8250_port[] = {
 		.uartclk	= 18432000,
 		.iotype		= UPIO_MEM,
 		.flags		= UPF_IOREMAP | UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
-		.mapbase	= 0x1c800000,
+		.mapbase	= COBALT_UART_ADDR,
 	},
 	{},
 };
diff --git a/include/asm-mips/mach-cobalt/cobalt.h b/include/asm-mips/mach-cobalt/cobalt.h
index 5b9fce7..9bf9e94 100644
--- a/include/asm-mips/mach-cobalt/cobalt.h
+++ b/include/asm-mips/mach-cobalt/cobalt.h
@@ -19,4 +19,6 @@ extern int cobalt_board_id;
 #define COBALT_BRD_ID_QUBE2    0x5
 #define COBALT_BRD_ID_RAQ2     0x6
 
+#define COBALT_UART_ADDR	0x1c800000
+
 #endif /* __ASM_COBALT_H */

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-08-21 14:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-21 11:03 [PATCH] cobalt: group UART definition into header Florian Fainelli
2008-08-21 13:45 ` Yoichi Yuasa
2008-08-21 13:55   ` Florian Fainelli
2008-08-21 14:16     ` Yoichi Yuasa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox