Skip to content

Commit

Permalink
ARM: OMAP2+: Check for inited flag
Browse files Browse the repository at this point in the history
If we have no hwmods configured and omap_hwmod_init() is not called,
we don't want to call omap_hwmod_setup_all() as it will fail with
checks for configured MPU at least.

Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Tony Lindgren committed Nov 16, 2020
1 parent 4097c9a commit 9261c5b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/arm/mach-omap2/omap_hwmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@ static struct clockdomain *_get_clkdm(struct omap_hwmod *oh)
{
struct clk_hw_omap *clk;

if (!oh)
return NULL;

if (oh->clkdm) {
return oh->clkdm;
} else if (oh->_clk) {
Expand Down Expand Up @@ -3677,6 +3680,9 @@ static void __init omap_hwmod_setup_earlycon_flags(void)
*/
static int __init omap_hwmod_setup_all(void)
{
if (!inited)
return 0;

_ensure_mpu_hwmod_is_setup(NULL);

omap_hwmod_for_each(_init, NULL);
Expand Down

0 comments on commit 9261c5b

Please sign in to comment.