All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Few more omap patches for the 2.6.36 merge window
@ 2010-08-04 11:32 ` Tony Lindgren
  0 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2010-08-04 11:32 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap

Hi all,

Here are few more small patches from the linux-omap list
that have not yet been posted to linux-arm-kernel list for
review.

Regards,

Tony

---

Anand Gadiyar (2):
      OMAP3630: Add ES1.1 and ES1.2 detection
      omap: 3630: disable TLL SAR on 3630 ES1

Artem Bityutskiy (1):
      omap: device: improve errors handling


 arch/arm/mach-omap2/id.c               |   28 +++++++++++++++++++++++++---
 arch/arm/mach-omap2/powerdomains34xx.h |   12 ++++++++++--
 arch/arm/plat-omap/include/plat/cpu.h  |   15 +++++++++++----
 arch/arm/plat-omap/omap_device.c       |    4 +++-
 4 files changed, 49 insertions(+), 10 deletions(-)

-- 
Signature

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

* [PATCH 0/3] Few more omap patches for the 2.6.36 merge window
@ 2010-08-04 11:32 ` Tony Lindgren
  0 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2010-08-04 11:32 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

Here are few more small patches from the linux-omap list
that have not yet been posted to linux-arm-kernel list for
review.

Regards,

Tony

---

Anand Gadiyar (2):
      OMAP3630: Add ES1.1 and ES1.2 detection
      omap: 3630: disable TLL SAR on 3630 ES1

Artem Bityutskiy (1):
      omap: device: improve errors handling


 arch/arm/mach-omap2/id.c               |   28 +++++++++++++++++++++++++---
 arch/arm/mach-omap2/powerdomains34xx.h |   12 ++++++++++--
 arch/arm/plat-omap/include/plat/cpu.h  |   15 +++++++++++----
 arch/arm/plat-omap/omap_device.c       |    4 +++-
 4 files changed, 49 insertions(+), 10 deletions(-)

-- 
Signature

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

* [PATCH 1/3] omap: device: improve errors handling
  2010-08-04 11:32 ` Tony Lindgren
@ 2010-08-04 11:32   ` Tony Lindgren
  -1 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2010-08-04 11:32 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Nishanth Menon, Artem Bityutskiy, Paul Walmsley, linux-omap

From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

Do not forget to check the 'platform_device_add_data()' error code
in 'omap_device_build_ss()'.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: Nishanth Menon <nm@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/omap_device.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index ea0d659..d2b1609 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -407,7 +407,9 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
 	od->pdev.num_resources = res_count;
 	od->pdev.resource = res;
 
-	platform_device_add_data(&od->pdev, pdata, pdata_len);
+	ret = platform_device_add_data(&od->pdev, pdata, pdata_len);
+	if (ret)
+		goto odbs_exit4;
 
 	od->pm_lats = pm_lats;
 	od->pm_lats_cnt = pm_lats_cnt;


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

* [PATCH 1/3] omap: device: improve errors handling
@ 2010-08-04 11:32   ` Tony Lindgren
  0 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2010-08-04 11:32 UTC (permalink / raw)
  To: linux-arm-kernel

From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

Do not forget to check the 'platform_device_add_data()' error code
in 'omap_device_build_ss()'.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: Nishanth Menon <nm@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/omap_device.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index ea0d659..d2b1609 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -407,7 +407,9 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
 	od->pdev.num_resources = res_count;
 	od->pdev.resource = res;
 
-	platform_device_add_data(&od->pdev, pdata, pdata_len);
+	ret = platform_device_add_data(&od->pdev, pdata, pdata_len);
+	if (ret)
+		goto odbs_exit4;
 
 	od->pm_lats = pm_lats;
 	od->pm_lats_cnt = pm_lats_cnt;

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

* [PATCH 2/3] OMAP3630: Add ES1.1 and ES1.2 detection
  2010-08-04 11:32 ` Tony Lindgren
