aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-ixp2000/core.c55
-rw-r--r--arch/arm/mach-ixp2000/enp2611.c1
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x00.c1
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x01.c1
-rw-r--r--include/asm-arm/arch-ixp2000/platform.h1
5 files changed, 44 insertions, 15 deletions
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c
index 4b9d841e04c1..45b18658499f 100644
--- a/arch/arm/mach-ixp2000/core.c
+++ b/arch/arm/mach-ixp2000/core.c
@@ -23,7 +23,7 @@
23#include <linux/serial.h> 23#include <linux/serial.h>
24#include <linux/tty.h> 24#include <linux/tty.h>
25#include <linux/bitops.h> 25#include <linux/bitops.h>
26#include <linux/serial_core.h> 26#include <linux/serial_8250.h>
27#include <linux/mm.h> 27#include <linux/mm.h>
28 28
29#include <asm/types.h> 29#include <asm/types.h>
@@ -125,19 +125,6 @@ static struct map_desc ixp2000_io_desc[] __initdata = {
125 } 125 }
126}; 126};
127 127
128static struct uart_port ixp2000_serial_port = {
129 .membase = (char *)(IXP2000_UART_VIRT_BASE + 3),
130 .mapbase = IXP2000_UART_PHYS_BASE + 3,
131 .irq = IRQ_IXP2000_UART,
132 .flags = UPF_SKIP_TEST,
133 .iotype = UPIO_MEM,
134 .regshift = 2,
135 .uartclk = 50000000,
136 .line = 0,
137 .type = PORT_XSCALE,
138 .fifosize = 16
139};
140
141void __init ixp2000_map_io(void) 128void __init ixp2000_map_io(void)
142{ 129{
143 extern unsigned int processor_id; 130 extern unsigned int processor_id;
@@ -157,12 +144,50 @@ void __init ixp2000_map_io(void)
157 } 144 }
158 145
159 iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc)); 146 iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc));
160 early_serial_setup(&ixp2000_serial_port);
161 147
162 /* Set slowport to 8-bit mode. */ 148 /* Set slowport to 8-bit mode. */
163 ixp2000_reg_write(IXP2000_SLOWPORT_FRM, 1); 149 ixp2000_reg_write(IXP2000_SLOWPORT_FRM, 1);
164} 150}
165 151
152
153/*************************************************************************
154 * Serial port support for IXP2000
155 *************************************************************************/
156static struct plat_serial8250_port ixp2000_serial_port[] = {
157 {
158 .mapbase = IXP2000_UART_PHYS_BASE,
159 .membase = (char *)(IXP2000_UART_VIRT_BASE + 3),
160 .irq = IRQ_IXP2000_UART,
161 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
162 .iotype = UPIO_MEM,
163 .regshift = 2,
164 .uartclk = 50000000,
165 },
166 { },
167};
168
169static struct resource ixp2000_uart_resource = {
170 .start = IXP2000_UART_PHYS_BASE,
171 .end = IXP2000_UART_PHYS_BASE + 0xffff,
172 .flags = IORESOURCE_MEM,
173};
174
175static struct platform_device ixp2000_serial_device = {
176 .name = "serial8250",
177 .id = 0,
178 .dev = {
179 .platform_data = ixp2000_serial_port,
180 },
181 .num_resources = 1,
182 .resource = &ixp2000_uart_resource,
183};
184
185void __init ixp2000_uart_init(void)
186{
187 platform_device_register(&ixp2000_serial_device);
188}
189
190
166/************************************************************************* 191/*************************************************************************
167 * Timer-tick functions for IXP2000 192 * Timer-tick functions for IXP2000
168 *************************************************************************/ 193 *************************************************************************/
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c
index b7ebf3898fc5..9aa54de44740 100644
--- a/arch/arm/mach-ixp2000/enp2611.c
+++ b/arch/arm/mach-ixp2000/enp2611.c
@@ -219,6 +219,7 @@ static struct platform_device *enp2611_devices[] __initdata = {
219static void __init enp2611_init_machine(void) 219static void __init enp2611_init_machine(void)
220{ 220{
221 platform_add_devices(enp2611_devices, ARRAY_SIZE(enp2611_devices)); 221 platform_add_devices(enp2611_devices, ARRAY_SIZE(enp2611_devices));
222 ixp2000_uart_init();
222} 223}
223 224
224 225
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c
index 5e4380747b53..a43369ad876c 100644
--- a/arch/arm/mach-ixp2000/ixdp2x00.c
+++ b/arch/arm/mach-ixp2000/ixdp2x00.c
@@ -303,5 +303,6 @@ void __init ixdp2x00_init_machine(void)
303 gpio_line_config(IXDP2X00_GPIO_I2C_ENABLE, GPIO_OUT); 303 gpio_line_config(IXDP2X00_GPIO_I2C_ENABLE, GPIO_OUT);
304 304
305 platform_add_devices(ixdp2x00_devices, ARRAY_SIZE(ixdp2x00_devices)); 305 platform_add_devices(ixdp2x00_devices, ARRAY_SIZE(ixdp2x00_devices));
306 ixp2000_uart_init();
306} 307}
307 308
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c
index c73588743ee1..43447dad1657 100644
--- a/arch/arm/mach-ixp2000/ixdp2x01.c
+++ b/arch/arm/mach-ixp2000/ixdp2x01.c
@@ -370,6 +370,7 @@ static void __init ixdp2x01_init_machine(void)
370 ((*IXDP2X01_CPLD_FLASH_REG & IXDP2X01_CPLD_FLASH_BANK_MASK) + 1); 370 ((*IXDP2X01_CPLD_FLASH_REG & IXDP2X01_CPLD_FLASH_BANK_MASK) + 1);
371 371
372 platform_add_devices(ixdp2x01_devices, ARRAY_SIZE(ixdp2x01_devices)); 372 platform_add_devices(ixdp2x01_devices, ARRAY_SIZE(ixdp2x01_devices));
373 ixp2000_uart_init();
373} 374}
374 375
375 376
diff --git a/include/asm-arm/arch-ixp2000/platform.h b/include/asm-arm/arch-ixp2000/platform.h
index 52ded516ea5c..c0caf3e3e6fd 100644
--- a/include/asm-arm/arch-ixp2000/platform.h
+++ b/include/asm-arm/arch-ixp2000/platform.h
@@ -115,6 +115,7 @@ static inline unsigned int ixp2000_is_pcimaster(void)
115} 115}
116 116
117void ixp2000_map_io(void); 117void ixp2000_map_io(void);
118void ixp2000_uart_init(void);
118void ixp2000_init_irq(void); 119void ixp2000_init_irq(void);
119void ixp2000_init_time(unsigned long); 120void ixp2000_init_time(unsigned long);
120unsigned long ixp2000_gettimeoffset(void); 121unsigned long ixp2000_gettimeoffset(void);