Commit 766d305f authored by Rajendra Nayak's avatar Rajendra Nayak Committed by Paul Walmsley

OMAP4: prcm: Use logical OR instead of bitwise OR

This patch fixes usage of bitwise OR in if conditions, and instead
uses logical OR.
Signed-off-by: default avatarRajendra Nayak <rnayak@ti.com>
Cc: Abhijit Pagare <abhijitpagare@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
parent 56dc79ab
...@@ -240,7 +240,7 @@ static void _omap2_clkdm_set_hwsup(struct clockdomain *clkdm, int enable) ...@@ -240,7 +240,7 @@ static void _omap2_clkdm_set_hwsup(struct clockdomain *clkdm, int enable)
bits = OMAP24XX_CLKSTCTRL_ENABLE_AUTO; bits = OMAP24XX_CLKSTCTRL_ENABLE_AUTO;
else else
bits = OMAP24XX_CLKSTCTRL_DISABLE_AUTO; bits = OMAP24XX_CLKSTCTRL_DISABLE_AUTO;
} else if (cpu_is_omap34xx() | cpu_is_omap44xx()) { } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
if (enable) if (enable)
bits = OMAP34XX_CLKSTCTRL_ENABLE_AUTO; bits = OMAP34XX_CLKSTCTRL_ENABLE_AUTO;
else else
...@@ -812,7 +812,7 @@ int omap2_clkdm_sleep(struct clockdomain *clkdm) ...@@ -812,7 +812,7 @@ int omap2_clkdm_sleep(struct clockdomain *clkdm)
cm_set_mod_reg_bits(OMAP24XX_FORCESTATE, cm_set_mod_reg_bits(OMAP24XX_FORCESTATE,
clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL); clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL);
} else if (cpu_is_omap34xx() | cpu_is_omap44xx()) { } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_SLEEP << u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_SLEEP <<
__ffs(clkdm->clktrctrl_mask)); __ffs(clkdm->clktrctrl_mask));
...@@ -856,7 +856,7 @@ int omap2_clkdm_wakeup(struct clockdomain *clkdm) ...@@ -856,7 +856,7 @@ int omap2_clkdm_wakeup(struct clockdomain *clkdm)
cm_clear_mod_reg_bits(OMAP24XX_FORCESTATE, cm_clear_mod_reg_bits(OMAP24XX_FORCESTATE,
clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL); clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL);
} else if (cpu_is_omap34xx() | cpu_is_omap44xx()) { } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_WAKEUP << u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_WAKEUP <<
__ffs(clkdm->clktrctrl_mask)); __ffs(clkdm->clktrctrl_mask));
......
...@@ -222,7 +222,7 @@ void pwrdm_init(struct powerdomain **pwrdm_list) ...@@ -222,7 +222,7 @@ void pwrdm_init(struct powerdomain **pwrdm_list)
{ {
struct powerdomain **p = NULL; struct powerdomain **p = NULL;
if (cpu_is_omap24xx() | cpu_is_omap34xx()) { if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
pwrstctrl_reg_offs = OMAP2_PM_PWSTCTRL; pwrstctrl_reg_offs = OMAP2_PM_PWSTCTRL;
pwrstst_reg_offs = OMAP2_PM_PWSTST; pwrstst_reg_offs = OMAP2_PM_PWSTST;
} else if (cpu_is_omap44xx()) { } else if (cpu_is_omap44xx()) {
......
...@@ -123,7 +123,7 @@ struct omap3_prcm_regs prcm_context; ...@@ -123,7 +123,7 @@ struct omap3_prcm_regs prcm_context;
u32 omap_prcm_get_reset_sources(void) u32 omap_prcm_get_reset_sources(void)
{ {
/* XXX This presumably needs modification for 34XX */ /* XXX This presumably needs modification for 34XX */
if (cpu_is_omap24xx() | cpu_is_omap34xx()) if (cpu_is_omap24xx() || cpu_is_omap34xx())
return prm_read_mod_reg(WKUP_MOD, OMAP2_RM_RSTST) & 0x7f; return prm_read_mod_reg(WKUP_MOD, OMAP2_RM_RSTST) & 0x7f;
if (cpu_is_omap44xx()) if (cpu_is_omap44xx())
return prm_read_mod_reg(WKUP_MOD, OMAP4_RM_RSTST) & 0x7f; return prm_read_mod_reg(WKUP_MOD, OMAP4_RM_RSTST) & 0x7f;
...@@ -157,7 +157,7 @@ void omap_prcm_arch_reset(char mode, const char *cmd) ...@@ -157,7 +157,7 @@ void omap_prcm_arch_reset(char mode, const char *cmd)
else else
WARN_ON(1); WARN_ON(1);
if (cpu_is_omap24xx() | cpu_is_omap34xx()) if (cpu_is_omap24xx() || cpu_is_omap34xx())
prm_set_mod_reg_bits(OMAP_RST_DPLL3, prcm_offs, prm_set_mod_reg_bits(OMAP_RST_DPLL3, prcm_offs,
OMAP2_RM_RSTCTRL); OMAP2_RM_RSTCTRL);
if (cpu_is_omap44xx()) if (cpu_is_omap44xx())
......
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