@ 2010-08-04 11:33   ` Tony Lindgren
  -1 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2010-08-04 11:33 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Nishanth Menon, Manjunatha GK, linux-omap, Anand Gadiyar

From: Anand Gadiyar <gadiyar@ti.com>

Add revision detection for ES1.1 and ES1.2. Set default
revision as ES1.2.

Add CHIP_GE_OMAP3630ES1_1 to detect revisions 1.1 and later.
This is needed for at least one feature that is broken in
3630ES1.0 but exists on older (3430 ES3.1) and newer revisions.

Additionally, update some of the CHIP_GE_* macros to use other
macros for ease of maintenance.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Manjunatha GK <manjugk@ti.com>
[tony@atomide.com: update to remove fallthrough handling]
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/id.c              |   28 +++++++++++++++++++++++++---
 arch/arm/plat-omap/include/plat/cpu.h |   15 +++++++++++----
 2 files changed, 36 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index fd1904b..e8256a2 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -269,11 +269,27 @@ static void __init omap3_check_revision(void)
 		omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
 		break;
 	case 0xb891:
-	/* FALLTHROUGH */
+		/* Handle 36xx devices */
+		omap_chip.oc |= CHIP_IS_OMAP3630ES1;
+
+		switch(rev) {
+		case 0: /* Take care of early samples */
+			omap_revision = OMAP3630_REV_ES1_0;
+			break;
+		case 1:
+			omap_revision = OMAP3630_REV_ES1_1;
+			omap_chip.oc |= CHIP_IS_OMAP3630ES1_1;
+			break;
+		case 2:
+		default:
+			omap_revision =  OMAP3630_REV_ES1_2;
+			omap_chip.oc |= CHIP_IS_OMAP3630ES1_2;
+			break;
+		}
 	default:
 		/* Unknown default to latest silicon rev as default*/
-		omap_revision = OMAP3630_REV_ES1_0;
-		omap_chip.oc |= CHIP_IS_OMAP3630ES1;
+		omap_revision =  OMAP3630_REV_ES1_2;
+		omap_chip.oc |= CHIP_IS_OMAP3630ES1_2;
 	}
 }
 
@@ -349,6 +365,12 @@ static void __init omap3_cpuinfo(void)
 	case OMAP_REVBITS_00:
 		strcpy(cpu_rev, "1.0");
 		break;
+	case OMAP_REVBITS_01:
+		strcpy(cpu_rev, "1.1");
+		break;
+	case OMAP_REVBITS_02:
+		strcpy(cpu_rev, "1.2");
+		break;
 	case OMAP_REVBITS_10:
 		strcpy(cpu_rev, "2.0");
 		break;
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index aa2f4f0..2e2ae53 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -66,6 +66,8 @@ unsigned int omap_rev(void);
  * family. This difference can be handled separately.
  */
 #define OMAP_REVBITS_00		0x00
+#define OMAP_REVBITS_01		0x01
+#define OMAP_REVBITS_02		0x02
 #define OMAP_REVBITS_10		0x10
 #define OMAP_REVBITS_20		0x20
 #define OMAP_REVBITS_30		0x30
@@ -376,6 +378,8 @@ IS_OMAP_TYPE(3517, 0x3517)
 #define OMAP3430_REV_ES3_1_2	0x34305034
 
 #define OMAP3630_REV_ES1_0	0x36300034
+#define OMAP3630_REV_ES1_1	0x36300134
+#define OMAP3630_REV_ES1_2	0x36300234
 
 #define OMAP35XX_CLASS		0x35000034
 #define OMAP3503_REV(v)		(OMAP35XX_CLASS | (0x3503 << 16) | (v << 8))
@@ -411,6 +415,8 @@ IS_OMAP_TYPE(3517, 0x3517)
 #define CHIP_IS_OMAP3430ES3_1		(1 << 6)
 #define CHIP_IS_OMAP3630ES1		(1 << 7)
 #define CHIP_IS_OMAP4430ES1		(1 << 8)
+#define CHIP_IS_OMAP3630ES1_1           (1 << 9)
+#define CHIP_IS_OMAP3630ES1_2           (1 << 10)
 
 #define CHIP_IS_OMAP24XX		(CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
 
@@ -424,11 +430,12 @@ IS_OMAP_TYPE(3517, 0x3517)
  */
 #define CHIP_GE_OMAP3430ES2		(CHIP_IS_OMAP3430ES2 | \
 					 CHIP_IS_OMAP3430ES3_0 | \
-					 CHIP_IS_OMAP3430ES3_1 | \
-					 CHIP_IS_OMAP3630ES1)
+					 CHIP_GE_OMAP3430ES3_1)
 #define CHIP_GE_OMAP3430ES3_1		(CHIP_IS_OMAP3430ES3_1 | \
-					 CHIP_IS_OMAP3630ES1)
-
+					 CHIP_IS_OMAP3630ES1 | \
+					 CHIP_GE_OMAP3630ES1_1)
+#define CHIP_GE_OMAP3630ES1_1		(CHIP_IS_OMAP3630ES1_1 | \
+					 CHIP_IS_OMAP3630ES1_2)
 
 int omap_chip_is(struct omap_chip_id oci);
 void omap2_check_revision(void);


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

* [PATCH 2/3] OMAP3630: Add ES1.1 and ES1.2 detection
@ 2010-08-04 11:33   ` Tony Lindgren
  0 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2010-08-04 11:33 UTC (permalink / raw)
  To: linux-arm-kernel

From: Anand Gadiyar <gadiyar@ti.com>

Add revision detection for ES1.1 and ES1.2. Set default
revision as ES1.2.

Add CHIP_GE_OMAP3630ES1_1 to detect revisions 1.1 and later.
This is needed for at least one feature that is broken in
3630ES1.0 but exists on older (3430 ES3.1) and newer revisions.

Additionally, update some of the CHIP_GE_* macros to use other
macros for ease of maintenance.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Manjunatha GK <manjugk@ti.com>
[tony at atomide.com: update to remove fallthrough handling]
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/id.c              |   28 +++++++++++++++++++++++++---
 arch/arm/plat-omap/include/plat/cpu.h |   15 +++++++++++----
 2 files changed, 36 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index fd1904b..e8256a2 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -269,11 +269,27 @@ static void __init omap3_check_revision(void)
 		omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
 		break;
 	case 0xb891:
-	/* FALLTHROUGH */
+		/* Handle 36xx devices */
+		omap_chip.oc |= CHIP_IS_OMAP3630ES1;
+
+		switch(rev) {
+		case 0: /* Take care of early samples */
+			omap_revision = OMAP3630_REV_ES1_0;
+			break;
+		case 1:
+			omap_revision = OMAP3630_REV_ES1_1;
+			omap_chip.oc |= CHIP_IS_OMAP3630ES1_1;
+			break;
+		case 2:
+		default:
+			omap_revision =  OMAP3630_REV_ES1_2;
+			omap_chip.oc |= CHIP_IS_OMAP3630ES1_2;
+			break;
+		}
 	default:
 		/* Unknown default to latest silicon rev as default*/
-		omap_revision = OMAP3630_REV_ES1_0;
-		omap_chip.oc |= CHIP_IS_OMAP3630ES1;
+		omap_revision =  OMAP3630_REV_ES1_2;
+		omap_chip.oc |= CHIP_IS_OMAP3630ES1_2;
 	}
 }
 
@@ -349,6 +365,12 @@ static void __init omap3_cpuinfo(void)
 	case OMAP_REVBITS_00:
 		strcpy(cpu_rev, "1.0");
 		break;
+	case OMAP_REVBITS_01:
+		strcpy(cpu_rev, "1.1");
+		break;
+	case OMAP_REVBITS_02:
+		strcpy(cpu_rev, "1.2");
+		break;
 	case OMAP_REVBITS_10:
 		strcpy(cpu_rev, "2.0");
 		break;
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index aa2f4f0..2e2ae53 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -66,6 +66,8 @@ unsigned int omap_rev(void);
  * family. This difference can be handled separately.
  */
 #define OMAP_REVBITS_00		0x00
+#define OMAP_REVBITS_01		0x01
+#define OMAP_REVBITS_02		0x02
 #define OMAP_REVBITS_10		0x10
 #define OMAP_REVBITS_20		0x20
 #define OMAP_REVBITS_30		0x30
@@ -376,6 +378,8 @@ IS_OMAP_TYPE(3517, 0x3517)
 #define OMAP3430_REV_ES3_1_2	0x34305034
 
 #define OMAP3630_REV_ES1_0	0x36300034
+#define OMAP3630_REV_ES1_1	0x36300134
+#define OMAP3630_REV_ES1_2	0x36300234
 
 #define OMAP35XX_CLASS		0x35000034
 #define OMAP3503_REV(v)		(OMAP35XX_CLASS | (0x3503 << 16) | (v << 8))
@@ -411,6 +415,8 @@ IS_OMAP_TYPE(3517, 0x3517)
 #define CHIP_IS_OMAP3430ES3_1		(1 << 6)
 #define CHIP_IS_OMAP3630ES1		(1 << 7)
 #define CHIP_IS_OMAP4430ES1		(1 << 8)
