aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorSreedhara DS <sreedhara.ds@intel.com>2010-07-26 05:02:25 -0400
committerMatthew Garrett <mjg@redhat.com>2010-08-03 09:50:29 -0400
commit14d10f0a48cdfa76773cadcbf0deb233282f6b94 (patch)
treea9b6bfa1d64044b96f943d1486d98aa66582e205 /drivers/platform
parenta00cd11b3986f4ab9b43f553785c3f9e8fb64323 (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.c19
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 bb2f1fba637b..b6a03447ea63 100644
--- a/drivers/platform/x86/intel_scu_ipc.c
+++ b/drivers/platform/x86/intel_scu_ipc.c
@@ -23,7 +23,7 @@
23#include <linux/pm.h> 23#include <linux/pm.h>
24#include <linux/pci.h> 24#include <linux/pci.h>
25#include <linux/interrupt.h> 25#include <linux/interrupt.h>
26#include <asm/setup.h> 26#include <asm/mrst.h>
27#include <asm/intel_scu_ipc.h> 27#include <asm/intel_scu_ipc.h>
28 28
29/* IPC defines the following message types */ 29/* IPC defines the following message types */
@@ -78,12 +78,9 @@ struct intel_scu_ipc_dev {
78 78
79static struct intel_scu_ipc_dev ipcdev; /* Only one for now */ 79static struct intel_scu_ipc_dev ipcdev; /* Only one for now */
80 80
81static int platform = 1; 81#define PLATFORM_LANGWELL 1
82module_param(platform, int, 0); 82#define PLATFORM_PENWELL 2
83MODULE_PARM_DESC(platform, "1 for moorestown platform"); 83static int platform; /* Platform type */
84
85
86
87 84
88/* 85/*
89 * IPC Read Buffer (Read Only): 86 * IPC Read Buffer (Read Only):
@@ -817,6 +814,14 @@ static struct pci_driver ipc_driver = {
817 814
818static int __init intel_scu_ipc_init(void) 815static int __init intel_scu_ipc_init(void)
819{ 816{
817 if (boot_cpu_data.x86 == 6 &&
818 boot_cpu_data.x86_model == 0x27 &&
819 boot_cpu_data.x86_mask == 1)
820 platform = PLATFORM_PENWELL;
821 else if (boot_cpu_data.x86 == 6 &&
822 boot_cpu_data.x86_model == 0x26)
823 platform = PLATFORM_LANGWELL;
824
820 return pci_register_driver(&ipc_driver); 825 return pci_register_driver(&ipc_driver);
821} 826}
822 827