Commit 75d43340 authored by Paul Walmsley's avatar Paul Walmsley Committed by paul

OMAP2xxx clock: remove implicit dependency between rate CPU flag and clkdev_omap CPU flag

cpu_mask is reused in the OMAP2xxx clock code to match against both the
CPU-specific rate flags (e.g., RATE_IN_2420) and the OMAP clkdev integration
code CPU flags (e.g., CK_242X).  This means that any patch that renumbers the
CK_* macros, as the next patch does, will probably break.  This patch
separates the clkdev_omap and clksel_rate CPU type detection flags so
the CK_* macros can be renumbered freely.
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
parent 55d8a653
...@@ -751,13 +751,16 @@ int __init omap2_clk_init(void) ...@@ -751,13 +751,16 @@ int __init omap2_clk_init(void)
struct prcm_config *prcm; struct prcm_config *prcm;
struct omap_clk *c; struct omap_clk *c;
u32 clkrate; u32 clkrate;
u16 cpu_clkflg;
if (cpu_is_omap242x()) { if (cpu_is_omap242x()) {
prcm_clksrc_ctrl = OMAP2420_PRCM_CLKSRC_CTRL; prcm_clksrc_ctrl = OMAP2420_PRCM_CLKSRC_CTRL;
cpu_mask = RATE_IN_242X; cpu_mask = RATE_IN_242X;
cpu_clkflg = CK_242X;
} else if (cpu_is_omap2430()) { } else if (cpu_is_omap2430()) {
prcm_clksrc_ctrl = OMAP2430_PRCM_CLKSRC_CTRL; prcm_clksrc_ctrl = OMAP2430_PRCM_CLKSRC_CTRL;
cpu_mask = RATE_IN_243X; cpu_mask = RATE_IN_243X;
cpu_clkflg = CK_243X;
} }
clk_init(&omap2_clk_functions); clk_init(&omap2_clk_functions);
...@@ -771,7 +774,7 @@ int __init omap2_clk_init(void) ...@@ -771,7 +774,7 @@ int __init omap2_clk_init(void)
propagate_rate(&sys_ck); propagate_rate(&sys_ck);
for (c = omap24xx_clks; c < omap24xx_clks + ARRAY_SIZE(omap24xx_clks); c++) for (c = omap24xx_clks; c < omap24xx_clks + ARRAY_SIZE(omap24xx_clks); c++)
if (c->cpu & cpu_mask) { if (c->cpu & cpu_clkflg) {
clkdev_add(&c->lk); clkdev_add(&c->lk);
clk_register(c->lk.clk); clk_register(c->lk.clk);
omap2_init_clk_clkdm(c->lk.clk); omap2_init_clk_clkdm(c->lk.clk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment