diff options
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/i8042-io.h | 15 | ||||
-rw-r--r-- | drivers/parport/parport_pc.c | 4 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/core.c | 8 | ||||
-rw-r--r-- | include/asm-powerpc/io.h | 2 |
5 files changed, 26 insertions, 9 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index a6398fbe530d..8ed362140452 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -415,6 +415,12 @@ static int pSeries_check_legacy_ioport(unsigned int baseport) | |||
415 | return -ENODEV; | 415 | return -ENODEV; |
416 | of_node_put(np); | 416 | of_node_put(np); |
417 | break; | 417 | break; |
418 | case PARALLEL_BASE: | ||
419 | np = of_find_node_by_type(NULL, "parallel"); | ||
420 | if (np == NULL) | ||
421 | return -ENODEV; | ||
422 | of_node_put(np); | ||
423 | break; | ||
418 | } | 424 | } |
419 | return 0; | 425 | return 0; |
420 | } | 426 | } |
diff --git a/drivers/input/serio/i8042-io.h b/drivers/input/serio/i8042-io.h index cc21914fbc72..3b4e13b9ce1b 100644 --- a/drivers/input/serio/i8042-io.h +++ b/drivers/input/serio/i8042-io.h | |||
@@ -67,25 +67,22 @@ static inline int i8042_platform_init(void) | |||
67 | * On some platforms touching the i8042 data register region can do really | 67 | * On some platforms touching the i8042 data register region can do really |
68 | * bad things. Because of this the region is always reserved on such boxes. | 68 | * bad things. Because of this the region is always reserved on such boxes. |
69 | */ | 69 | */ |
70 | #if !defined(__sh__) && !defined(__alpha__) && !defined(__mips__) && !defined(CONFIG_PPC_MERGE) | ||
71 | if (!request_region(I8042_DATA_REG, 16, "i8042")) | ||
72 | return -EBUSY; | ||
73 | #endif | ||
74 | |||
75 | i8042_reset = 1; | ||
76 | |||
77 | #if defined(CONFIG_PPC_MERGE) | 70 | #if defined(CONFIG_PPC_MERGE) |
78 | if (check_legacy_ioport(I8042_DATA_REG)) | 71 | if (check_legacy_ioport(I8042_DATA_REG)) |
79 | return -EBUSY; | 72 | return -ENODEV; |
73 | #endif | ||
74 | #if !defined(__sh__) && !defined(__alpha__) && !defined(__mips__) | ||
80 | if (!request_region(I8042_DATA_REG, 16, "i8042")) | 75 | if (!request_region(I8042_DATA_REG, 16, "i8042")) |
81 | return -EBUSY; | 76 | return -EBUSY; |
82 | #endif | 77 | #endif |
78 | |||
79 | i8042_reset = 1; | ||
83 | return 0; | 80 | return 0; |
84 | } | 81 | } |
85 | 82 | ||
86 | static inline void i8042_platform_exit(void) | 83 | static inline void i8042_platform_exit(void) |
87 | { | 84 | { |
88 | #if !defined(__sh__) && !defined(__alpha__) && !defined(CONFIG_PPC64) | 85 | #if !defined(__sh__) && !defined(__alpha__) |
89 | release_region(I8042_DATA_REG, 16); | 86 | release_region(I8042_DATA_REG, 16); |
90 | #endif | 87 | #endif |
91 | } | 88 | } |
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index fe800dc0be9f..43894ddec7dc 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c | |||
@@ -3374,6 +3374,10 @@ __setup("parport_init_mode=",parport_init_mode_setup); | |||
3374 | 3374 | ||
3375 | static int __init parport_pc_init(void) | 3375 | static int __init parport_pc_init(void) |
3376 | { | 3376 | { |
3377 | #if defined(CONFIG_PPC_MERGE) | ||
3378 | if (check_legacy_ioport(PARALLEL_BASE)) | ||
3379 | return -ENODEV; | ||
3380 | #endif | ||
3377 | if (parse_parport_params()) | 3381 | if (parse_parport_params()) |
3378 | return -EINVAL; | 3382 | return -EINVAL; |
3379 | 3383 | ||
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c index 551f58e29810..81a6c83d89a6 100644 --- a/drivers/pnp/pnpbios/core.c +++ b/drivers/pnp/pnpbios/core.c | |||
@@ -526,6 +526,10 @@ static int __init pnpbios_init(void) | |||
526 | { | 526 | { |
527 | int ret; | 527 | int ret; |
528 | 528 | ||
529 | #if defined(CONFIG_PPC_MERGE) | ||
530 | if (check_legacy_ioport(PNPBIOS_BASE)) | ||
531 | return -ENODEV; | ||
532 | #endif | ||
529 | if (pnpbios_disabled || dmi_check_system(pnpbios_dmi_table)) { | 533 | if (pnpbios_disabled || dmi_check_system(pnpbios_dmi_table)) { |
530 | printk(KERN_INFO "PnPBIOS: Disabled\n"); | 534 | printk(KERN_INFO "PnPBIOS: Disabled\n"); |
531 | return -ENODEV; | 535 | return -ENODEV; |
@@ -575,6 +579,10 @@ subsys_initcall(pnpbios_init); | |||
575 | 579 | ||
576 | static int __init pnpbios_thread_init(void) | 580 | static int __init pnpbios_thread_init(void) |
577 | { | 581 | { |
582 | #if defined(CONFIG_PPC_MERGE) | ||
583 | if (check_legacy_ioport(PNPBIOS_BASE)) | ||
584 | return 0; | ||
585 | #endif | ||
578 | if (pnpbios_disabled) | 586 | if (pnpbios_disabled) |
579 | return 0; | 587 | return 0; |
580 | #ifdef CONFIG_HOTPLUG | 588 | #ifdef CONFIG_HOTPLUG |
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index 46bae1cf385b..19b2ec1ec665 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | /* Check of existence of legacy devices */ | 12 | /* Check of existence of legacy devices */ |
13 | extern int check_legacy_ioport(unsigned long base_port); | 13 | extern int check_legacy_ioport(unsigned long base_port); |
14 | #define PARALLEL_BASE 0x378 | ||
15 | #define PNPBIOS_BASE 0xf000 /* only relevant for PReP */ | ||
14 | 16 | ||
15 | #ifndef CONFIG_PPC64 | 17 | #ifndef CONFIG_PPC64 |
16 | #include <asm-ppc/io.h> | 18 | #include <asm-ppc/io.h> |