static void omap2_clk_wait_ready(struct clk *clk)
{
u32 other_bit, idlest_bit;
- unsigned long reg, other_reg, idlest_reg, prcm_mod, prcm_regid;
+ unsigned long reg, other_reg, idlest_reg, prcm_regid;
+
+ /* Only CM-controlled clocks affect module IDLEST */
+ if (clk->prcm_mod & ~PRCM_MOD_ADDR_MASK)
+ return;
reg = (unsigned long)clk->enable_reg;
- prcm_mod = reg & ~0xff;
prcm_regid = reg & 0xff;
other_reg = reg & ~PRCM_REGTYPE_MASK;
idlest_bit = other_bit;
/* 24xx: DSS and CAM have no idlest bits for their target agents */
- if (cpu_is_omap24xx() &&
- (prcm_mod == OMAP2420_CM_REGADDR(CORE_MOD, 0) ||
- prcm_mod == OMAP2430_CM_REGADDR(CORE_MOD, 0)) &&
+ if (cpu_is_omap24xx() && clk->prcm_mod == CORE_MOD &&
(reg & 0x0f) == 0) { /* CM_{F,I}CLKEN1 */
if (clk->enable_bit == OMAP24XX_EN_DSS2_SHIFT ||
if (cpu_is_omap34xx()) {
/* SSI */
- if (prcm_mod == OMAP34XX_CM_REGADDR(CORE_MOD, 0) &&
+ if (clk->prcm_mod == CORE_MOD &&
(reg & 0x0f) == 0 &&
clk->enable_bit == OMAP3430_EN_SSI_SHIFT) {
}
/* DSS */
- if (prcm_mod == OMAP34XX_CM_REGADDR(OMAP3430_DSS_MOD, 0)) {
+ if (clk->prcm_mod == OMAP3430_DSS_MOD) {
/* 3430ES1 DSS has no target idlest bits */
if (system_rev == OMAP3430_REV_ES1_0)
/* USBHOST */
if (system_rev > OMAP3430_REV_ES1_0 &&
- prcm_mod == OMAP34XX_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, 0)) {
+ clk->prcm_mod == OMAP3430ES2_USBHOST_MOD) {
/*
* The 120MHz clock apparently has nothing to do with