public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] OMAP3: add ES3.1 support; disable USBTLL SAR < ES3.1
@ 2009-02-06  3:45 Paul Walmsley
  2009-02-06  3:45 ` [PATCH 1/3] ARM: OMAP: Fix omap34xx revision detection for ES3.1 Paul Walmsley
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Paul Walmsley @ 2009-02-06  3:45 UTC (permalink / raw)
  To: linux; +Cc: linux-omap, linux-arm-kernel, linux-kernel, r-woodruff2

Hello Russell,

this series adds OMAP3 ES3.1 support, including boot-time TAP detection and
omap_chip updates.  It also blocks USBTLL hardware save-and-restore (SAR)
support on revisions < ES3.1, due to chip errata.

To do this, the semantics of the omap_chip system had to be altered slightly.
Previously, CHIP_IS_OMAP3430ES2 would also evaluate true on ES3 devices.
Now it will only evaluate to true on ES2.x devices.  Features that are
present on revisions >= ES2 are now marked with CHIP_GE_OMAP3430ES2 ("GE"
meaning "greater than or equal to").

This series obsoletes patch B 06, and is intended to be applied after
all of the previously-sent patches.

Tested on BeagleBoard ES2.1.


- Paul


---

Paul Walmsley (2):
      OMAP3 powerdomains: make USBTLL SAR only available on ES3.1 and beyond
      OMAP3: update ES level flags to discriminate between post-ES2 revisions

Tony Lindgren (1):
      ARM: OMAP: Fix omap34xx revision detection for ES3.1


 arch/arm/mach-omap2/clockdomains.h     |    6 +++---
 arch/arm/mach-omap2/id.c               |   13 +++++++++++--
 arch/arm/mach-omap2/powerdomains.h     |    4 ++--
 arch/arm/mach-omap2/powerdomains34xx.h |   16 +++++++++-------
 arch/arm/plat-omap/include/mach/cpu.h  |   27 +++++++++++++++++++++------
 5 files changed, 46 insertions(+), 20 deletions(-)

  text    data     bss     dec     hex filename
3241338  165504  100880 3507722  35860a vmlinux.beagle.orig
3241342  165504  100880 3507726  35860e vmlinux.beagle


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

* [PATCH 1/3] ARM: OMAP: Fix omap34xx revision detection for ES3.1
  2009-02-06  3:45 [PATCH 0/3] OMAP3: add ES3.1 support; disable USBTLL SAR < ES3.1 Paul Walmsley
@ 2009-02-06  3:45 ` Paul Walmsley
  2009-02-13 23:01   ` Tony Lindgren
  2009-02-06  3:45 ` [PATCH 2/3] OMAP3: update ES level flags to discriminate between post-ES2 revisions Paul Walmsley
  2009-02-06  3:45 ` [PATCH 3/3] OMAP3 powerdomains: make USBTLL SAR only available on ES3.1 and beyond Paul Walmsley
  2 siblings, 1 reply; 5+ messages in thread
From: Paul Walmsley @ 2009-02-06  3:45 UTC (permalink / raw)
  To: linux
  Cc: linux-omap, linux-arm-kernel, linux-kernel, Tony Lindgren,
	Paul Walmsley

From: Tony Lindgren <tony@atomide.com>

Fix omap34xx revision detection for ES3.1

linux-omap source commit is 1bafdfd33cc7a2b053ca705cf8623e1ae6cd4c52.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/id.c              |    6 +++++-
 arch/arm/plat-omap/include/mach/cpu.h |    1 +
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index b0f8e7d..b52a02f 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -172,9 +172,13 @@ void __init omap34xx_check_revision(void)
 			omap_revision = OMAP3430_REV_ES3_0;
 			rev_name = "ES3.0";
 			break;
+		case 4:
+			omap_revision = OMAP3430_REV_ES3_1;
+			rev_name = "ES3.1";
+			break;
 		default:
 			/* Use the latest known revision as default */
-			omap_revision = OMAP3430_REV_ES3_0;
+			omap_revision = OMAP3430_REV_ES3_1;
 			rev_name = "Unknown revision\n";
 		}
 	}
diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-omap/include/mach/cpu.h
index b2062f1..a8e1178 100644
--- a/arch/arm/plat-omap/include/mach/cpu.h
+++ b/arch/arm/plat-omap/include/mach/cpu.h
@@ -339,6 +339,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define OMAP3430_REV_ES2_0	0x34301034
 #define OMAP3430_REV_ES2_1	0x34302034
 #define OMAP3430_REV_ES3_0	0x34303034
+#define OMAP3430_REV_ES3_1	0x34304034
 
 /*
  * omap_chip bits



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

* [PATCH 2/3] OMAP3: update ES level flags to discriminate between post-ES2 revisions
  2009-02-06  3:45 [PATCH 0/3] OMAP3: add ES3.1 support; disable USBTLL SAR < ES3.1 Paul Walmsley
  2009-02-06  3:45 ` [PATCH 1/3] ARM: OMAP: Fix omap34xx revision detection for ES3.1 Paul Walmsley
