| .. | .. |
|---|
| 34 | 34 | #include <linux/timer.h> |
|---|
| 35 | 35 | |
|---|
| 36 | 36 | #include <asm/io.h> |
|---|
| 37 | | -#include <asm/pgtable.h> |
|---|
| 38 | 37 | #include <asm/prom.h> |
|---|
| 39 | 38 | #include <asm/pci-bridge.h> |
|---|
| 40 | 39 | #include <asm/dma.h> |
|---|
| .. | .. |
|---|
| 280 | 279 | node = of_find_node_by_path(property); |
|---|
| 281 | 280 | if (!node) |
|---|
| 282 | 281 | return; |
|---|
| 283 | | - property = of_get_property(node, "device_type", NULL); |
|---|
| 284 | | - if (!property) |
|---|
| 285 | | - goto out_put; |
|---|
| 286 | | - if (strcmp(property, "serial")) |
|---|
| 282 | + if (!of_node_is_type(node, "serial")) |
|---|
| 287 | 283 | goto out_put; |
|---|
| 288 | 284 | /* |
|---|
| 289 | 285 | * The 9pin connector is either /failsafe |
|---|
| 290 | 286 | * or /pci@80000000/isa@C/serial@i2F8 |
|---|
| 291 | 287 | * The optional graphics card has also type 'serial' in VGA mode. |
|---|
| 292 | 288 | */ |
|---|
| 293 | | - property = of_get_property(node, "name", NULL); |
|---|
| 294 | | - if (!property) |
|---|
| 295 | | - goto out_put; |
|---|
| 296 | | - if (!strcmp(property, "failsafe") || !strcmp(property, "serial")) |
|---|
| 289 | + if (of_node_name_eq(node, "failsafe") || of_node_name_eq(node, "serial")) |
|---|
| 297 | 290 | add_preferred_console("ttyS", 0, NULL); |
|---|
| 298 | 291 | out_put: |
|---|
| 299 | 292 | of_node_put(node); |
|---|
| .. | .. |
|---|
| 457 | 450 | of_node_put(np); |
|---|
| 458 | 451 | } |
|---|
| 459 | 452 | |
|---|
| 460 | | -#if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_XMON) |
|---|
| 461 | | -static struct irqaction xmon_irqaction = { |
|---|
| 462 | | - .handler = xmon_irq, |
|---|
| 463 | | - .name = "XMON break", |
|---|
| 464 | | -}; |
|---|
| 465 | | -#endif |
|---|
| 466 | | - |
|---|
| 467 | 453 | static void __init chrp_find_8259(void) |
|---|
| 468 | 454 | { |
|---|
| 469 | 455 | struct device_node *np, *pic = NULL; |
|---|
| .. | .. |
|---|
| 544 | 530 | /* see if there is a keyboard in the device tree |
|---|
| 545 | 531 | with a parent of type "adb" */ |
|---|
| 546 | 532 | for_each_node_by_name(kbd, "keyboard") |
|---|
| 547 | | - if (kbd->parent && kbd->parent->type |
|---|
| 548 | | - && strcmp(kbd->parent->type, "adb") == 0) |
|---|
| 533 | + if (of_node_is_type(kbd->parent, "adb")) |
|---|
| 549 | 534 | break; |
|---|
| 550 | 535 | of_node_put(kbd); |
|---|
| 551 | | - if (kbd) |
|---|
| 552 | | - setup_irq(HYDRA_INT_ADB_NMI, &xmon_irqaction); |
|---|
| 536 | + if (kbd) { |
|---|
| 537 | + if (request_irq(HYDRA_INT_ADB_NMI, xmon_irq, 0, "XMON break", |
|---|
| 538 | + NULL)) |
|---|
| 539 | + pr_err("Failed to register XMON break interrupt\n"); |
|---|
| 540 | + } |
|---|
| 553 | 541 | #endif |
|---|
| 554 | 542 | } |
|---|
| 555 | 543 | |
|---|
| 556 | 544 | static void __init |
|---|
| 557 | 545 | chrp_init2(void) |
|---|
| 558 | 546 | { |
|---|
| 559 | | -#ifdef CONFIG_NVRAM |
|---|
| 547 | +#if IS_ENABLED(CONFIG_NVRAM) |
|---|
| 560 | 548 | chrp_nvram_init(); |
|---|
| 561 | 549 | #endif |
|---|
| 562 | 550 | |
|---|
| .. | .. |
|---|
| 580 | 568 | if (strcmp(dtype, "chrp")) |
|---|
| 581 | 569 | return 0; |
|---|
| 582 | 570 | |
|---|
| 583 | | - ISA_DMA_THRESHOLD = ~0L; |
|---|
| 584 | 571 | DMA_MODE_READ = 0x44; |
|---|
| 585 | 572 | DMA_MODE_WRITE = 0x48; |
|---|
| 586 | 573 | |
|---|