cobalt: group UART definition into header
PATCH 1/1 cobalt: group UART definition into header
This patch groups the UART base address definition into the cobalt.h header file making it easier to reuse this code.
---
arch/mips/cobalt/console.c +1 -1
@@ -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) {
arch/mips/cobalt/serial.c +3 -3
@@ -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, }, {}, };
include/asm-mips/mach-cobalt/cobalt.h +2 -0
@@ -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 */
Yoichi Yuasa
NAKHi,
Quoted 48 lines · On Thu, 21 Aug 2008 13:03:44 +0200 Florian Fainelli <[email protected]> wrote:
This patch groups the UART base address definition into the
cobalt.hheader file making it easier to reuse this code.Signed-off-by Florian Fainelli <[email protected]>---
arch/mips/cobalt/console.c +1
-1@@ -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) {arch/mips/cobalt/serial.c +3
-3@@ -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, }, {}, };include/asm-mips/mach-cobalt/cobalt.h +0
-0
include/asm-mips/mach-cobalt/cobalt.h extern int cobalt_board_id; · line 23
Quoted 5 lines
include/asm-mips/mach-cobalt/cobalt.h +2
-0@@ -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
Hi,
Le Thursday 21 August 2008 15:45:52 Yoichi Yuasa, vous avez écrit :
Quoted 4 lines
NAK
This value is only used in
serial.c.
Please define inserial.c.
console.c also uses it, which was the rationale for my patch.
Quoted 10 lines · On Thu, 21 Aug 2008 15:55:12 +0200 Florian Fainelli <[email protected]> wrote:
Hi,
Le Thursday 21 August 2008 15:45:52 Yoichi Yuasa, vous avez écrit :
Quoted 4 lines
NAK
This value is only used in
serial.c.
Please define inserial.c.
console.calso uses it, which was the rationale for my patch.
Sorry, it's my fault.
Yoichi