Skip to content

Commit

Permalink
OMAP2 PRCM: convert OMAP2 PRCM macros to the _SHIFT/_MASK suffixes
Browse files Browse the repository at this point in the history
Fix all of the remaining OMAP2 PRCM register shift/bitmask macros that
did not use the _SHIFT/_MASK suffixes to use them.  This makes the use
of these macros consistent.  It is intended to reduce error, as code
can be inspected visually by reviewers to ensure that bitshifts and
bitmasks are used in the appropriate places.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
  • Loading branch information
Paul Walmsley committed May 20, 2010
1 parent 5838bb6 commit f38ca10
Show file tree
Hide file tree
Showing 7 changed files with 241 additions and 240 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-omap2/clkt2xxx_apll.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ static int omap2_clk_apll_enable(struct clk *clk, u32 status_mask)

static int omap2_clk_apll96_enable(struct clk *clk)
{
return omap2_clk_apll_enable(clk, OMAP24XX_ST_96M_APLL);
return omap2_clk_apll_enable(clk, OMAP24XX_ST_96M_APLL_MASK);
}

static int omap2_clk_apll54_enable(struct clk *clk)
{
return omap2_clk_apll_enable(clk, OMAP24XX_ST_54M_APLL);
return omap2_clk_apll_enable(clk, OMAP24XX_ST_54M_APLL_MASK);
}

/* Stop APLL */
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-omap2/clock2420_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static struct clk func_54m_ck = {
.clkdm_name = "wkup_clkdm",
.init = &omap2_init_clksel_parent,
.clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
.clksel_mask = OMAP24XX_54M_SOURCE,
.clksel_mask = OMAP24XX_54M_SOURCE_MASK,
.clksel = func_54m_clksel,
.recalc = &omap2_clksel_recalc,
};
Expand Down Expand Up @@ -223,7 +223,7 @@ static struct clk func_48m_ck = {
.clkdm_name = "wkup_clkdm",
.init = &omap2_init_clksel_parent,
.clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
.clksel_mask = OMAP24XX_48M_SOURCE,
.clksel_mask = OMAP24XX_48M_SOURCE_MASK,
.clksel = func_48m_clksel,
.recalc = &omap2_clksel_recalc,
.round_rate = &omap2_clksel_round_rate,
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/mach-omap2/clock2430_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static struct clk func_54m_ck = {
.clkdm_name = "wkup_clkdm",
.init = &omap2_init_clksel_parent,
.clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
.clksel_mask = OMAP24XX_54M_SOURCE,
.clksel_mask = OMAP24XX_54M_SOURCE_MASK,
.clksel = func_54m_clksel,
.recalc = &omap2_clksel_recalc,
};
Expand Down Expand Up @@ -214,7 +214,7 @@ static struct clk func_96m_ck = {
.clkdm_name = "wkup_clkdm",
.init = &omap2_init_clksel_parent,
.clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
.clksel_mask = OMAP2430_96M_SOURCE,
.clksel_mask = OMAP2430_96M_SOURCE_MASK,
.clksel = func_96m_clksel,
.recalc = &omap2_clksel_recalc,
};
Expand Down Expand Up @@ -244,7 +244,7 @@ static struct clk func_48m_ck = {
.clkdm_name = "wkup_clkdm",
.init = &omap2_init_clksel_parent,
.clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
.clksel_mask = OMAP24XX_48M_SOURCE,
.clksel_mask = OMAP24XX_48M_SOURCE_MASK,
.clksel = func_48m_clksel,
.recalc = &omap2_clksel_recalc,
.round_rate = &omap2_clksel_round_rate,
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-omap2/clockdomain.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ int omap2_clkdm_sleep(struct clockdomain *clkdm)

if (cpu_is_omap24xx()) {

cm_set_mod_reg_bits(OMAP24XX_FORCESTATE,
cm_set_mod_reg_bits(OMAP24XX_FORCESTATE_MASK,
clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL);

} else if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
Expand Down Expand Up @@ -853,7 +853,7 @@ int omap2_clkdm_wakeup(struct clockdomain *clkdm)

if (cpu_is_omap24xx()) {

cm_clear_mod_reg_bits(OMAP24XX_FORCESTATE,
cm_clear_mod_reg_bits(OMAP24XX_FORCESTATE_MASK,
clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL);

} else if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
Expand Down
Loading

0 comments on commit f38ca10

Please sign in to comment.