+#define CHIP_IS_OMAP3630ES1_1           (1 << 9)
+#define CHIP_IS_OMAP3630ES1_2           (1 << 10)
 
 #define CHIP_IS_OMAP24XX		(CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
 
@@ -424,11 +430,12 @@ IS_OMAP_TYPE(3517, 0x3517)
  */
 #define CHIP_GE_OMAP3430ES2		(CHIP_IS_OMAP3430ES2 | \
 					 CHIP_IS_OMAP3430ES3_0 | \
-					 CHIP_IS_OMAP3430ES3_1 | \
-					 CHIP_IS_OMAP3630ES1)
+					 CHIP_GE_OMAP3430ES3_1)
 #define CHIP_GE_OMAP3430ES3_1		(CHIP_IS_OMAP3430ES3_1 | \
-					 CHIP_IS_OMAP3630ES1)
-
+					 CHIP_IS_OMAP3630ES1 | \
+					 CHIP_GE_OMAP3630ES1_1)
+#define CHIP_GE_OMAP3630ES1_1		(CHIP_IS_OMAP3630ES1_1 | \
+					 CHIP_IS_OMAP3630ES1_2)
 
 int omap_chip_is(struct omap_chip_id oci);
 void omap2_check_revision(void);

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

* [PATCH 3/3] omap: 3630: disable TLL SAR on 3630 ES1
  2010-08-04 11:32 ` Tony Lindgren
@ 2010-08-04 11:33   ` Tony Lindgren
  -1 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2010-08-04 11:33 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Paul Walmsley, linux-omap, Anand Gadiyar

From: Anand Gadiyar <gadiyar@ti.com>

USBTLL Save-and-Restore is broken in 3630 ES1.0. Having it
enabled could result in incorrect register restores as
the OMAP exits off-mode. This could potentially result in
unexpected wakeup events.

(Refer 3630 errata ID i579)

This is fixed in ES1.1. So disable it for ES1.0s.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/powerdomains34xx.h |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/powerdomains34xx.h b/arch/arm/mach-omap2/powerdomains34xx.h
index bd87112..fa90486 100644
--- a/arch/arm/mach-omap2/powerdomains34xx.h
+++ b/arch/arm/mach-omap2/powerdomains34xx.h
@@ -75,12 +75,19 @@ static struct powerdomain mpu_3xxx_pwrdm = {
 	},
 };
 
+/*
+ * The USBTLL Save-and-Restore mechanism is broken on
+ * 3430s upto ES3.0 and 3630ES1.0. Hence this feature
+ * needs to be disabled on these chips.
+ * Refer: 3430 errata ID i459 and 3630 errata ID i579
+ */
 static struct powerdomain core_3xxx_pre_es3_1_pwrdm = {
 	.name		  = "core_pwrdm",
 	.prcm_offs	  = CORE_MOD,
 	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
 					   CHIP_IS_OMAP3430ES2 |
-					   CHIP_IS_OMAP3430ES3_0),
+					   CHIP_IS_OMAP3430ES3_0 |
+					   CHIP_IS_OMAP3630ES1),
 	.pwrsts		  = PWRSTS_OFF_RET_ON,
 	.pwrsts_logic_ret = PWRSTS_OFF_RET,
 	.banks		  = 2,
@@ -97,7 +104,8 @@ static struct powerdomain core_3xxx_pre_es3_1_pwrdm = {
 static struct powerdomain core_3xxx_es3_1_pwrdm = {
 	.name		  = "core_pwrdm",
 	.prcm_offs	  = CORE_MOD,
-	.omap_chip	  = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES3_1),
+	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1 |
+					  CHIP_GE_OMAP3630ES1_1),
 	.pwrsts		  = PWRSTS_OFF_RET_ON,
 	.pwrsts_logic_ret = PWRSTS_OFF_RET,
 	.flags		  = PWRDM_HAS_HDWR_SAR, /* for USBTLL only */


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

