All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch 1/4] intel scu ipc
@ 2010-05-28  8:39 Ds, Sreedhara
  2010-05-28 18:51 ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Ds, Sreedhara @ 2010-05-28  8:39 UTC (permalink / raw)
  To: platform-driver-x86@vger.kernel.org, mjg@redhat.com,
	x86@kernel.org, Alan Cox

[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]

Hello,
Please review and accept the patch


From 443010eead6d69e3b60b460fd3f82344de95da5d Mon Sep 17 00:00:00 2001
From: Sreedhara DS <sreedhara.ds@intel.com>
Date: Fri, 28 May 2010 13:53:38 +0530
Subject: [PATCH] changes to find platform type during int
 	modified:   intel_scu_ipc.c


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 576c3ed..b2101ec 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):
@@ -813,6 +810,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);
 }
 
-- 
1.5.4.5


[-- Attachment #2: 0001-changes-to-find-platform-type-during-int.patch --]
[-- Type: application/octet-stream, Size: 1638 bytes --]

From 443010eead6d69e3b60b460fd3f82344de95da5d Mon Sep 17 00:00:00 2001
From: Sreedhara DS <sreedhara.ds@intel.com>
Date: Fri, 28 May 2010 13:53:38 +0530
Subject: [PATCH] changes to find platform type during int
 	modified:   intel_scu_ipc.c


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 576c3ed..b2101ec 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):
@@ -813,6 +810,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);
 }
 
-- 
1.5.4.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Patch 1/4] intel scu ipc
  2010-05-28  8:39 [Patch 1/4] intel scu ipc Ds, Sreedhara
@ 2010-05-28 18:51 ` Alan Cox
  2010-05-30 15:39   ` Ds, Sreedhara
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2010-05-28 18:51 UTC (permalink / raw)
  To: Ds, Sreedhara
  Cc: platform-driver-x86@vger.kernel.org, mjg@redhat.com,
	x86@kernel.org

On Fri, 28 May 2010 14:09:39 +0530
"Ds, Sreedhara" <sreedhara.ds@intel.com> wrote:

> Hello,
> Please review and accept the patch
> 
> 
> From 443010eead6d69e3b60b460fd3f82344de95da5d Mon Sep 17 00:00:00 2001
> From: Sreedhara DS <sreedhara.ds@intel.com>
> Date: Fri, 28 May 2010 13:53:38 +0530
> Subject: [PATCH] changes to find platform type during int
>  	modified:   intel_scu_ipc.c
> 
> 
> Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com>

Code is fine but your subject/comments don't reflect the patch. That
causes problems for the upstream merge because the upstream history
needs to accurately describe it.

Something like

Subject: 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.


----

Code looks fine and I'll add it to the Meego working tree but with the
comment I quoted if that is ok

Alan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [Patch 1/4] intel scu ipc
  2010-05-28 18:51 ` Alan Cox
@ 2010-05-30 15:39   ` Ds, Sreedhara
  0 siblings, 0 replies; 3+ messages in thread
From: Ds, Sreedhara @ 2010-05-30 15:39 UTC (permalink / raw)
  To: Alan Cox
  Cc: platform-driver-x86@vger.kernel.org, mjg@redhat.com,
	x86@kernel.org

Alan,
Your comment is valid. 
Please add it to the Meego working tree


--Sreedhara

-----Original Message-----
From: Alan Cox [mailto:alan@linux.intel.com] 
Sent: Saturday, May 29, 2010 12:22 AM
To: Ds, Sreedhara
Cc: platform-driver-x86@vger.kernel.org; mjg@redhat.com; x86@kernel.org
Subject: Re: [Patch 1/4] intel scu ipc

On Fri, 28 May 2010 14:09:39 +0530
"Ds, Sreedhara" <sreedhara.ds@intel.com> wrote:

> Hello,
> Please review and accept the patch
> 
> 
> From 443010eead6d69e3b60b460fd3f82344de95da5d Mon Sep 17 00:00:00 2001
> From: Sreedhara DS <sreedhara.ds@intel.com>
> Date: Fri, 28 May 2010 13:53:38 +0530
> Subject: [PATCH] changes to find platform type during int
>  	modified:   intel_scu_ipc.c
> 
> 
> Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com>

Code is fine but your subject/comments don't reflect the patch. That
causes problems for the upstream merge because the upstream history
needs to accurately describe it.

Something like

Subject: 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.


----

Code looks fine and I'll add it to the Meego working tree but with the
comment I quoted if that is ok

Alan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-30 15:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-28  8:39 [Patch 1/4] intel scu ipc Ds, Sreedhara
2010-05-28 18:51 ` Alan Cox
2010-05-30 15:39   ` Ds, Sreedhara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.