summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/omap_hwmod.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-11-28 14:50:13 +0100
committerArnd Bergmann <arnd@arndb.de>2014-11-28 14:51:38 +0100
commitdf717a58a38c49cf7c6e761d35aa822344dbd1bd (patch)
treea84211886b8e049b87cf66814deba936941287d7 /arch/arm/mach-omap2/omap_hwmod.c
parent09ffd948a09256dfa57c46e0a31cf4af275ec61d (diff)
parent29c4ce17bcad34a086348dfd5c42b8cf5fda110b (diff)
Merge (part of) tag 'omap-for-v3.19/hwmod-and-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
SoC related changes for omaps including hwmod clean-up for DSS, and hwmod data for more UARTs and ADC. Also few defconfig changes to enable devices found on am335x and am437x. [arnd: I removed the defconfig changes from the branch in order to cherry-pick them onto the next/defconfig branch, but I did not change the other commits] * commit '29c4ce17bcad': ARM: dts: cm-t3x30: add keypad support ARM: OMAP2+: hwmod: AM43x: add hwmod support for ADC on AM43xx ARM: DRA7: hwmod data: Add missing UART hwmod data ARM: dts: omap4.dtsi: remove dss_fck ARM: OMAP4: fix RFBI iclk ARM: OMAP4: hwmod: use MODULEMODE properly ARM: OMAP4: hwmod: set DSS submodule parent hwmods ARM: OMAP5: hwmod: set DSS submodule parent hwmods ARM: OMAP2+: hwmod: add parent_hwmod support Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index ee5f38df477d..cbb908dc5cf0 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2635,11 +2635,33 @@ static int __init _setup(struct omap_hwmod *oh, void *data)
if (oh->_state != _HWMOD_STATE_INITIALIZED)
return 0;
+ if (oh->parent_hwmod) {
+ int r;
+
+ r = _enable(oh->parent_hwmod);
+ WARN(r, "hwmod: %s: setup: failed to enable parent hwmod %s\n",
+ oh->name, oh->parent_hwmod->name);
+ }
+
_setup_iclk_autoidle(oh);
if (!_setup_reset(oh))
_setup_postsetup(oh);
+ if (oh->parent_hwmod) {
+ u8 postsetup_state;
+
+ postsetup_state = oh->parent_hwmod->_postsetup_state;
+
+ if (postsetup_state == _HWMOD_STATE_IDLE)
+ _idle(oh->parent_hwmod);
+ else if (postsetup_state == _HWMOD_STATE_DISABLED)
+ _shutdown(oh->parent_hwmod);
+ else if (postsetup_state != _HWMOD_STATE_ENABLED)
+ WARN(1, "hwmod: %s: unknown postsetup state %d! defaulting to enabled\n",
+ oh->parent_hwmod->name, postsetup_state);
+ }
+
return 0;
}