diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-13 20:31:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-13 20:31:11 -0400 |
commit | bcefc8d0d3a0cba9078f519d69f138b93ad30e39 (patch) | |
tree | 45079de6cba248d2ea0f420cddda20f29f386aea | |
parent | 177dd7e1ebac9420636f155e8d429bc4f809c724 (diff) | |
parent | 5cdfa1c3bbabb809ef3134f741a63e13373a8cad (diff) |
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
input: i8042 - add runtime check in x86's i8042_platform_init
Revert "Input: fixup X86_MRST selects"
Revert "Input: do not force selecting i8042 on Moorestown"
x86, mrst: Add i8042_detect API for Moorestwon platform
x86: Add i8042 pre-detection hook to x86_platform_ops
x86, platform: Export x86_platform to modules
-rw-r--r-- | arch/x86/include/asm/x86_init.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/mrst.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/x86_init.c | 7 | ||||
-rw-r--r-- | drivers/input/keyboard/Kconfig | 4 | ||||
-rw-r--r-- | drivers/input/mouse/Kconfig | 2 | ||||
-rw-r--r-- | drivers/input/serio/Kconfig | 2 | ||||
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 10 |
7 files changed, 29 insertions, 5 deletions
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index 519b54327d75..baa579c8e038 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h | |||
@@ -142,6 +142,7 @@ struct x86_cpuinit_ops { | |||
142 | * @set_wallclock: set time back to HW clock | 142 | * @set_wallclock: set time back to HW clock |
143 | * @is_untracked_pat_range exclude from PAT logic | 143 | * @is_untracked_pat_range exclude from PAT logic |
144 | * @nmi_init enable NMI on cpus | 144 | * @nmi_init enable NMI on cpus |
145 | * @i8042_detect pre-detect if i8042 controller exists | ||
145 | */ | 146 | */ |
146 | struct x86_platform_ops { | 147 | struct x86_platform_ops { |
147 | unsigned long (*calibrate_tsc)(void); | 148 | unsigned long (*calibrate_tsc)(void); |
@@ -150,6 +151,7 @@ struct x86_platform_ops { | |||
150 | void (*iommu_shutdown)(void); | 151 | void (*iommu_shutdown)(void); |
151 | bool (*is_untracked_pat_range)(u64 start, u64 end); | 152 | bool (*is_untracked_pat_range)(u64 start, u64 end); |
152 | void (*nmi_init)(void); | 153 | void (*nmi_init)(void); |
154 | int (*i8042_detect)(void); | ||
153 | }; | 155 | }; |
154 | 156 | ||
155 | extern struct x86_init_ops x86_init; | 157 | extern struct x86_init_ops x86_init; |
diff --git a/arch/x86/kernel/mrst.c b/arch/x86/kernel/mrst.c index e796448f0eb5..5915e0b33303 100644 --- a/arch/x86/kernel/mrst.c +++ b/arch/x86/kernel/mrst.c | |||
@@ -216,6 +216,12 @@ static void __init mrst_setup_boot_clock(void) | |||
216 | setup_boot_APIC_clock(); | 216 | setup_boot_APIC_clock(); |
217 | }; | 217 | }; |
218 | 218 | ||
219 | /* MID systems don't have i8042 controller */ | ||
220 | static int mrst_i8042_detect(void) | ||
221 | { | ||
222 | return 0; | ||
223 | } | ||
224 | |||
219 | /* | 225 | /* |
220 | * Moorestown specific x86_init function overrides and early setup | 226 | * Moorestown specific x86_init function overrides and early setup |
221 | * calls. | 227 | * calls. |
@@ -233,6 +239,7 @@ void __init x86_mrst_early_setup(void) | |||
233 | x86_cpuinit.setup_percpu_clockev = mrst_setup_secondary_clock; | 239 | x86_cpuinit.setup_percpu_clockev = mrst_setup_secondary_clock; |
234 | 240 | ||
235 | x86_platform.calibrate_tsc = mrst_calibrate_tsc; | 241 | x86_platform.calibrate_tsc = mrst_calibrate_tsc; |
242 | x86_platform.i8042_detect = mrst_i8042_detect; | ||
236 | x86_init.pci.init = pci_mrst_init; | 243 | x86_init.pci.init = pci_mrst_init; |
237 | x86_init.pci.fixup_irqs = x86_init_noop; | 244 | x86_init.pci.fixup_irqs = x86_init_noop; |
238 | 245 | ||
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index 61a1e8c7e19f..cd6da6bf3eca 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c | |||
@@ -5,6 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/ioport.h> | 7 | #include <linux/ioport.h> |
8 | #include <linux/module.h> | ||
8 | 9 | ||
9 | #include <asm/bios_ebda.h> | 10 | #include <asm/bios_ebda.h> |
10 | #include <asm/paravirt.h> | 11 | #include <asm/paravirt.h> |
@@ -85,6 +86,7 @@ struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = { | |||
85 | }; | 86 | }; |
86 | 87 | ||
87 | static void default_nmi_init(void) { }; | 88 | static void default_nmi_init(void) { }; |
89 | static int default_i8042_detect(void) { return 1; }; | ||
88 | 90 | ||
89 | struct x86_platform_ops x86_platform = { | 91 | struct x86_platform_ops x86_platform = { |
90 | .calibrate_tsc = native_calibrate_tsc, | 92 | .calibrate_tsc = native_calibrate_tsc, |
@@ -92,5 +94,8 @@ struct x86_platform_ops x86_platform = { | |||
92 | .set_wallclock = mach_set_rtc_mmss, | 94 | .set_wallclock = mach_set_rtc_mmss, |
93 | .iommu_shutdown = iommu_shutdown_noop, | 95 | .iommu_shutdown = iommu_shutdown_noop, |
94 | .is_untracked_pat_range = is_ISA_range, | 96 | .is_untracked_pat_range = is_ISA_range, |
95 | .nmi_init = default_nmi_init | 97 | .nmi_init = default_nmi_init, |
98 | .i8042_detect = default_i8042_detect | ||
96 | }; | 99 | }; |
100 | |||
101 | EXPORT_SYMBOL_GPL(x86_platform); | ||
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 0f9a4785d798..3525f533e186 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig | |||
@@ -69,11 +69,11 @@ config KEYBOARD_ATARI | |||
69 | module will be called atakbd. | 69 | module will be called atakbd. |
70 | 70 | ||
71 | config KEYBOARD_ATKBD | 71 | config KEYBOARD_ATKBD |
72 | tristate "AT keyboard" if EMBEDDED || !X86 || X86_MRST | 72 | tristate "AT keyboard" if EMBEDDED || !X86 |
73 | default y | 73 | default y |
74 | select SERIO | 74 | select SERIO |
75 | select SERIO_LIBPS2 | 75 | select SERIO_LIBPS2 |
76 | select SERIO_I8042 if X86 && !X86_MRST | 76 | select SERIO_I8042 if X86 |
77 | select SERIO_GSCPS2 if GSC | 77 | select SERIO_GSCPS2 if GSC |
78 | help | 78 | help |
79 | Say Y here if you want to use a standard AT or PS/2 keyboard. Usually | 79 | Say Y here if you want to use a standard AT or PS/2 keyboard. Usually |
diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig index eeb58c1cac16..c714ca2407f8 100644 --- a/drivers/input/mouse/Kconfig +++ b/drivers/input/mouse/Kconfig | |||
@@ -17,7 +17,7 @@ config MOUSE_PS2 | |||
17 | default y | 17 | default y |
18 | select SERIO | 18 | select SERIO |
19 | select SERIO_LIBPS2 | 19 | select SERIO_LIBPS2 |
20 | select SERIO_I8042 if X86 && !X86_MRST | 20 | select SERIO_I8042 if X86 |
21 | select SERIO_GSCPS2 if GSC | 21 | select SERIO_GSCPS2 if GSC |
22 | help | 22 | help |
23 | Say Y here if you have a PS/2 mouse connected to your system. This | 23 | Say Y here if you have a PS/2 mouse connected to your system. This |
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig index 256b9e9394dc..3bfe8fafc6ad 100644 --- a/drivers/input/serio/Kconfig +++ b/drivers/input/serio/Kconfig | |||
@@ -22,7 +22,7 @@ config SERIO_I8042 | |||
22 | tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86 | 22 | tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86 |
23 | default y | 23 | default y |
24 | depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && \ | 24 | depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && \ |
25 | (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN && !X86_MRST | 25 | (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN |
26 | help | 26 | help |
27 | i8042 is the chip over which the standard AT keyboard and PS/2 | 27 | i8042 is the chip over which the standard AT keyboard and PS/2 |
28 | mouse are connected to the computer. If you use these devices, | 28 | mouse are connected to the computer. If you use these devices, |
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 6168469ad1a6..81003c4739f4 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -7,6 +7,10 @@ | |||
7 | * the Free Software Foundation. | 7 | * the Free Software Foundation. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifdef CONFIG_X86 | ||
11 | #include <asm/x86_init.h> | ||
12 | #endif | ||
13 | |||
10 | /* | 14 | /* |
11 | * Names. | 15 | * Names. |
12 | */ | 16 | */ |
@@ -840,6 +844,12 @@ static int __init i8042_platform_init(void) | |||
840 | { | 844 | { |
841 | int retval; | 845 | int retval; |
842 | 846 | ||
847 | #ifdef CONFIG_X86 | ||
848 | /* Just return if pre-detection shows no i8042 controller exist */ | ||
849 | if (!x86_platform.i8042_detect()) | ||
850 | return -ENODEV; | ||
851 | #endif | ||
852 | |||
843 | /* | 853 | /* |
844 | * On ix86 platforms touching the i8042 data register region can do really | 854 | * On ix86 platforms touching the i8042 data register region can do really |
845 | * bad things. Because of this the region is always reserved on ix86 boxes. | 855 | * bad things. Because of this the region is always reserved on ix86 boxes. |