diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2011-01-03 20:41:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-04 14:16:38 -0500 |
commit | f28f3313aa97dcb46954f90f596d75f8faf4626e (patch) | |
tree | b8914d5d4ad6486e063001138882712c0cb6724c /drivers/serial | |
parent | d89ddf0da8f0a140d4dc2e2dbc594fb278e33db5 (diff) |
Added support for ampopts in APBUART driver. Used in AMP systems.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/apbuart.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c index 7160345a184e..767ce9e396c5 100644 --- a/drivers/serial/apbuart.c +++ b/drivers/serial/apbuart.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/of.h> | 26 | #include <linux/of.h> |
27 | #include <linux/of_device.h> | 27 | #include <linux/of_device.h> |
28 | #include <linux/of_platform.h> | 28 | #include <linux/of_platform.h> |
29 | #include <linux/of_irq.h> | ||
29 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
30 | #include <linux/io.h> | 31 | #include <linux/io.h> |
31 | #include <linux/serial_core.h> | 32 | #include <linux/serial_core.h> |
@@ -573,7 +574,6 @@ static int __devinit apbuart_probe(struct platform_device *op, | |||
573 | printk(KERN_INFO "grlib-apbuart at 0x%llx, irq %d\n", | 574 | printk(KERN_INFO "grlib-apbuart at 0x%llx, irq %d\n", |
574 | (unsigned long long) port->mapbase, port->irq); | 575 | (unsigned long long) port->mapbase, port->irq); |
575 | return 0; | 576 | return 0; |
576 | |||
577 | } | 577 | } |
578 | 578 | ||
579 | static struct of_device_id __initdata apbuart_match[] = { | 579 | static struct of_device_id __initdata apbuart_match[] = { |
@@ -623,9 +623,12 @@ static void grlib_apbuart_configure(void) | |||
623 | int *vendor = (int *) of_get_property(np, "vendor", NULL); | 623 | int *vendor = (int *) of_get_property(np, "vendor", NULL); |
624 | int *device = (int *) of_get_property(np, "device", NULL); | 624 | int *device = (int *) of_get_property(np, "device", NULL); |
625 | int *irqs = (int *) of_get_property(np, "interrupts", NULL); | 625 | int *irqs = (int *) of_get_property(np, "interrupts", NULL); |
626 | int *ampopts = (int *) of_get_property(np, "ampopts", NULL); | ||
626 | regs = (struct amba_prom_registers *) | 627 | regs = (struct amba_prom_registers *) |
627 | of_get_property(np, "reg", NULL); | 628 | of_get_property(np, "reg", NULL); |
628 | 629 | ||
630 | if (ampopts && (*ampopts == 0)) | ||
631 | continue; /* Ignore if used by another OS instance */ | ||
629 | if (vendor) | 632 | if (vendor) |
630 | v = *vendor; | 633 | v = *vendor; |
631 | if (device) | 634 | if (device) |