From: Alan Cox <alan@linux.intel.com>
To: platform-driver-x86@vger.kernel.org, mjg@redhat.com
Subject: [PATCH 01/11] intel_scu_ipc: detect CPU type automatically
Date: Mon, 26 Jul 2010 10:02:25 +0100 [thread overview]
Message-ID: <20100726090222.12329.19653.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100726090031.12329.53555.stgit@localhost.localdomain>
From: Sreedhara DS <sreedhara.ds@intel.com>
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>
---
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 bb2f1fb..b6a0344 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);
}
next prev parent reply other threads:[~2010-07-26 9:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-26 9:02 [PATCH 00/11] Series short description Alan Cox
2010-07-26 9:02 ` Alan Cox [this message]
2010-07-26 9:02 ` [PATCH 02/11] intel_scu_ipc: Support Medfield processors Alan Cox
2010-07-26 9:03 ` [PATCH 03/11] Remove indirect read write api support Alan Cox
2010-07-26 9:03 ` [PATCH 04/11] intel_scu_ipc: tidy up unused bits Alan Cox
2010-07-26 9:03 ` [PATCH 05/11] intel_scu_ipc: Use the new cpu identification function Alan Cox
2010-07-26 9:04 ` [PATCH 06/11] Fix stack buffer size for IPC writev messages Alan Cox
2010-07-26 9:04 ` [PATCH 07/11] zero the stack buffer before giving random garbage to the SCU Alan Cox
2010-07-26 9:05 ` [PATCH 08/11] Clean up command packing on MRST Alan Cox
2010-07-26 9:05 ` [PATCH 09/11] intel_scu_ipc: fix data packing of PMIC command on Moorestown Alan Cox
2010-07-26 9:06 ` [PATCH 10/11] intel_scu_ipc: return -EIO for error condition in busy_loop Alan Cox
2010-07-26 9:06 ` [PATCH 11/11] intel_scu_ipc: fix size field for intel_scu_ipc_command Alan Cox
2010-08-03 13:50 ` [PATCH 00/11] Series short description Matthew Garrett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100726090222.12329.19653.stgit@localhost.localdomain \
--to=alan@linux.intel.com \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox