diff options
author | Olaf Hering <olaf@aepfle.de> | 2007-04-25 16:36:56 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-04-27 07:14:30 -0400 |
commit | 8d8a0241eb019ce9648a77b55f9f76a834207cbb (patch) | |
tree | 1363c38d6ff4898dfcfee19c25258015152c84f7 /arch/powerpc/kernel | |
parent | 8d2169e8d6b8a91413df33bc402e0f602ceaabcc (diff) |
[POWERPC] Generic check_legacy_ioport
check_legacy_ioport makes only sense on PREP, CHRP and pSeries.
They may have an isa node with PS/2, parport, floppy and serial ports.
Remove the check_legacy_ioport call from ppc_md, it's not needed
anymore. Hardware capabilities come from the device-tree.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 3c8847b647fa..370803722e47 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -478,11 +478,39 @@ void probe_machine(void) | |||
478 | printk(KERN_INFO "Using %s machine description\n", ppc_md.name); | 478 | printk(KERN_INFO "Using %s machine description\n", ppc_md.name); |
479 | } | 479 | } |
480 | 480 | ||
481 | /* Match a class of boards, not a specific device configuration. */ | ||
481 | int check_legacy_ioport(unsigned long base_port) | 482 | int check_legacy_ioport(unsigned long base_port) |
482 | { | 483 | { |
483 | if (ppc_md.check_legacy_ioport == NULL) | 484 | struct device_node *parent, *np = NULL; |
484 | return 0; | 485 | int ret = -ENODEV; |
485 | return ppc_md.check_legacy_ioport(base_port); | 486 | |
487 | switch(base_port) { | ||
488 | case I8042_DATA_REG: | ||
489 | np = of_find_node_by_type(NULL, "8042"); | ||
490 | break; | ||
491 | case FDC_BASE: /* FDC1 */ | ||
492 | np = of_find_node_by_type(NULL, "fdc"); | ||
493 | break; | ||
494 | #ifdef CONFIG_PPC_PREP | ||
495 | case _PIDXR: | ||
496 | case _PNPWRP: | ||
497 | case PNPBIOS_BASE: | ||
498 | /* implement me */ | ||
499 | #endif | ||
500 | default: | ||
501 | /* ipmi is supposed to fail here */ | ||
502 | break; | ||
503 | } | ||
504 | if (!np) | ||
505 | return ret; | ||
506 | parent = of_get_parent(np); | ||
507 | if (parent) { | ||
508 | if (strcmp(parent->type, "isa") == 0) | ||
509 | ret = 0; | ||
510 | of_node_put(parent); | ||
511 | } | ||
512 | of_node_put(np); | ||
513 | return ret; | ||
486 | } | 514 | } |
487 | EXPORT_SYMBOL(check_legacy_ioport); | 515 | EXPORT_SYMBOL(check_legacy_ioport); |
488 | 516 | ||