aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2009-02-05 22:45:25 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-23 09:52:51 -0500
commitd41ad52040dee5043ce6b1d49a1c8864706d2bfd (patch)
tree90543a401c03b84d3a4e2cf36ce622cd625479a2 /arch/arm
parentc0bf31320dea2cbcbab1f53ee15a8520f762409b (diff)
[ARM] OMAP3: update ES level flags to discriminate between post-ES2 revisions
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> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/clockdomains.h6
-rw-r--r--arch/arm/mach-omap2/id.c7
-rw-r--r--arch/arm/mach-omap2/powerdomains34xx.h6
-rw-r--r--arch/arm/plat-omap/include/mach/cpu.h26
4 files changed, 32 insertions, 13 deletions
diff --git a/arch/arm/mach-omap2/clockdomains.h b/arch/arm/mach-omap2/clockdomains.h
index d7db796403dc..281d5da19188 100644
--- a/arch/arm/mach-omap2/clockdomains.h
+++ b/arch/arm/mach-omap2/clockdomains.h
@@ -182,7 +182,7 @@ static struct clockdomain sgx_clkdm = {
182 .pwrdm = { .name = "sgx_pwrdm" }, 182 .pwrdm = { .name = "sgx_pwrdm" },
183 .flags = CLKDM_CAN_HWSUP_SWSUP, 183 .flags = CLKDM_CAN_HWSUP_SWSUP,
184 .clktrctrl_mask = OMAP3430ES2_CLKTRCTRL_SGX_MASK, 184 .clktrctrl_mask = OMAP3430ES2_CLKTRCTRL_SGX_MASK,
185 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2), 185 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
186}; 186};
187 187
188/* 188/*
@@ -237,7 +237,7 @@ static struct clockdomain usbhost_clkdm = {
237 .pwrdm = { .name = "usbhost_pwrdm" }, 237 .pwrdm = { .name = "usbhost_pwrdm" },
238 .flags = CLKDM_CAN_HWSUP_SWSUP, 238 .flags = CLKDM_CAN_HWSUP_SWSUP,
239 .clktrctrl_mask = OMAP3430ES2_CLKTRCTRL_USBHOST_MASK, 239 .clktrctrl_mask = OMAP3430ES2_CLKTRCTRL_USBHOST_MASK,
240 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2), 240 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
241}; 241};
242 242
243static struct clockdomain per_clkdm = { 243static struct clockdomain per_clkdm = {
@@ -287,7 +287,7 @@ static struct clockdomain dpll4_clkdm = {
287static struct clockdomain dpll5_clkdm = { 287static struct clockdomain dpll5_clkdm = {
288 .name = "dpll5_clkdm", 288 .name = "dpll5_clkdm",
289 .pwrdm = { .name = "dpll5_pwrdm" }, 289 .pwrdm = { .name = "dpll5_pwrdm" },
290 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2), 290 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
291}; 291};
292 292
293#endif /* CONFIG_ARCH_OMAP34XX */ 293#endif /* CONFIG_ARCH_OMAP34XX */
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index b52a02fc7cd6..34b5914e0f8b 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)
217 omap_chip.oc = CHIP_IS_OMAP3430; 217 omap_chip.oc = CHIP_IS_OMAP3430;
218 if (omap_rev() == OMAP3430_REV_ES1_0) 218 if (omap_rev() == OMAP3430_REV_ES1_0)
219 omap_chip.oc |= CHIP_IS_OMAP3430ES1; 219 omap_chip.oc |= CHIP_IS_OMAP3430ES1;
220 else if (omap_rev() > OMAP3430_REV_ES1_0) 220 else if (omap_rev() >= OMAP3430_REV_ES2_0 &&
221 omap_rev() <= OMAP3430_REV_ES2_1)
221 omap_chip.oc |= CHIP_IS_OMAP3430ES2; 222 omap_chip.oc |= CHIP_IS_OMAP3430ES2;
223 else if (omap_rev() == OMAP3430_REV_ES3_0)
224 omap_chip.oc |= CHIP_IS_OMAP3430ES3_0;
225 else if (omap_rev() == OMAP3430_REV_ES3_1)
226 omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
222 } else { 227 } else {
223 pr_err("Uninitialized omap_chip, please fix!\n"); 228 pr_err("Uninitialized omap_chip, please fix!\n");
224 } 229 }
diff --git a/arch/arm/mach-omap2/powerdomains34xx.h b/arch/arm/mach-omap2/powerdomains34xx.h
index 15c346c627dd..78acfce8bbdc 100644
--- a/arch/arm/mach-omap2/powerdomains34xx.h
+++ b/arch/arm/mach-omap2/powerdomains34xx.h
@@ -244,7 +244,7 @@ static struct powerdomain dss_pwrdm = {
244static struct powerdomain sgx_pwrdm = { 244static struct powerdomain sgx_pwrdm = {
245 .name = "sgx_pwrdm", 245 .name = "sgx_pwrdm",
246 .prcm_offs = OMAP3430ES2_SGX_MOD, 246 .prcm_offs = OMAP3430ES2_SGX_MOD,
247 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2), 247 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
248 .wkdep_srcs = gfx_sgx_wkdeps, 248 .wkdep_srcs = gfx_sgx_wkdeps,
249 .sleepdep_srcs = cam_gfx_sleepdeps, 249 .sleepdep_srcs = cam_gfx_sleepdeps,
250 /* XXX This is accurate for 3430 SGX, but what about GFX? */ 250 /* XXX This is accurate for 3430 SGX, but what about GFX? */
@@ -312,7 +312,7 @@ static struct powerdomain neon_pwrdm = {
312static struct powerdomain usbhost_pwrdm = { 312static struct powerdomain usbhost_pwrdm = {
313 .name = "usbhost_pwrdm", 313 .name = "usbhost_pwrdm",
314 .prcm_offs = OMAP3430ES2_USBHOST_MOD, 314 .prcm_offs = OMAP3430ES2_USBHOST_MOD,
315 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2), 315 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
316 .wkdep_srcs = per_usbhost_wkdeps, 316 .wkdep_srcs = per_usbhost_wkdeps,
317 .sleepdep_srcs = dss_per_usbhost_sleepdeps, 317 .sleepdep_srcs = dss_per_usbhost_sleepdeps,
318 .pwrsts = PWRSTS_OFF_RET_ON, 318 .pwrsts = PWRSTS_OFF_RET_ON,
@@ -354,7 +354,7 @@ static struct powerdomain dpll4_pwrdm = {
354static struct powerdomain dpll5_pwrdm = { 354static struct powerdomain dpll5_pwrdm = {
355 .name = "dpll5_pwrdm", 355 .name = "dpll5_pwrdm",
356 .prcm_offs = PLL_MOD, 356 .prcm_offs = PLL_MOD,
357 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2), 357 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
358}; 358};
359 359
360 360
diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-omap/include/mach/cpu.h
index a8e1178a9468..4166a970daa4 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)
355 * use omap_chip_is(). 355 * use omap_chip_is().
356 * 356 *
357 */ 357 */
358#define CHIP_IS_OMAP2420 (1 << 0) 358#define CHIP_IS_OMAP2420 (1 << 0)
359#define CHIP_IS_OMAP2430 (1 << 1) 359#define CHIP_IS_OMAP2430 (1 << 1)
360#define CHIP_IS_OMAP3430 (1 << 2) 360#define CHIP_IS_OMAP3430 (1 << 2)
361#define CHIP_IS_OMAP3430ES1 (1 << 3) 361#define CHIP_IS_OMAP3430ES1 (1 << 3)
362#define CHIP_IS_OMAP3430ES2 (1 << 4) 362#define CHIP_IS_OMAP3430ES2 (1 << 4)
363#define CHIP_IS_OMAP3430ES3_0 (1 << 5)
364#define CHIP_IS_OMAP3430ES3_1 (1 << 6)
365
366#define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
367
368/*
369 * "GE" here represents "greater than or equal to" in terms of ES
370 * levels. So CHIP_GE_OMAP3430ES2 is intended to match all OMAP3430
371 * chips at ES2 and beyond, but not, for example, any OMAP lines after
372 * OMAP3.
373 */
374#define CHIP_GE_OMAP3430ES2 (CHIP_IS_OMAP3430ES2 | \
375 CHIP_IS_OMAP3430ES3_0 | \
376 CHIP_IS_OMAP3430ES3_1)
377#define CHIP_GE_OMAP3430ES3_1 (CHIP_IS_OMAP3430ES3_1)
363 378
364#define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
365 379
366int omap_chip_is(struct omap_chip_id oci); 380int omap_chip_is(struct omap_chip_id oci);
367int omap_type(void); 381int omap_type(void);