linux/debian/patches/bugfix/arm/n2100-serial-irq.patch

66 lines
1.6 KiB
Diff

Allow USB and serial to co-exist on N2100 by using a platform device for
serial and IRQ 0 for serial.
--- a/arch/arm/mach-iop3xx/iop321-setup.c~ 2006-10-26 22:06:04.000000000 +0000
+++ b/arch/arm/mach-iop3xx/iop321-setup.c 2006-10-27 07:33:24.663719957 +0000
@@ -131,7 +131,7 @@
void __init iop321_map_io(void)
{
iotable_init(iop321_std_desc, ARRAY_SIZE(iop321_std_desc));
- if (!machine_is_glantank())
+ if (!machine_is_glantank() && !machine_is_n2100())
early_serial_setup(&iop321_serial_ports[0]);
}
--- a/arch/arm/mach-iop3xx/n2100.c~ 2006-10-26 22:23:24.000000000 +0000
+++ b/arch/arm/mach-iop3xx/n2100.c 2006-10-27 07:32:15.130694184 +0000
@@ -170,6 +170,40 @@
/*
+ * N2100 machine initialisation.
+ */
+
+static struct plat_serial8250_port n2100_serial_port[] = {
+ {
+ .mapbase = N2100_UART,
+ .membase = (char *)N2100_UART,
+ .irq = 0,
+ .flags = UPF_SKIP_TEST,
+ .iotype = UPIO_MEM,
+ .regshift = 0,
+ .uartclk = 1843200,
+ },
+ { },
+};
+
+static struct resource n2100_uart_resource = {
+ .start = N2100_UART,
+ .end = N2100_UART + 7,
+ .flags = IORESOURCE_MEM,
+};
+
+static struct platform_device n2100_serial_device = {
+ .name = "serial8250",
+ .id = PLAT8250_DEV_PLATFORM,
+ .dev = {
+ .platform_data = n2100_serial_port,
+ },
+ .num_resources = 1,
+ .resource = &n2100_uart_resource,
+};
+
+
+/*
* Pull PCA9532 GPIO #8 low to power off the machine.
*/
static void n2100_power_off(void)
@@ -212,6 +246,7 @@
static void __init n2100_init_machine(void)
{
platform_device_register(&iop32x_i2c_0_controller);
+ platform_device_register(&n2100_serial_device);
pm_power_off = n2100_power_off;