* [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* Re: [PATCH] cobalt: group UART definition into header
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
0 siblings, 1 reply; 4+ messages in thread
From: Yoichi Yuasa @ 2008-08-21 13:45 UTC (permalink / raw)
To: Florian Fainelli; +Cc: tripeaks, linux-mips, ralf
Hi,
On Thu, 21 Aug 2008 13:03:44 +0200
Florian Fainelli <florian@openwrt.org> wrote:
> 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
> +
NAK
This value is only used in serial.c.
Please define in serial.c.
Yoichi
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] cobalt: group UART definition into header
2008-08-21 13:45 ` Yoichi Yuasa
@ 2008-08-21 13:55 ` Florian Fainelli
2008-08-21 14:16 ` Yoichi Yuasa
0 siblings, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2008-08-21 13:55 UTC (permalink / raw)
To: Yoichi Yuasa; +Cc: linux-mips, ralf
[-- Attachment #1: Type: text/plain, Size: 221 bytes --]
Hi,
Le Thursday 21 August 2008 15:45:52 Yoichi Yuasa, vous avez écrit :
> NAK
>
> This value is only used in serial.c.
> Please define in serial.c.
console.c also uses it, which was the rationale for my patch.
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cobalt: group UART definition into header
2008-08-21 13:55 ` Florian Fainelli
@ 2008-08-21 14:16 ` Yoichi Yuasa
0 siblings, 0 replies; 4+ messages in thread
From: Yoichi Yuasa @ 2008-08-21 14:16 UTC (permalink / raw)
To: Florian Fainelli; +Cc: yoichi_yuasa, linux-mips, ralf
On Thu, 21 Aug 2008 15:55:12 +0200
Florian Fainelli <florian@openwrt.org> wrote:
> Hi,
>
> Le Thursday 21 August 2008 15:45:52 Yoichi Yuasa, vous avez écrit :
> > NAK
> >
> > This value is only used in serial.c.
> > Please define in serial.c.
>
> console.c also uses it, which was the rationale for my patch.
>
Sorry, it's my fault.
Yoichi
^ permalink raw reply [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