* [PATCH 3/3] omap: 3630: disable TLL SAR on 3630 ES1
@ 2010-08-04 11:33   ` Tony Lindgren
  0 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2010-08-04 11:33 UTC (permalink / raw)
  To: linux-arm-kernel

From: Anand Gadiyar <gadiyar@ti.com>

USBTLL Save-and-Restore is broken in 3630 ES1.0. Having it
enabled could result in incorrect register restores as
the OMAP exits off-mode. This could potentially result in
unexpected wakeup events.

(Refer 3630 errata ID i579)

This is fixed in ES1.1. So disable it for ES1.0s.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/powerdomains34xx.h |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/powerdomains34xx.h b/arch/arm/mach-omap2/powerdomains34xx.h
index bd87112..fa90486 100644
--- a/arch/arm/mach-omap2/powerdomains34xx.h
+++ b/arch/arm/mach-omap2/powerdomains34xx.h
@@ -75,12 +75,19 @@ static struct powerdomain mpu_3xxx_pwrdm = {
 	},
 };
 
+/*
+ * The USBTLL Save-and-Restore mechanism is broken on
+ * 3430s upto ES3.0 and 3630ES1.0. Hence this feature
+ * needs to be disabled on these chips.
+ * Refer: 3430 errata ID i459 and 3630 errata ID i579
+ */
 static struct powerdomain core_3xxx_pre_es3_1_pwrdm = {
 	.name		  = "core_pwrdm",
 	.prcm_offs	  = CORE_MOD,
 	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
 					   CHIP_IS_OMAP3430ES2 |
-					   CHIP_IS_OMAP3430ES3_0),
+					   CHIP_IS_OMAP3430ES3_0 |
+					   CHIP_IS_OMAP3630ES1),
 	.pwrsts		  = PWRSTS_OFF_RET_ON,
 	.pwrsts_logic_ret = PWRSTS_OFF_RET,
 	.banks		  = 2,
@@ -97,7 +104,8 @@ static struct powerdomain core_3xxx_pre_es3_1_pwrdm = {
 static struct powerdomain core_3xxx_es3_1_pwrdm = {
 	.name		  = "core_pwrdm",
 	.prcm_offs	  = CORE_MOD,
-	.omap_chip	  = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES3_1),
+	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1 |
+					  CHIP_GE_OMAP3630ES1_1),
 	.pwrsts		  = PWRSTS_OFF_RET_ON,
 	.pwrsts_logic_ret = PWRSTS_OFF_RET,
 	.flags		  = PWRDM_HAS_HDWR_SAR, /* for USBTLL only */

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

* Re: [PATCH 2/3] OMAP3630: Add ES1.1 and ES1.2 detection
  2010-08-04 11:33   ` Tony Lindgren
