diff options
author | Paul Walmsley <paul@pwsan.com> | 2010-12-14 14:42:35 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-12-21 21:55:12 -0500 |
commit | 2092e5ccf89db09ebde94e9aabd3c86d5fa05c6c (patch) | |
tree | c286d08314b82afe63485a79e13013492186e218 /arch/arm/plat-omap/include | |
parent | e4dc8f507c3066d6fcece988d99b6d766c46af85 (diff) |
OMAP2+: hwmod: add postsetup state
Allow board files and OMAP core code to control the state that some or
all of the hwmods end up in at the end of _setup() (called by
omap_hwmod_late_init() ). Reimplement the old skip_setup_idle code in
terms of this new postsetup state code.
There are two use-cases for this patch: the !CONFIG_PM_RUNTIME case,
in which all IP blocks should stay enabled after _setup() finishes;
and the MPU watchdog case, in which the watchdog IP block should enter
idle if watchdog coverage of kernel initialization is desired, and
should be disabled otherwise.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: BenoƮt Cousson <b-cousson@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Charulatha Varadarajan <charu@ti.com>
Diffstat (limited to 'arch/arm/plat-omap/include')
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap_hwmod.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index d1f1265fc4a6..b445ecdb95b8 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -462,6 +462,7 @@ struct omap_hwmod_class { | |||
462 | * @response_lat: device OCP response latency (in interface clock cycles) | 462 | * @response_lat: device OCP response latency (in interface clock cycles) |
463 | * @_int_flags: internal-use hwmod flags | 463 | * @_int_flags: internal-use hwmod flags |
464 | * @_state: internal-use hwmod state | 464 | * @_state: internal-use hwmod state |
465 | * @_postsetup_state: internal-use state to leave the hwmod in after _setup() | ||
465 | * @flags: hwmod flags (documented below) | 466 | * @flags: hwmod flags (documented below) |
466 | * @omap_chip: OMAP chips this hwmod is present on | 467 | * @omap_chip: OMAP chips this hwmod is present on |
467 | * @_mutex: mutex serializing operations on this hwmod | 468 | * @_mutex: mutex serializing operations on this hwmod |
@@ -510,6 +511,7 @@ struct omap_hwmod { | |||
510 | u8 hwmods_cnt; | 511 | u8 hwmods_cnt; |
511 | u8 _int_flags; | 512 | u8 _int_flags; |
512 | u8 _state; | 513 | u8 _state; |
514 | u8 _postsetup_state; | ||
513 | const struct omap_chip_id omap_chip; | 515 | const struct omap_chip_id omap_chip; |
514 | }; | 516 | }; |
515 | 517 | ||
@@ -519,7 +521,7 @@ int omap_hwmod_unregister(struct omap_hwmod *oh); | |||
519 | struct omap_hwmod *omap_hwmod_lookup(const char *name); | 521 | struct omap_hwmod *omap_hwmod_lookup(const char *name); |
520 | int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), | 522 | int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), |
521 | void *data); | 523 | void *data); |
522 | int omap_hwmod_late_init(u8 skip_setup_idle); | 524 | int omap_hwmod_late_init(void); |
523 | 525 | ||
524 | int omap_hwmod_enable(struct omap_hwmod *oh); | 526 | int omap_hwmod_enable(struct omap_hwmod *oh); |
525 | int _omap_hwmod_enable(struct omap_hwmod *oh); | 527 | int _omap_hwmod_enable(struct omap_hwmod *oh); |
@@ -566,6 +568,8 @@ int omap_hwmod_for_each_by_class(const char *classname, | |||
566 | void *user), | 568 | void *user), |
567 | void *user); | 569 | void *user); |
568 | 570 | ||
571 | int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state); | ||
572 | |||
569 | /* | 573 | /* |
570 | * Chip variant-specific hwmod init routines - XXX should be converted | 574 | * Chip variant-specific hwmod init routines - XXX should be converted |
571 | * to use initcalls once the initial boot ordering is straightened out | 575 | * to use initcalls once the initial boot ordering is straightened out |