Skip to content

Commit a15de03

Browse files
committed
ARM: OMAP2+: Init both prm and prcm nodes early for clocks
We need to probe both prm and prcm nodes early for clocks as they are needed by system timers. Signed-off-by: Tony Lindgren <[email protected]>
1 parent 5f7259a commit a15de03

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

arch/arm/mach-omap2/pdata-quirks.c

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -569,10 +569,29 @@ static void pdata_quirks_check(struct pdata_init *quirks)
569569
}
570570
}
571571

572-
void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table)
572+
static const char * const pdata_quirks_init_nodes[] = {
573+
"prcm",
574+
"prm",
575+
};
576+
577+
void __init
578+
pdata_quirks_init_clocks(const struct of_device_id *omap_dt_match_table)
573579
{
574580
struct device_node *np;
581+
int i;
582+
583+
for (i = 0; i < ARRAY_SIZE(pdata_quirks_init_nodes); i++) {
584+
np = of_find_node_by_name(NULL, pdata_quirks_init_nodes[i]);
585+
if (!np)
586+
continue;
575587

588+
of_platform_populate(np, omap_dt_match_table,
589+
omap_auxdata_lookup, NULL);
590+
}
591+
}
592+
593+
void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table)
594+
{
576595
/*
577596
* We still need this for omap2420 and omap3 PM to work, others are
578597
* using drivers/misc/sram.c already.
@@ -585,13 +604,7 @@ void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table)
585604
omap3_mcbsp_init();
586605
pdata_quirks_check(auxdata_quirks);
587606

588-
/* Populate always-on PRCM in l4_wkup to probe l4_wkup */
589-
np = of_find_node_by_name(NULL, "prcm");
590-
if (!np)
591-
np = of_find_node_by_name(NULL, "prm");
592-
if (np)
593-
of_platform_populate(np, omap_dt_match_table,
594-
omap_auxdata_lookup, NULL);
607+
pdata_quirks_init_clocks(omap_dt_match_table);
595608

596609
of_platform_populate(NULL, omap_dt_match_table,
597610
omap_auxdata_lookup, NULL);

0 commit comments

Comments
 (0)