@ 2010-08-04 19:02     ` Nishanth Menon
  -1 siblings, 0 replies; 12+ messages in thread
From: Nishanth Menon @ 2010-08-04 19:02 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-arm-kernel, G, Manjunath Kondaiah, linux-omap, Gadiyar, Anand

Tony Lindgren had written, on 08/04/2010 06:33 AM, the following:
> From: Anand Gadiyar <gadiyar@ti.com>
> 
> Add revision detection for ES1.1 and ES1.2. Set default
> revision as ES1.2.
> 
> Add CHIP_GE_OMAP3630ES1_1 to detect revisions 1.1 and later.
> This is needed for at least one feature that is broken in
> 3630ES1.0 but exists on older (3430 ES3.1) and newer revisions.
> 
> Additionally, update some of the CHIP_GE_* macros to use other
> macros for ease of maintenance.
> 
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Manjunatha GK <manjugk@ti.com>
> [tony@atomide.com: update to remove fallthrough handling]
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/mach-omap2/id.c              |   28 +++++++++++++++++++++++++---
>  arch/arm/plat-omap/include/plat/cpu.h |   15 +++++++++++----
>  2 files changed, 36 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index fd1904b..e8256a2 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -269,11 +269,27 @@ static void __init omap3_check_revision(void)
>  		omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
>  		break;
>  	case 0xb891:
> -	/* FALLTHROUGH */
> +		/* Handle 36xx devices */
> +		omap_chip.oc |= CHIP_IS_OMAP3630ES1;
> +
> +		switch(rev) {
> +		case 0: /* Take care of early samples */
> +			omap_revision = OMAP3630_REV_ES1_0;
> +			break;
> +		case 1:
> +			omap_revision = OMAP3630_REV_ES1_1;
> +			omap_chip.oc |= CHIP_IS_OMAP3630ES1_1;
> +			break;
> +		case 2:
> +		default:
> +			omap_revision =  OMAP3630_REV_ES1_2;
> +			omap_chip.oc |= CHIP_IS_OMAP3630ES1_2;
> +			break;
> +		}

we need to add a break here. to jump out of the main switch statement.
currently with ES1.0 3630, it reports as 3630 ES1.2

Tested and verified on SDP3630 with OMAP3630 ES1.0

>  	default:
>  		/* Unknown default to latest silicon rev as default*/
> -		omap_revision = OMAP3630_REV_ES1_0;
> -		omap_chip.oc |= CHIP_IS_OMAP3630ES1;
> +		omap_revision =  OMAP3630_REV_ES1_2;
> +		omap_chip.oc |= CHIP_IS_OMAP3630ES1_2;
>  	}
>  }
>  
> @@ -349,6 +365,12 @@ static void __init omap3_cpuinfo(void)
>  	case OMAP_REVBITS_00:
>  		strcpy(cpu_rev, "1.0");
>  		break;
> +	case OMAP_REVBITS_01:
> +		strcpy(cpu_rev, "1.1");
> +		break;
> +	case OMAP_REVBITS_02:
> +		strcpy(cpu_rev, "1.2");
> +		break;
>  	case OMAP_REVBITS_10:
>  		strcpy(cpu_rev, "2.0");
>  		break;
> diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
> index aa2f4f0..2e2ae53 100644
> --- a/arch/arm/plat-omap/include/plat/cpu.h
> +++ b/arch/arm/plat-omap/include/plat/cpu.h
> @@ -66,6 +66,8 @@ unsigned int omap_rev(void);
>   * family. This difference can be handled separately.
>   */
>  #define OMAP_REVBITS_00		0x00
> +#define OMAP_REVBITS_01		0x01
> +#define OMAP_REVBITS_02		0x02
>  #define OMAP_REVBITS_10		0x10
>  #define OMAP_REVBITS_20		0x20
>  #define OMAP_REVBITS_30		0x30
> @@ -376,6 +378,8 @@ IS_OMAP_TYPE(3517, 0x3517)
>  #define OMAP3430_REV_ES3_1_2	0x34305034
>  
>  #define OMAP3630_REV_ES1_0	0x36300034
> +#define OMAP3630_REV_ES1_1	0x36300134
> +#define OMAP3630_REV_ES1_2	0x36300234
>  
>  #define OMAP35XX_CLASS		0x35000034
>  #define OMAP3503_REV(v)		(OMAP35XX_CLASS | (0x3503 << 16) | (v << 8))
> @@ -411,6 +415,8 @@ IS_OMAP_TYPE(3517, 0x3517)
>  #define CHIP_IS_OMAP3430ES3_1		(1 << 6)
>  #define CHIP_IS_OMAP3630ES1		(1 << 7)
>  #define CHIP_IS_OMAP4430ES1		(1 << 8)
> +#define CHIP_IS_OMAP3630ES1_1           (1 << 9)
> +#define CHIP_IS_OMAP3630ES1_2           (1 << 10)
>  
>  #define CHIP_IS_OMAP24XX		(CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
>  
> @@ -424,11 +430,12 @@ IS_OMAP_TYPE(3517, 0x3517)
>   */
>  #define CHIP_GE_OMAP3430ES2		(CHIP_IS_OMAP3430ES2 | \
>  					 CHIP_IS_OMAP3430ES3_0 | \
> -					 CHIP_IS_OMAP3430ES3_1 | \
> -					 CHIP_IS_OMAP3630ES1)
> +					 CHIP_GE_OMAP3430ES3_1)
>  #define CHIP_GE_OMAP3430ES3_1		(CHIP_IS_OMAP3430ES3_1 | \
> -					 CHIP_IS_OMAP3630ES1)
> -
> +					 CHIP_IS_OMAP3630ES1 | \
> +					 CHIP_GE_OMAP3630ES1_1)
> +#define CHIP_GE_OMAP3630ES1_1		(CHIP_IS_OMAP3630ES1_1 | \
> +					 CHIP_IS_OMAP3630ES1_2)
>  
>  int omap_chip_is(struct omap_chip_id oci);
>  void omap2_check_revision(void);
> 


-- 
Regards,
Nishanth Menon

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

* [PATCH 2/3] OMAP3630: Add ES1.1 and ES1.2 detection
@ 2010-08-04 19:02     ` Nishanth Menon
  0 siblings, 0 replies; 12+ messages in thread
