diff options
Diffstat (limited to 'drivers/serial/apbuart.c')
-rw-r--r-- | drivers/serial/apbuart.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c index a30bb962..095a5d5 100644 --- a/drivers/serial/apbuart.c +++ b/drivers/serial/apbuart.c @@ -26,6 +26,7 @@ #include <linux/of.h> #include <linux/of_device.h> #include <linux/of_platform.h> +#include <linux/of_irq.h> #include <linux/platform_device.h> #include <linux/io.h> #include <linux/serial_core.h> @@ -574,13 +575,15 @@ static int __devinit apbuart_probe(struct platform_device *op, printk(KERN_INFO "grlib-apbuart at 0x%llx, irq %d\n", (unsigned long long) port->mapbase, port->irq); return 0; - } static struct of_device_id __initdata apbuart_match[] = { { .name = "GAISLER_APBUART", }, + { + .name = "01_00c", + }, {}, }; @@ -613,15 +616,20 @@ static int grlib_apbuart_configure(void) freq_khz = *prop; for_each_matching_node(np, apbuart_match) { - const int *irqs = of_get_property(np, "interrupts", NULL); + const int *irqs, *ampopts; const struct amba_prom_registers *regs; struct uart_port *port; unsigned long addr; + ampopts = of_get_property(np, "ampopts", NULL); + if (ampopts && (*ampopts == 0)) + continue; /* Ignore if used by another OS instance */ + + irqs = of_get_property(np, "interrupts", NULL); regs = of_get_property(np, "reg", NULL); if (!irqs || !regs) - return -ENODEV; + continue; grlib_apbuart_nodes[line] = np; |