提交 14d10f0a 编写于 作者: S Sreedhara DS 提交者: Matthew Garrett

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: NSreedhara DS <sreedhara.ds@intel.com>
Signed-off-by: NMatthew Garrett <mjg@redhat.com>
上级 a00cd11b
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <asm/setup.h> #include <asm/mrst.h>
#include <asm/intel_scu_ipc.h> #include <asm/intel_scu_ipc.h>
/* IPC defines the following message types */ /* IPC defines the following message types */
...@@ -78,12 +78,9 @@ struct intel_scu_ipc_dev { ...@@ -78,12 +78,9 @@ struct intel_scu_ipc_dev {
static struct intel_scu_ipc_dev ipcdev; /* Only one for now */ static struct intel_scu_ipc_dev ipcdev; /* Only one for now */
static int platform = 1; #define PLATFORM_LANGWELL 1
module_param(platform, int, 0); #define PLATFORM_PENWELL 2
MODULE_PARM_DESC(platform, "1 for moorestown platform"); static int platform; /* Platform type */
/* /*
* IPC Read Buffer (Read Only): * IPC Read Buffer (Read Only):
...@@ -817,6 +814,14 @@ static struct pci_driver ipc_driver = { ...@@ -817,6 +814,14 @@ static struct pci_driver ipc_driver = {
static int __init intel_scu_ipc_init(void) 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); return pci_register_driver(&ipc_driver);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册