From: Nishanth Menon @ 2010-08-04 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Tony Lindgren had written, on 08/04/2010 06:33 AM, the following:
> From: Anand Gadiyar <gadiyar@ti.com>
> 
> Add revision detection for ES1.1 and ES1.2. Set default
> revision as ES1.2.
> 
> Add CHIP_GE_OMAP3630ES1_1 to detect revisions 1.1 and later.
> This is needed for at least one feature that is broken in
> 3630ES1.0 but exists on older (3430 ES3.1) and newer revisions.
> 
> Additionally, update some of the CHIP_GE_* macros to use other
> macros for ease of maintenance.
> 
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Manjunatha GK <manjugk@ti.com>
> [tony at atomide.com: update to remove fallthrough handling]
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/mach-omap2/id.c              |   28 +++++++++++++++++++++++++---
>  arch/arm/plat-omap/include/plat/cpu.h |   15 +++++++++++----
>  2 files changed, 36 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index fd1904b..e8256a2 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -269,11 +269,27 @@ static void __init omap3_check_revision(void)
>  		omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
>  		break;
>  	case 0xb891:
> -	/* FALLTHROUGH */
> +		/* Handle 36xx devices */
> +		omap_chip.oc |= CHIP_IS_OMAP3630ES1;
> +
> +		switch(rev) {
> +		case 0: /* Take care of early samples */
> +			omap_revision = OMAP3630_REV_ES1_0;
> +			break;
> +		case 1:
> +			omap_revision = OMAP3630_REV_ES1_1;
> +			omap_chip.oc |= CHIP_IS_OMAP3630ES1_1;
> +			break;
> +		case 2:
> +		default:
> +			omap_revision =  OMAP3630_REV_ES1_2;
> +			omap_chip.oc |= CHIP_IS_OMAP3630ES1_2;
> +			break;
> +		}

we need to add a break here. to jump out of the main switch statement.
currently with ES1.0 3630, it reports as 3630 ES1.2

Tested and verified on SDP3630 with OMAP3630 ES1.0

>  	default:
>  		/* Unknown default to latest silicon rev as default*/
> -		omap_revision = OMAP3630_REV_ES1_0;
> -		omap_chip.oc |= CHIP_IS_OMAP3630ES1;
> +		omap_revision =  OMAP3630_REV_ES1_2;
> +		omap_chip.oc |= CHIP_IS_OMAP3630ES1_2;
>  	}
>  }
>  
> @@ -349,6 +365,12 @@ static void __init omap3_cpuinfo(void)
>  	case OMAP_REVBITS_00:
>  		strcpy(cpu_rev, "1.0");
>  		break;
> +	case OMAP_REVBITS_01:
> +		strcpy(cpu_rev, "1.1");
> +		break;
> +	case OMAP_REVBITS_02:
> +		strcpy(cpu_rev, "1.2");
> +		break;
>  	case OMAP_REVBITS_10:
>  		strcpy(cpu_rev, "2.0");
>  		break;
> diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
> index aa2f4f0..2e2ae53 100644
> --- a/arch/arm/plat-omap/include/plat/cpu.h
> +++ b/arch/arm/plat-omap/include/plat/cpu.h
> @@ -66,6 +66,8 @@ unsigned int omap_rev(void);
>   * family. This difference can be handled separately.
>   */
>  #define OMAP_REVBITS_00		0x00
> +#define OMAP_REVBITS_01		0x01
> +#define OMAP_REVBITS_02		0x02
>  #define OMAP_REVBITS_10		0x10
>  #define OMAP_REVBITS_20		0x20
>  #define OMAP_REVBITS_30		0x30
> @@ -376,6 +378,8 @@ IS_OMAP_TYPE(3517, 0x3517)
>  #define OMAP3430_REV_ES3_1_2	0x34305034
>  
>  #define OMAP3630_REV_ES1_0	0x36300034
> +#define OMAP3630_REV_ES1_1	0x36300134
> +#define OMAP3630_REV_ES1_2	0x36300234
>  
>  #define OMAP35XX_CLASS		0x35000034
>  #define OMAP3503_REV(v)		(OMAP35XX_CLASS | (0x3503 << 16) | (v << 8))
> @@ -411,6 +415,8 @@ IS_OMAP_TYPE(3517, 0x3517)
>  #define CHIP_IS_OMAP3430ES3_1		(1 << 6)
>  #define CHIP_IS_OMAP3630ES1		(1 << 7)
>  #define CHIP_IS_OMAP4430ES1		(1 << 8)
> +#define CHIP_IS_OMAP3630ES1_1           (1 << 9)
> +#define CHIP_IS_OMAP3630ES1_2           (1 << 10)
>  
>  #define CHIP_IS_OMAP24XX		(CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
>  
> @@ -424,11 +430,12 @@ IS_OMAP_TYPE(3517, 0x3517)
>   */
>  #define CHIP_GE_OMAP3430ES2		(CHIP_IS_OMAP3430ES2 | \
>  					 CHIP_IS_OMAP3430ES3_0 | \
> -					 CHIP_IS_OMAP3430ES3_1 | \
> -					 CHIP_IS_OMAP3630ES1)
> +					 CHIP_GE_OMAP3430ES3_1)
>  #define CHIP_GE_OMAP3430ES3_1		(CHIP_IS_OMAP3430ES3_1 | \
> -					 CHIP_IS_OMAP3630ES1)
> -
> +					 CHIP_IS_OMAP3630ES1 | \
> +					 CHIP_GE_OMAP3630ES1_1)
> +#define CHIP_GE_OMAP3630ES1_1		(CHIP_IS_OMAP3630ES1_1 | \
> +					 CHIP_IS_OMAP3630ES1_2)
>  
>  int omap_chip_is(struct omap_chip_id oci);
>  void omap2_check_revision(void);
> 