@ 2009-02-06  3:45 ` Paul Walmsley
  2009-02-06  3:45 ` [PATCH 3/3] OMAP3 powerdomains: make USBTLL SAR only available on ES3.1 and beyond Paul Walmsley
  2 siblings, 0 replies; 5+ messages in thread
From: Paul Walmsley @ 2009-02-06  3:45 UTC (permalink / raw)
  To: linux; +Cc: linux-omap, linux-arm-kernel, linux-kernel, paul

Some OMAP3 chip behaviors change in ES levels after ES2.  Modify the
existing omap_chip flags to add options for ES3.0 and ES3.1.

Add a new macro, CHIP_GE_OMAP3430ES2, to cover ES levels from ES2
onwards - a common pattern for OMAP3 features.  Update all current
users of the omap_chip macros to use this new macro.

Also add CHIP_GE_OMAP3430ES3_1 to cover the USBTLL SAR errata case
(described and fixed in the following patch)

Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/clockdomains.h     |    6 +++---
 arch/arm/mach-omap2/id.c               |    7 ++++++-
 arch/arm/mach-omap2/powerdomains34xx.h |    8 ++++----
 arch/arm/plat-omap/include/mach/cpu.h  |   26 ++++++++++++++++++++------
 4 files changed, 33 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-omap2/clockdomains.h b/arch/arm/mach-omap2/clockdomains.h
index b29035e..81b9b2b 100644
--- a/arch/arm/mach-omap2/clockdomains.h
+++ b/arch/arm/mach-omap2/clockdomains.h
@@ -185,7 +185,7 @@ static struct clockdomain sgx_clkdm = {
 	.pwrdm		= { .name = "sgx_pwrdm" },
 	.flags		= CLKDM_CAN_HWSUP_SWSUP,
 	.clktrctrl_mask = OMAP3430ES2_CLKTRCTRL_SGX_MASK,
-	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2),
+	.omap_chip	= OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
 };
 
 /*
@@ -240,7 +240,7 @@ static struct clockdomain usbhost_clkdm = {
 	.pwrdm		= { .name = "usbhost_pwrdm" },
 	.flags		= CLKDM_CAN_HWSUP_SWSUP,
 	.clktrctrl_mask = OMAP3430ES2_CLKTRCTRL_USBHOST_MASK,
-	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2),
+	.omap_chip	= OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
 };
 
 static struct clockdomain per_clkdm = {
@@ -290,7 +290,7 @@ static struct clockdomain dpll4_clkdm = {
 static struct clockdomain dpll5_clkdm = {
 	.name		= "dpll5_clkdm",
 	.pwrdm		= { .name = "dpll5_pwrdm" },
-	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2),
+	.omap_chip	= OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
 };
 
 #endif   /* CONFIG_ARCH_OMAP34XX */
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index b52a02f..34b5914 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -217,8 +217,13 @@ void __init omap2_check_revision(void)
 		omap_chip.oc = CHIP_IS_OMAP3430;
 		if (omap_rev() == OMAP3430_REV_ES1_0)
 			omap_chip.oc |= CHIP_IS_OMAP3430ES1;
-		else if (omap_rev() > OMAP3430_REV_ES1_0)
+		else if (omap_rev() >= OMAP3430_REV_ES2_0 &&
+			 omap_rev() <= OMAP3430_REV_ES2_1)
 			omap_chip.oc |= CHIP_IS_OMAP3430ES2;
+		else if (omap_rev() == OMAP3430_REV_ES3_0)
+			omap_chip.oc |= CHIP_IS_OMAP3430ES3_0;
+		else if (omap_rev() == OMAP3430_REV_ES3_1)
+			omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
 	} else {
 		pr_err("Uninitialized omap_chip, please fix!\n");
 	}
diff --git a/arch/arm/mach-omap2/powerdomains34xx.h b/arch/arm/mach-omap2/powerdomains34xx.h
index edfad42..6b9d126 100644
--- a/arch/arm/mach-omap2/powerdomains34xx.h
+++ b/arch/arm/mach-omap2/powerdomains34xx.h
@@ -221,7 +221,7 @@ static struct powerdomain core_34xx_es1_pwrdm = {
 static struct powerdomain core_34xx_es2_pwrdm = {
 	.name		  = "core_pwrdm",
 	.prcm_offs	  = CORE_MOD,
-	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2),
+	.omap_chip	  = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
 	.pwrsts		  = PWRSTS_OFF_RET_ON,
 	.dep_bit	  = OMAP3430_EN_CORE_SHIFT,
 	.flags		  = PWRDM_HAS_HDWR_SAR, /* for USBTLL only */
@@ -263,7 +263,7 @@ static struct powerdomain dss_pwrdm = {
 static struct powerdomain sgx_pwrdm = {
 	.name		  = "sgx_pwrdm",
 	.prcm_offs	  = OMAP3430ES2_SGX_MOD,
-	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2),
+	.omap_chip	  = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
 	.wkdep_srcs	  = gfx_sgx_wkdeps,
 	.sleepdep_srcs	  = cam_gfx_sleepdeps,
 	/* XXX This is accurate for 3430 SGX, but what about GFX? */
@@ -331,7 +331,7 @@ static struct powerdomain neon_pwrdm = {
 static struct powerdomain usbhost_pwrdm = {
 	.name		  = "usbhost_pwrdm",
 	.prcm_offs	  = OMAP3430ES2_USBHOST_MOD,
-	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2),
+	.omap_chip	  = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
 	.wkdep_srcs	  = per_usbhost_wkdeps,
 	.sleepdep_srcs	  = dss_per_usbhost_sleepdeps,
 	.pwrsts		  = PWRSTS_OFF_RET_ON,
@@ -373,7 +373,7 @@ static struct powerdomain dpll4_pwrdm = {
 static struct powerdomain dpll5_pwrdm = {
 	.name		= "dpll5_pwrdm",
 	.prcm_offs	= PLL_MOD,
-	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2),
+	.omap_chip	= OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
 };
 
 
diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-omap/include/mach/cpu.h
index a8e1178..4166a97 100644
--- a/arch/arm/plat-omap/include/mach/cpu.h
+++ b/arch/arm/plat-omap/include/mach/cpu.h
@@ -355,13 +355,27 @@ IS_OMAP_TYPE(3430, 0x3430)
  * use omap_chip_is().
  *
  */
-#define CHIP_IS_OMAP2420       (1 << 0)
-#define CHIP_IS_OMAP2430       (1 << 1)
-#define CHIP_IS_OMAP3430       (1 << 2)
-#define CHIP_IS_OMAP3430ES1    (1 << 3)
-#define CHIP_IS_OMAP3430ES2    (1 << 4)
+#define CHIP_IS_OMAP2420		(1 << 0)
+#define CHIP_IS_OMAP2430		(1 << 1)
+#define CHIP_IS_OMAP3430		(1 << 2)
+#define CHIP_IS_OMAP3430ES1		(1 << 3)
+#define CHIP_IS_OMAP3430ES2		(1 << 4)
+#define CHIP_IS_OMAP3430ES3_0		(1 << 5)
+#define CHIP_IS_OMAP3430ES3_1		(1 << 6)
+
+#define CHIP_IS_OMAP24XX		(CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
+
+/*
+ * "GE" here represents "greater than or equal to" in terms of ES
+ * levels.  So CHIP_GE_OMAP3430ES2 is intended to match all OMAP3430
+ * chips at ES2 and beyond, but not, for example, any OMAP lines after
+ * OMAP3.
+ */
+#define CHIP_GE_OMAP3430ES2		(CHIP_IS_OMAP3430ES2 | \
+					 CHIP_IS_OMAP3430ES3_0 | \
+					 CHIP_IS_OMAP3430ES3_1)
+#define CHIP_GE_OMAP3430ES3_1		(CHIP_IS_OMAP3430ES3_1)
 
-#define CHIP_IS_OMAP24XX       (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
 
 int omap_chip_is(struct omap_chip_id oci);
 int omap_type(void);



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

* [PATCH 3/3] OMAP3 powerdomains: make USBTLL SAR only available on ES3.1 and beyond
  2009-02-06  3:45 [PATCH 0/3] OMAP3: add ES3.1 support; disable USBTLL SAR < ES3.1 Paul Walmsley
  2009-02-06  3:45 ` [PATCH 1/3] ARM: OMAP: Fix omap34xx revision detection for ES3.1 Paul Walmsley
  2009-02-06  3:45 ` [PATCH 2/3] OMAP3: update ES level flags to discriminate between post-ES2 revisions Paul Walmsley
@ 2009-02-06  3:45 ` Paul Walmsley
  2 siblings, 0 replies; 5+ messages in thread
From: Paul Walmsley @ 2009-02-06  3:45 UTC (permalink / raw)
  To: linux; +Cc: linux-omap, linux-arm-kernel, linux-kernel, paul,
	Richard Woodruff

Richard Woodruff writes that chip errata prevent USBTLL SAR from working
on OMAP3 ES levels before ES3.1:

http://marc.info/?l=linux-arm-kernel&m=123319614808833&w=2

Update the OMAP3 powerdomain structures appropriately.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
---
 arch/arm/mach-omap2/powerdomains.h     |    4 ++--
 arch/arm/mach-omap2/powerdomains34xx.h |   10 ++++++----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/powerdomains.h b/arch/arm/mach-omap2/powerdomains.h
index 51623e2..691470e 100644
--- a/arch/arm/mach-omap2/powerdomains.h
+++ b/arch/arm/mach-omap2/powerdomains.h
@@ -171,8 +171,8 @@ static struct powerdomain *powerdomains_omap[] __initdata = {
 	&iva2_pwrdm,
 	&mpu_34xx_pwrdm,
 	&neon_pwrdm,
-	&core_34xx_es1_pwrdm,
-	&core_34xx_es2_pwrdm,
+	&core_34xx_pre_es3_1_pwrdm,
+	&core_34xx_es3_1_pwrdm,
 	&cam_pwrdm,
 	&dss_pwrdm,
 	&per_pwrdm,
diff --git a/arch/arm/mach-omap2/powerdomains34xx.h b/arch/arm/mach-omap2/powerdomains34xx.h
index 6b9d126..4dcf94b 100644
--- a/arch/arm/mach-omap2/powerdomains34xx.h
+++ b/arch/arm/mach-omap2/powerdomains34xx.h
@@ -200,10 +200,12 @@ static struct powerdomain mpu_34xx_pwrdm = {
 };
 
 /* No wkdeps or sleepdeps for 34xx core apparently */
-static struct powerdomain core_34xx_es1_pwrdm = {
+static struct powerdomain core_34xx_pre_es3_1_pwrdm = {
 	.name		  = "core_pwrdm",
 	.prcm_offs	  = CORE_MOD,
-	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1),
+	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
+					   CHIP_IS_OMAP3430ES2 |
+					   CHIP_IS_OMAP3430ES3_0),
 	.pwrsts		  = PWRSTS_OFF_RET_ON,
 	.dep_bit	  = OMAP3430_EN_CORE_SHIFT,
 	.banks		  = 2,
@@ -218,10 +220,10 @@ static struct powerdomain core_34xx_es1_pwrdm = {
 };
 
 /* No wkdeps or sleepdeps for 34xx core apparently */
-static struct powerdomain core_34xx_es2_pwrdm = {
+static struct powerdomain core_34xx_es3_1_pwrdm = {
 	.name		  = "core_pwrdm",
 	.prcm_offs	  = CORE_MOD,
-	.omap_chip	  = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
+	.omap_chip	  = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES3_1),
 	.pwrsts		  = PWRSTS_OFF_RET_ON,
 	.dep_bit	  = OMAP3430_EN_CORE_SHIFT,
 	.flags		  = PWRDM_HAS_HDWR_SAR, /* for USBTLL only */



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

* Re: [PATCH 1/3] ARM: OMAP: Fix omap34xx revision detection for ES3.1
  2009-02-06  3:45 ` [PATCH 1/3] ARM: OMAP: Fix omap34xx revision detection for ES3.1 Paul Walmsley
@ 2009-02-13 23:01   ` Tony Lindgren
  0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2009-02-13 23:01 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: linux, linux-omap, linux-arm-kernel, linux-kernel

* Paul Walmsley <paul@pwsan.com> [090205 19:52]:
> From: Tony Lindgren <tony@atomide.com>
> 
> Fix omap34xx revision detection for ES3.1
> 
> linux-omap source commit is 1bafdfd33cc7a2b053ca705cf8623e1ae6cd4c52.

Just for reference, this is now in the mainline kernel as 
commit 187e688d237a6df11a2d32e8ac480b6d1fbd40b9.

Tony

> Signed-off-by: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> ---
>  arch/arm/mach-omap2/id.c              |    6 +++++-
>  arch/arm/plat-omap/include/mach/cpu.h |    1 +
>  2 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index b0f8e7d..b52a02f 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -172,9 +172,13 @@ void __init omap34xx_check_revision(void)
>  			omap_revision = OMAP3430_REV_ES3_0;
>  			rev_name = "ES3.0";
>  			break;
> +		case 4:
> +			omap_revision = OMAP3430_REV_ES3_1;
> +			rev_name = "ES3.1";
> +			break;
>  		default:
>  			/* Use the latest known revision as default */
> -			omap_revision = OMAP3430_REV_ES3_0;
> +			omap_revision = OMAP3430_REV_ES3_1;
>  			rev_name = "Unknown revision\n";
>  		}
>  	}
> diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-omap/include/mach/cpu.h
> index b2062f1..a8e1178 100644
> --- a/arch/arm/plat-omap/include/mach/cpu.h
> +++ b/arch/arm/plat-omap/include/mach/cpu.h
> @@ -339,6 +339,7 @@ IS_OMAP_TYPE(3430, 0x3430)
>  #define OMAP3430_REV_ES2_0	0x34301034
>  #define OMAP3430_REV_ES2_1	0x34302034
>  #define OMAP3430_REV_ES3_0	0x34303034
> +#define OMAP3430_REV_ES3_1	0x34304034
>  
>  /*
>   * omap_chip bits
> 
> 

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

end of thread, other threads:[~2009-02-13 23:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-06  3:45 [PATCH 0/3] OMAP3: add ES3.1 support; disable USBTLL SAR < ES3.1 Paul Walmsley
2009-02-06  3:45 ` [PATCH 1/3] ARM: OMAP: Fix omap34xx revision detection for ES3.1 Paul Walmsley
2009-02-13 23:01   ` Tony Lindgren
2009-02-06  3:45 ` [PATCH 2/3] OMAP3: update ES level flags to discriminate between post-ES2 revisions Paul Walmsley
2009-02-06  3:45 ` [PATCH 3/3] OMAP3 powerdomains: make USBTLL SAR only available on ES3.1 and beyond Paul Walmsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox