diff options
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/sunhv.c | 35 | ||||
-rw-r--r-- | drivers/serial/sunsab.c | 12 | ||||
-rw-r--r-- | drivers/serial/sunsu.c | 4 | ||||
-rw-r--r-- | drivers/serial/sunzilog.c | 2 |
4 files changed, 27 insertions, 26 deletions
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c index f137804b3133..ba22e256c6f7 100644 --- a/drivers/serial/sunhv.c +++ b/drivers/serial/sunhv.c | |||
@@ -427,31 +427,32 @@ static int __init hv_console_compatible(char *buf, int len) | |||
427 | 427 | ||
428 | static unsigned int __init get_interrupt(void) | 428 | static unsigned int __init get_interrupt(void) |
429 | { | 429 | { |
430 | const char *cons_str = "console"; | 430 | struct device_node *dev_node; |
431 | const char *compat_str = "compatible"; | ||
432 | int node = prom_getchild(sun4v_vdev_root); | ||
433 | char buf[64]; | ||
434 | int err, len; | ||
435 | |||
436 | node = prom_searchsiblings(node, cons_str); | ||
437 | if (!node) | ||
438 | return 0; | ||
439 | 431 | ||
440 | len = prom_getproplen(node, compat_str); | 432 | dev_node = sun4v_vdev_root->child; |
441 | if (len == 0 || len == -1) | 433 | while (dev_node != NULL) { |
442 | return 0; | 434 | struct property *prop; |
443 | 435 | ||
444 | err = prom_getproperty(node, compat_str, buf, 64); | 436 | if (strcmp(dev_node->name, "console")) |
445 | if (err == -1) | 437 | goto next_sibling; |
446 | return 0; | 438 | |
439 | prop = of_find_property(dev_node, "compatible", NULL); | ||
440 | if (!prop) | ||
441 | goto next_sibling; | ||
447 | 442 | ||
448 | if (!hv_console_compatible(buf, len)) | 443 | if (hv_console_compatible(prop->value, prop->length)) |
444 | break; | ||
445 | |||
446 | next_sibling: | ||
447 | dev_node = dev_node->sibling; | ||
448 | } | ||
449 | if (!dev_node) | ||
449 | return 0; | 450 | return 0; |
450 | 451 | ||
451 | /* Ok, the this is the OBP node for the sun4v hypervisor | 452 | /* Ok, the this is the OBP node for the sun4v hypervisor |
452 | * console device. Decode the interrupt. | 453 | * console device. Decode the interrupt. |
453 | */ | 454 | */ |
454 | return sun4v_vdev_device_interrupt(node); | 455 | return sun4v_vdev_device_interrupt(dev_node); |
455 | } | 456 | } |
456 | 457 | ||
457 | static int __init sunhv_init(void) | 458 | static int __init sunhv_init(void) |
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index bfbe9dc90cca..e4c0fd2d6a9d 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
@@ -984,19 +984,19 @@ static void __init for_each_sab_edev(void (*callback)(struct linux_ebus_device * | |||
984 | 984 | ||
985 | for_each_ebus(ebus) { | 985 | for_each_ebus(ebus) { |
986 | for_each_ebusdev(edev, ebus) { | 986 | for_each_ebusdev(edev, ebus) { |
987 | if (!strcmp(edev->prom_name, "se")) { | 987 | if (!strcmp(edev->prom_node->name, "se")) { |
988 | callback(edev, arg); | 988 | callback(edev, arg); |
989 | continue; | 989 | continue; |
990 | } else if (!strcmp(edev->prom_name, "serial")) { | 990 | } else if (!strcmp(edev->prom_node->name, "serial")) { |
991 | char compat[32]; | 991 | char *compat; |
992 | int clen; | 992 | int clen; |
993 | 993 | ||
994 | /* On RIO this can be an SE, check it. We could | 994 | /* On RIO this can be an SE, check it. We could |
995 | * just check ebus->is_rio, but this is more portable. | 995 | * just check ebus->is_rio, but this is more portable. |
996 | */ | 996 | */ |
997 | clen = prom_getproperty(edev->prom_node, "compatible", | 997 | compat = of_get_property(edev->prom_node, |
998 | compat, sizeof(compat)); | 998 | "compatible", &clen); |
999 | if (clen > 0) { | 999 | if (compat && clen > 0) { |
1000 | if (strncmp(compat, "sab82532", 8) == 0) { | 1000 | if (strncmp(compat, "sab82532", 8) == 0) { |
1001 | callback(edev, arg); | 1001 | callback(edev, arg); |
1002 | continue; | 1002 | continue; |
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 4cdb610cdd37..0268b307c01e 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -1053,7 +1053,7 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up) | |||
1053 | */ | 1053 | */ |
1054 | for_each_ebus(ebus) { | 1054 | for_each_ebus(ebus) { |
1055 | for_each_ebusdev(dev, ebus) { | 1055 | for_each_ebusdev(dev, ebus) { |
1056 | if (dev->prom_node == up->port_node) { | 1056 | if (dev->prom_node->node == up->port_node) { |
1057 | /* | 1057 | /* |
1058 | * The EBus is broken on sparc; it delivers | 1058 | * The EBus is broken on sparc; it delivers |
1059 | * virtual addresses in resources. Oh well... | 1059 | * virtual addresses in resources. Oh well... |
@@ -1073,7 +1073,7 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up) | |||
1073 | #ifdef CONFIG_SPARC64 | 1073 | #ifdef CONFIG_SPARC64 |
1074 | for_each_isa(isa_br) { | 1074 | for_each_isa(isa_br) { |
1075 | for_each_isadev(isa_dev, isa_br) { | 1075 | for_each_isadev(isa_dev, isa_br) { |
1076 | if (isa_dev->prom_node == up->port_node) { | 1076 | if (isa_dev->prom_node->node == up->port_node) { |
1077 | /* Same on sparc64. Cool architecure... */ | 1077 | /* Same on sparc64. Cool architecure... */ |
1078 | up->port.membase = (char *) isa_dev->resource.start; | 1078 | up->port.membase = (char *) isa_dev->resource.start; |
1079 | up->port.mapbase = isa_dev->resource.start; | 1079 | up->port.mapbase = isa_dev->resource.start; |
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index 5b6569728a9c..76c9bac9271f 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c | |||
@@ -1106,7 +1106,7 @@ static struct zilog_layout __iomem * __init get_zs_sun4u(int chip, int zsnode) | |||
1106 | + FHC_UREGS_ICLR; | 1106 | + FHC_UREGS_ICLR; |
1107 | imap = central_bus->child->fhc_regs.uregs | 1107 | imap = central_bus->child->fhc_regs.uregs |
1108 | + FHC_UREGS_IMAP; | 1108 | + FHC_UREGS_IMAP; |
1109 | zilog_irq = build_irq(12, 0, iclr, imap); | 1109 | zilog_irq = build_irq(0, iclr, imap); |
1110 | } else { | 1110 | } else { |
1111 | err = prom_getproperty(zsnode, "interrupts", | 1111 | err = prom_getproperty(zsnode, "interrupts", |
1112 | (char *) &sun4u_ino, | 1112 | (char *) &sun4u_ino, |