-- 
Regards,
Nishanth Menon

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

* Re: [PATCH 2/3] OMAP3630: Add ES1.1 and ES1.2 detection
  2010-08-04 19:02     ` Nishanth Menon
@ 2010-08-05  9:36       ` Tony Lindgren
  -1 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2010-08-05  9:36 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: linux-arm-kernel, G, Manjunath Kondaiah, linux-omap, Gadiyar, Anand

* Nishanth Menon <nm@ti.com> [100804 21:55]:
> Tony Lindgren had written, on 08/04/2010 06:33 AM, the following:
> >From: Anand Gadiyar <gadiyar@ti.com>
> >+		default:
> >+			omap_revision =  OMAP3630_REV_ES1_2;
> >+			omap_chip.oc |= CHIP_IS_OMAP3630ES1_2;
> >+			break;
> >+		}
> 
> we need to add a break here. to jump out of the main switch statement.
> currently with ES1.0 3630, it reports as 3630 ES1.2

Argh.. It's merged already, care to do another patch
to fix this?
 
> Tested and verified on SDP3630 with OMAP3630 ES1.0

OK, thanks.

Tony

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

* [PATCH 2/3] OMAP3630: Add ES1.1 and ES1.2 detection
@ 2010-08-05  9:36       ` Tony Lindgren
  0 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2010-08-05  9:36 UTC (permalink / raw)
  To: linux-arm-kernel

* Nishanth Menon <nm@ti.com> [100804 21:55]:
> Tony Lindgren had written, on 08/04/2010 06:33 AM, the following:
> >From: Anand Gadiyar <gadiyar@ti.com>
> >+		default:
> >+			omap_revision =  OMAP3630_REV_ES1_2;
> >+			omap_chip.oc |= CHIP_IS_OMAP3630ES1_2;
> >+			break;
> >+		}
> 
> we need to add a break here. to jump out of the main switch statement.
> currently with ES1.0 3630, it reports as 3630 ES1.2

Argh.. It's merged already, care to do another patch
to fix this?
 
> Tested and verified on SDP3630 with OMAP3630 ES1.0

OK, thanks.

Tony

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

end of thread, other threads:[~2010-08-05  9:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-04 11:32 [PATCH 0/3] Few more omap patches for the 2.6.36 merge window Tony Lindgren
2010-08-04 11:32 ` Tony Lindgren
2010-08-04 11:32 ` [PATCH 1/3] omap: device: improve errors handling Tony Lindgren
2010-08-04 11:32   ` Tony Lindgren
2010-08-04 11:33 ` [PATCH 2/3] OMAP3630: Add ES1.1 and ES1.2 detection Tony Lindgren
2010-08-04 11:33   ` Tony Lindgren
2010-08-04 19:02   ` Nishanth Menon
2010-08-04 19:02     ` Nishanth Menon
2010-08-05  9:36     ` Tony Lindgren
2010-08-05  9:36       ` Tony Lindgren
2010-08-04 11:33 ` [PATCH 3/3] omap: 3630: disable TLL SAR on 3630 ES1 Tony Lindgren
2010-08-04 11:33   ` Tony Lindgren

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.