diff options
author | Sreedhara DS <sreedhara.ds@intel.com> | 2010-07-26 10:02:25 +0100 |
---|---|---|
committer | Matthew Garrett <mjg@redhat.com> | 2010-08-03 09:50:29 -0400 |
commit | 14d10f0a48cdfa76773cadcbf0deb233282f6b94 (patch) | |
tree | a9b6bfa1d64044b96f943d1486d98aa66582e205 /drivers/platform | |
parent | a00cd11b3986f4ab9b43f553785c3f9e8fb64323 (diff) |
intel_scu_ipc: detect CPU type automatically
Intel SCU message formats depend upon the processor type. Replace the
module option with automatic detection of the processor type.
Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/intel_scu_ipc.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c index bb2f1fba637..b6a03447ea6 100644 --- a/drivers/platform/x86/intel_scu_ipc.c +++ b/drivers/platform/x86/intel_scu_ipc.c @@ -23,7 +23,7 @@ #include <linux/pm.h> #include <linux/pci.h> #include <linux/interrupt.h> -#include <asm/setup.h> +#include <asm/mrst.h> #include <asm/intel_scu_ipc.h> /* IPC defines the following message types */ @@ -78,12 +78,9 @@ struct intel_scu_ipc_dev { static struct intel_scu_ipc_dev ipcdev; /* Only one for now */ -static int platform = 1; -module_param(platform, int, 0); -MODULE_PARM_DESC(platform, "1 for moorestown platform"); - - - +#define PLATFORM_LANGWELL 1 +#define PLATFORM_PENWELL 2 +static int platform; /* Platform type */ /* * IPC Read Buffer (Read Only): @@ -817,6 +814,14 @@ static struct pci_driver ipc_driver = { static int __init intel_scu_ipc_init(void) { + if (boot_cpu_data.x86 == 6 && + boot_cpu_data.x86_model == 0x27 && + boot_cpu_data.x86_mask == 1) + platform = PLATFORM_PENWELL; + else if (boot_cpu_data.x86 == 6 && + boot_cpu_data.x86_model == 0x26) + platform = PLATFORM_LANGWELL; + return pci_register_driver(&ipc_driver); } |