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@xxxxxxxxxxx> --- 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 */