diff options
author | Tony Lindgren <tony@atomide.com> | 2011-09-15 19:06:11 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-09-15 19:06:11 -0400 |
commit | ceb1c532ba6220900e61ec7073a9234661efa450 (patch) | |
tree | b7c5b94f09a6893625bb12b7795de3d44fece450 /arch/arm/plat-omap | |
parent | 8f5b5a41ebc750ffcc2c410371b2b4998955709e (diff) | |
parent | 00c46b3069c1ee9aa31db3057e9224685af52efa (diff) |
Merge branch 'omap_chip_remove_cleanup_3.2' of git://git.pwsan.com/linux-2.6 into cleanup
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/include/plat/clock.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/cpu.h | 108 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap_hwmod.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/omap_device.c | 3 |
4 files changed, 17 insertions, 98 deletions
diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h index df4b9683f17f..197ca03c3f7d 100644 --- a/arch/arm/plat-omap/include/plat/clock.h +++ b/arch/arm/plat-omap/include/plat/clock.h | |||
@@ -80,8 +80,6 @@ struct clkops { | |||
80 | * | 80 | * |
81 | * @div is the divisor that should be applied to the parent clock's rate | 81 | * @div is the divisor that should be applied to the parent clock's rate |
82 | * to produce the current clock's rate. | 82 | * to produce the current clock's rate. |
83 | * | ||
84 | * XXX @flags probably should be replaced with an struct omap_chip. | ||
85 | */ | 83 | */ |
86 | struct clksel_rate { | 84 | struct clksel_rate { |
87 | u32 val; | 85 | u32 val; |
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 67b3d75884cd..2f9026942229 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h | |||
@@ -44,13 +44,6 @@ | |||
44 | 44 | ||
45 | int omap_type(void); | 45 | int omap_type(void); |
46 | 46 | ||
47 | struct omap_chip_id { | ||
48 | u16 oc; | ||
49 | u8 type; | ||
50 | }; | ||
51 | |||
52 | #define OMAP_CHIP_INIT(x) { .oc = x } | ||
53 | |||
54 | /* | 47 | /* |
55 | * omap_rev bits: | 48 | * omap_rev bits: |
56 | * CPU id bits (0730, 1510, 1710, 2422...) [31:16] | 49 | * CPU id bits (0730, 1510, 1710, 2422...) [31:16] |
@@ -60,19 +53,6 @@ struct omap_chip_id { | |||
60 | unsigned int omap_rev(void); | 53 | unsigned int omap_rev(void); |
61 | 54 | ||
62 | /* | 55 | /* |
63 | * Define CPU revision bits | ||
64 | * | ||
65 | * Verbose meaning of the revision bits may be different for a silicon | ||
66 | * family. This difference can be handled separately. | ||
67 | */ | ||
68 | #define OMAP_REVBITS_00 0x00 | ||
69 | #define OMAP_REVBITS_01 0x01 | ||
70 | #define OMAP_REVBITS_02 0x02 | ||
71 | #define OMAP_REVBITS_03 0x03 | ||
72 | #define OMAP_REVBITS_04 0x04 | ||
73 | #define OMAP_REVBITS_05 0x05 | ||
74 | |||
75 | /* | ||
76 | * Get the CPU revision for OMAP devices | 56 | * Get the CPU revision for OMAP devices |
77 | */ | 57 | */ |
78 | #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) | 58 | #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) |
@@ -262,7 +242,7 @@ IS_OMAP_TYPE(2422, 0x2422) | |||
262 | IS_OMAP_TYPE(2423, 0x2423) | 242 | IS_OMAP_TYPE(2423, 0x2423) |
263 | IS_OMAP_TYPE(2430, 0x2430) | 243 | IS_OMAP_TYPE(2430, 0x2430) |
264 | IS_OMAP_TYPE(3430, 0x3430) | 244 | IS_OMAP_TYPE(3430, 0x3430) |
265 | IS_OMAP_TYPE(3505, 0x3505) | 245 | IS_OMAP_TYPE(3505, 0x3517) |
266 | IS_OMAP_TYPE(3517, 0x3517) | 246 | IS_OMAP_TYPE(3517, 0x3517) |
267 | 247 | ||
268 | #define cpu_is_omap310() 0 | 248 | #define cpu_is_omap310() 0 |
@@ -354,8 +334,9 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
354 | (!omap3_has_sgx()) && \ | 334 | (!omap3_has_sgx()) && \ |
355 | (omap3_has_iva())) | 335 | (omap3_has_iva())) |
356 | # define cpu_is_omap3530() (cpu_is_omap3430()) | 336 | # define cpu_is_omap3530() (cpu_is_omap3430()) |
357 | # define cpu_is_omap3505() is_omap3505() | ||
358 | # define cpu_is_omap3517() is_omap3517() | 337 | # define cpu_is_omap3517() is_omap3517() |
338 | # define cpu_is_omap3505() (cpu_is_omap3517() && \ | ||
339 | !omap3_has_sgx()) | ||
359 | # undef cpu_is_omap3630 | 340 | # undef cpu_is_omap3630 |
360 | # define cpu_is_omap3630() is_omap363x() | 341 | # define cpu_is_omap3630() is_omap363x() |
361 | # define cpu_is_ti816x() is_ti816x() | 342 | # define cpu_is_ti816x() is_ti816x() |
@@ -379,35 +360,31 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
379 | /* Various silicon revisions for omap2 */ | 360 | /* Various silicon revisions for omap2 */ |
380 | #define OMAP242X_CLASS 0x24200024 | 361 | #define OMAP242X_CLASS 0x24200024 |
381 | #define OMAP2420_REV_ES1_0 OMAP242X_CLASS | 362 | #define OMAP2420_REV_ES1_0 OMAP242X_CLASS |
382 | #define OMAP2420_REV_ES2_0 (OMAP242X_CLASS | (OMAP_REVBITS_01 << 8)) | 363 | #define OMAP2420_REV_ES2_0 (OMAP242X_CLASS | (0x1 << 8)) |
383 | 364 | ||
384 | #define OMAP243X_CLASS 0x24300024 | 365 | #define OMAP243X_CLASS 0x24300024 |
385 | #define OMAP2430_REV_ES1_0 OMAP243X_CLASS | 366 | #define OMAP2430_REV_ES1_0 OMAP243X_CLASS |
386 | 367 | ||
387 | #define OMAP343X_CLASS 0x34300034 | 368 | #define OMAP343X_CLASS 0x34300034 |
388 | #define OMAP3430_REV_ES1_0 OMAP343X_CLASS | 369 | #define OMAP3430_REV_ES1_0 OMAP343X_CLASS |
389 | #define OMAP3430_REV_ES2_0 (OMAP343X_CLASS | (OMAP_REVBITS_01 << 8)) | 370 | #define OMAP3430_REV_ES2_0 (OMAP343X_CLASS | (0x1 << 8)) |
390 | #define OMAP3430_REV_ES2_1 (OMAP343X_CLASS | (OMAP_REVBITS_02 << 8)) | 371 | #define OMAP3430_REV_ES2_1 (OMAP343X_CLASS | (0x2 << 8)) |
391 | #define OMAP3430_REV_ES3_0 (OMAP343X_CLASS | (OMAP_REVBITS_03 << 8)) | 372 | #define OMAP3430_REV_ES3_0 (OMAP343X_CLASS | (0x3 << 8)) |
392 | #define OMAP3430_REV_ES3_1 (OMAP343X_CLASS | (OMAP_REVBITS_04 << 8)) | 373 | #define OMAP3430_REV_ES3_1 (OMAP343X_CLASS | (0x4 << 8)) |
393 | #define OMAP3430_REV_ES3_1_2 (OMAP343X_CLASS | (OMAP_REVBITS_05 << 8)) | 374 | #define OMAP3430_REV_ES3_1_2 (OMAP343X_CLASS | (0x5 << 8)) |
394 | 375 | ||
395 | #define OMAP363X_CLASS 0x36300034 | 376 | #define OMAP363X_CLASS 0x36300034 |
396 | #define OMAP3630_REV_ES1_0 OMAP363X_CLASS | 377 | #define OMAP3630_REV_ES1_0 OMAP363X_CLASS |
397 | #define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (OMAP_REVBITS_01 << 8)) | 378 | #define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (0x1 << 8)) |
398 | #define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (OMAP_REVBITS_02 << 8)) | 379 | #define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (0x2 << 8)) |
399 | 380 | ||
400 | #define OMAP35XX_CLASS 0x35000034 | 381 | #define OMAP3517_CLASS 0x35170034 |
401 | #define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8)) | 382 | #define OMAP3517_REV_ES1_0 OMAP3517_CLASS |
402 | #define OMAP3515_REV(v) (OMAP35XX_CLASS | (0x3515 << 16) | (v << 8)) | 383 | #define OMAP3517_REV_ES1_1 (OMAP3517_CLASS | (0x1 << 8)) |
403 | #define OMAP3525_REV(v) (OMAP35XX_CLASS | (0x3525 << 16) | (v << 8)) | ||
404 | #define OMAP3530_REV(v) (OMAP35XX_CLASS | (0x3530 << 16) | (v << 8)) | ||
405 | #define OMAP3505_REV(v) (OMAP35XX_CLASS | (0x3505 << 16) | (v << 8)) | ||
406 | #define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8)) | ||
407 | 384 | ||
408 | #define TI816X_CLASS 0x81600034 | 385 | #define TI816X_CLASS 0x81600034 |
409 | #define TI8168_REV_ES1_0 TI816X_CLASS | 386 | #define TI8168_REV_ES1_0 TI816X_CLASS |
410 | #define TI8168_REV_ES1_1 (TI816X_CLASS | (OMAP_REVBITS_01 << 8)) | 387 | #define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8)) |
411 | 388 | ||
412 | #define OMAP443X_CLASS 0x44300044 | 389 | #define OMAP443X_CLASS 0x44300044 |
413 | #define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8)) | 390 | #define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8)) |
@@ -418,61 +395,6 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
418 | #define OMAP446X_CLASS 0x44600044 | 395 | #define OMAP446X_CLASS 0x44600044 |
419 | #define OMAP4460_REV_ES1_0 (OMAP446X_CLASS | (0x10 << 8)) | 396 | #define OMAP4460_REV_ES1_0 (OMAP446X_CLASS | (0x10 << 8)) |
420 | 397 | ||
421 | /* | ||
422 | * omap_chip bits | ||
423 | * | ||
424 | * CHIP_IS_OMAP{2420,2430,3430} indicate that a particular structure is | ||
425 | * valid on all chips of that type. CHIP_IS_OMAP3430ES{1,2} indicates | ||
426 | * something that is only valid on that particular ES revision. | ||
427 | * | ||
428 | * These bits may be ORed together to indicate structures that are | ||
429 | * available on multiple chip types. | ||
430 | * | ||
431 | * To test whether a particular structure matches the current OMAP chip type, | ||
432 | * use omap_chip_is(). | ||
433 | * | ||
434 | */ | ||
435 | #define CHIP_IS_OMAP2420 (1 << 0) | ||
436 | #define CHIP_IS_OMAP2430 (1 << 1) | ||
437 | #define CHIP_IS_OMAP3430 (1 << 2) | ||
438 | #define CHIP_IS_OMAP3430ES1 (1 << 3) | ||
439 | #define CHIP_IS_OMAP3430ES2 (1 << 4) | ||
440 | #define CHIP_IS_OMAP3430ES3_0 (1 << 5) | ||
441 | #define CHIP_IS_OMAP3430ES3_1 (1 << 6) | ||
442 | #define CHIP_IS_OMAP3630ES1 (1 << 7) | ||
443 | #define CHIP_IS_OMAP4430ES1 (1 << 8) | ||
444 | #define CHIP_IS_OMAP3630ES1_1 (1 << 9) | ||
445 | #define CHIP_IS_OMAP3630ES1_2 (1 << 10) | ||
446 | #define CHIP_IS_OMAP4430ES2 (1 << 11) | ||
447 | #define CHIP_IS_OMAP4430ES2_1 (1 << 12) | ||
448 | #define CHIP_IS_OMAP4430ES2_2 (1 << 13) | ||
449 | #define CHIP_IS_TI816X (1 << 14) | ||
450 | #define CHIP_IS_OMAP4460ES1_0 (1 << 15) | ||
451 | |||
452 | #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) | ||
453 | |||
454 | #define CHIP_IS_OMAP4430 (CHIP_IS_OMAP4430ES1 | \ | ||
455 | CHIP_IS_OMAP4430ES2 | \ | ||
456 | CHIP_IS_OMAP4430ES2_1 | \ | ||
457 | CHIP_IS_OMAP4430ES2_2 | \ | ||
458 | CHIP_IS_OMAP4460ES1_0) | ||
459 | |||
460 | /* | ||
461 | * "GE" here represents "greater than or equal to" in terms of ES | ||
462 | * levels. So CHIP_GE_OMAP3430ES2 is intended to match all OMAP3430 | ||
463 | * chips at ES2 and beyond, but not, for example, any OMAP lines after | ||
464 | * OMAP3. | ||
465 | */ | ||
466 | #define CHIP_GE_OMAP3430ES2 (CHIP_IS_OMAP3430ES2 | \ | ||
467 | CHIP_IS_OMAP3430ES3_0 | \ | ||
468 | CHIP_GE_OMAP3430ES3_1) | ||
469 | #define CHIP_GE_OMAP3430ES3_1 (CHIP_IS_OMAP3430ES3_1 | \ | ||
470 | CHIP_IS_OMAP3630ES1 | \ | ||
471 | CHIP_GE_OMAP3630ES1_1) | ||
472 | #define CHIP_GE_OMAP3630ES1_1 (CHIP_IS_OMAP3630ES1_1 | \ | ||
473 | CHIP_IS_OMAP3630ES1_2) | ||
474 | |||
475 | int omap_chip_is(struct omap_chip_id oci); | ||
476 | void omap2_check_revision(void); | 398 | void omap2_check_revision(void); |
477 | 399 | ||
478 | /* | 400 | /* |
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 0e329ca88a70..9115aedd2124 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -496,7 +496,6 @@ struct omap_hwmod_class { | |||
496 | * @_state: internal-use hwmod state | 496 | * @_state: internal-use hwmod state |
497 | * @_postsetup_state: internal-use state to leave the hwmod in after _setup() | 497 | * @_postsetup_state: internal-use state to leave the hwmod in after _setup() |
498 | * @flags: hwmod flags (documented below) | 498 | * @flags: hwmod flags (documented below) |
499 | * @omap_chip: OMAP chips this hwmod is present on | ||
500 | * @_lock: spinlock serializing operations on this hwmod | 499 | * @_lock: spinlock serializing operations on this hwmod |
501 | * @node: list node for hwmod list (internal use) | 500 | * @node: list node for hwmod list (internal use) |
502 | * | 501 | * |
@@ -545,7 +544,6 @@ struct omap_hwmod { | |||
545 | u8 _int_flags; | 544 | u8 _int_flags; |
546 | u8 _state; | 545 | u8 _state; |
547 | u8 _postsetup_state; | 546 | u8 _postsetup_state; |
548 | const struct omap_chip_id omap_chip; | ||
549 | }; | 547 | }; |
550 | 548 | ||
551 | int omap_hwmod_register(struct omap_hwmod **ohs); | 549 | int omap_hwmod_register(struct omap_hwmod **ohs); |
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index b6b409744954..9a6a53854911 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -622,7 +622,8 @@ static struct dev_pm_domain omap_device_pm_domain = { | |||
622 | SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, | 622 | SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, |
623 | _od_runtime_idle) | 623 | _od_runtime_idle) |
624 | USE_PLATFORM_PM_SLEEP_OPS | 624 | USE_PLATFORM_PM_SLEEP_OPS |
625 | SET_SYSTEM_SLEEP_PM_OPS(_od_suspend_noirq, _od_resume_noirq) | 625 | .suspend_noirq = _od_suspend_noirq, |
626 | .resume_noirq = _od_resume_noirq, | ||
626 | } | 627 | } |
627 | }; | 628 | }; |
628 | 629 | ||