]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 14 Jul 2010 00:31:11 +0000 (17:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 14 Jul 2010 00:31:11 +0000 (17:31 -0700)
* '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

arch/x86/include/asm/x86_init.h
arch/x86/kernel/mrst.c
arch/x86/kernel/x86_init.c
drivers/input/keyboard/Kconfig
drivers/input/mouse/Kconfig
drivers/input/serio/Kconfig
drivers/input/serio/i8042-x86ia64io.h

index 519b54327d750f5e3580ed45cc68e78272c1ba81..baa579c8e03839cbb8d54fb7b2b4d3b7d700742c 100644 (file)
@@ -142,6 +142,7 @@ struct x86_cpuinit_ops {
  * @set_wallclock:             set time back to HW clock
  * @is_untracked_pat_range     exclude from PAT logic
  * @nmi_init                   enable NMI on cpus
+ * @i8042_detect               pre-detect if i8042 controller exists
  */
 struct x86_platform_ops {
        unsigned long (*calibrate_tsc)(void);
@@ -150,6 +151,7 @@ struct x86_platform_ops {
        void (*iommu_shutdown)(void);
        bool (*is_untracked_pat_range)(u64 start, u64 end);
        void (*nmi_init)(void);
+       int (*i8042_detect)(void);
 };
 
 extern struct x86_init_ops x86_init;
index e796448f0eb5e7a156600d690a32807e3b7b39fa..5915e0b333033471fa27c8056a6dae2795bbe6ee 100644 (file)
@@ -216,6 +216,12 @@ static void __init mrst_setup_boot_clock(void)
                setup_boot_APIC_clock();
 };
 
+/* MID systems don't have i8042 controller */
+static int mrst_i8042_detect(void)
+{
+       return 0;
+}
+
 /*
  * Moorestown specific x86_init function overrides and early setup
  * calls.
@@ -233,6 +239,7 @@ void __init x86_mrst_early_setup(void)
        x86_cpuinit.setup_percpu_clockev = mrst_setup_secondary_clock;
 
        x86_platform.calibrate_tsc = mrst_calibrate_tsc;
+       x86_platform.i8042_detect = mrst_i8042_detect;
        x86_init.pci.init = pci_mrst_init;
        x86_init.pci.fixup_irqs = x86_init_noop;
 
index 61a1e8c7e19f8169e736bd329e9b2b72c87c3cce..cd6da6bf3ecaf7c24b9b9848c31d313c741d0f16 100644 (file)
@@ -5,6 +5,7 @@
  */
 #include <linux/init.h>
 #include <linux/ioport.h>
+#include <linux/module.h>
 
 #include <asm/bios_ebda.h>
 #include <asm/paravirt.h>
@@ -85,6 +86,7 @@ struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
 };
 
 static void default_nmi_init(void) { };
+static int default_i8042_detect(void) { return 1; };
 
 struct x86_platform_ops x86_platform = {
        .calibrate_tsc                  = native_calibrate_tsc,
@@ -92,5 +94,8 @@ struct x86_platform_ops x86_platform = {
        .set_wallclock                  = mach_set_rtc_mmss,
        .iommu_shutdown                 = iommu_shutdown_noop,
        .is_untracked_pat_range         = is_ISA_range,
-       .nmi_init                       = default_nmi_init
+       .nmi_init                       = default_nmi_init,
+       .i8042_detect                   = default_i8042_detect
 };
+
+EXPORT_SYMBOL_GPL(x86_platform);
index 0f9a4785d7980feca1cc65d5b7504906535ea5f2..3525f533e186d3f3cf0e7990d9efa4af90a66d85 100644 (file)
@@ -69,11 +69,11 @@ config KEYBOARD_ATARI
          module will be called atakbd.
 
 config KEYBOARD_ATKBD
-       tristate "AT keyboard" if EMBEDDED || !X86 || X86_MRST
+       tristate "AT keyboard" if EMBEDDED || !X86
        default y
        select SERIO
        select SERIO_LIBPS2
-       select SERIO_I8042 if X86 && !X86_MRST
+       select SERIO_I8042 if X86
        select SERIO_GSCPS2 if GSC
        help
          Say Y here if you want to use a standard AT or PS/2 keyboard. Usually
index eeb58c1cac164a65b6d2c0a15f7e40981aec16cd..c714ca2407f8a190d247f3f8eb21d96edb577ac3 100644 (file)
@@ -17,7 +17,7 @@ config MOUSE_PS2
        default y
        select SERIO
        select SERIO_LIBPS2
-       select SERIO_I8042 if X86 && !X86_MRST
+       select SERIO_I8042 if X86
        select SERIO_GSCPS2 if GSC
        help
          Say Y here if you have a PS/2 mouse connected to your system. This
index 256b9e9394dc805b2062f1e70f3f7abd24814647..3bfe8fafc6adac421577bc17c4da964537a4145f 100644 (file)
@@ -22,7 +22,7 @@ config SERIO_I8042
        tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86
        default y
        depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && \
-                  (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN && !X86_MRST
+                  (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN
        help
          i8042 is the chip over which the standard AT keyboard and PS/2
          mouse are connected to the computer. If you use these devices,
index 6168469ad1a69167c5fe77c5ef4ce8afedbf4be7..81003c4739f4f32351566759b9225fdfb974a7b7 100644 (file)
@@ -7,6 +7,10 @@
  * the Free Software Foundation.
  */
 
+#ifdef CONFIG_X86
+#include <asm/x86_init.h>
+#endif
+
 /*
  * Names.
  */
@@ -840,6 +844,12 @@ static int __init i8042_platform_init(void)
 {
        int retval;
 
+#ifdef CONFIG_X86
+       /* Just return if pre-detection shows no i8042 controller exist */
+       if (!x86_platform.i8042_detect())
+               return -ENODEV;
+#endif
+
 /*
  * On ix86 platforms touching the i8042 data register region can do really
  * bad things. Because of this the region is always reserved on ix86 boxes.