CM_PLL_SEL1 | CM_PLL_SEL2 | CM_SYSCLKOUT_SEL1)
/* Mask for clksel regs which support rate operations */
-#define SRC_RATE_SEL_MASK (CM_MPU_SEL1 | CM_DSP_SEL1 | CM_GFX_SEL1 | \
- CM_MODEM_SEL1 | CM_CORE_SEL1 | CM_CORE_SEL2 | \
- CM_WKUP_SEL1 | CM_PLL_SEL1 | CM_PLL_SEL2 | \
- CM_SYSCLKOUT_SEL1)
+#define SRC_RATE_SEL_MASK (SRC_SEL_MASK | CM_MPU_SEL1 | CM_DSP_SEL1 | \
+ CM_GFX_SEL1 | CM_MODEM_SEL1)
/*
* The OMAP2 processor can be run at several discrete 'PRCM configurations'.
.rate = 13000000,
.flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
RATE_FIXED | ALWAYS_ENABLED | RATE_PROPAGATES,
- .rate_offset = 6, /* sysclkdiv 1 or 2, already handled or no boot */
+ .rate_offset = OMAP_SYSCLKDIV_SHIFT, /* sysclkdiv 1 or 2, already handled or no boot */
.recalc = &omap2_sys_clk_recalc,
};
.rate = 54000000,
.flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
RATE_FIXED | CM_PLL_SEL1 | RATE_PROPAGATES,
- .src_offset = 5,
+ .src_offset = OMAP24XX_54M_SOURCE_SHIFT,
.enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
.enable_bit = PARENT_CONTROLS_CLOCK,
.recalc = &omap2_propagate_rate,
.rate = 48000000,
.flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
RATE_FIXED | CM_PLL_SEL1 | RATE_PROPAGATES,
- .src_offset = 3,
+ .src_offset = OMAP24XX_48M_SOURCE_SHIFT,
.enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
.enable_bit = PARENT_CONTROLS_CLOCK,
.recalc = &omap2_propagate_rate,
.rate = 54000000,
.flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
CM_SYSCLKOUT_SEL1 | RATE_CKCTL,
- .src_offset = 0,
+ .src_offset = OMAP24XX_CLKOUT_SOURCE_SHIFT,
.enable_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
.enable_bit = OMAP24XX_CLKOUT_EN_SHIFT,
- .rate_offset = 3,
+ .rate_offset = OMAP24XX_CLKOUT_DIV_SHIFT,
.recalc = &omap2_clksel_recalc,
};
.rate = 54000000,
.flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
CM_SYSCLKOUT_SEL1 | RATE_CKCTL,
- .src_offset = 8,
+ .src_offset = OMAP2420_CLKOUT2_SOURCE_SHIFT,
.enable_reg = OMAP24XX_PRCM_CLKOUT_CTRL,
.enable_bit = OMAP2420_CLKOUT2_EN_SHIFT,
- .rate_offset = 11,
+ .rate_offset = OMAP2420_CLKOUT2_DIV_SHIFT,
.recalc = &omap2_clksel_recalc,
};
.flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | RATE_CKCTL |
ALWAYS_ENABLED | CM_MPU_SEL1 | DELAYED_APP |
CONFIG_PARTICIPANT | RATE_PROPAGATES,
- .rate_offset = 0, /* bits 0-4 */
+ .rate_offset = OMAP24XX_CLKSEL_MPU_SHIFT, /* bits 0-4 */
.recalc = &omap2_clksel_recalc,
};
.flags = CLOCK_IN_OMAP243X | RATE_CKCTL | CM_DSP_SEL1 |
DELAYED_APP | RATE_PROPAGATES |
CONFIG_PARTICIPANT,
- .rate_offset = 0,
+ .rate_offset = OMAP24XX_CLKSEL_DSP_SHIFT,
.enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, OMAP24XX_CM_FCLKEN),
.enable_bit = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT,
.recalc = &omap2_clksel_recalc,
.parent = &iva2_1_fck,
.flags = CLOCK_IN_OMAP243X | RATE_CKCTL | CM_DSP_SEL1 |
DELAYED_APP | CONFIG_PARTICIPANT,
- .rate_offset = 5,
+ .rate_offset = OMAP24XX_CLKSEL_DSP_IF_SHIFT,
.recalc = &omap2_clksel_recalc,
};
.parent = &core_ck,
.flags = CLOCK_IN_OMAP242X | RATE_CKCTL | CM_DSP_SEL1 |
DELAYED_APP | CONFIG_PARTICIPANT | RATE_PROPAGATES,
- .rate_offset = 0,
+ .rate_offset = OMAP24XX_CLKSEL_DSP_SHIFT,
.enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, OMAP24XX_CM_FCLKEN),
.enable_bit = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT,
.recalc = &omap2_clksel_recalc,
.parent = &dsp_fck,
.flags = CLOCK_IN_OMAP242X | RATE_CKCTL | CM_DSP_SEL1 |
DELAYED_APP | CONFIG_PARTICIPANT,
- .rate_offset = 5,
+ .rate_offset = OMAP24XX_CLKSEL_DSP_IF_SHIFT,
.enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_ICLKEN),
.enable_bit = OMAP2420_EN_DSP_IPI_SHIFT, /* for ipi */
.recalc = &omap2_clksel_recalc,
.parent = &core_ck,
.flags = CLOCK_IN_OMAP242X | CM_DSP_SEL1 | RATE_CKCTL |
CONFIG_PARTICIPANT | RATE_PROPAGATES | DELAYED_APP,
- .rate_offset = 8,
+ .rate_offset = OMAP2420_CLKSEL_IVA_SHIFT,
.enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, OMAP24XX_CM_FCLKEN),
.enable_bit = OMAP2420_EN_IVA_COP_SHIFT,
.recalc = &omap2_clksel_recalc,
RATE_CKCTL | ALWAYS_ENABLED | CM_CORE_SEL1 |
DELAYED_APP | CONFIG_PARTICIPANT |
RATE_PROPAGATES,
- .rate_offset = 0,
+ .rate_offset = OMAP24XX_CLKSEL_L3_SHIFT,
.recalc = &omap2_clksel_recalc,
};
CONFIG_PARTICIPANT,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
.enable_bit = OMAP24XX_EN_USB_SHIFT,
- .rate_offset = 25,
+ .rate_offset = OMAP24XX_CLKSEL_USB_SHIFT,
.recalc = &omap2_clksel_recalc,
};
RATE_CKCTL | CM_CORE_SEL1 | DELAYED_APP,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), /* bit 1 */
.enable_bit = OMAP24XX_EN_SSI_SHIFT,
- .rate_offset = 20,
+ .rate_offset = OMAP24XX_CLKSEL_SSI_SHIFT,
.recalc = &omap2_clksel_recalc,
};
RATE_CKCTL | CM_GFX_SEL1,
.enable_reg = OMAP_CM_REGADDR(GFX_MOD, OMAP24XX_CM_FCLKEN),
.enable_bit = OMAP24XX_EN_3D_SHIFT,
- .rate_offset = 0,
+ .rate_offset = OMAP_CLKSEL_GFX_SHIFT,
.recalc = &omap2_clksel_recalc,
};
RATE_CKCTL | CM_GFX_SEL1,
.enable_reg = OMAP_CM_REGADDR(GFX_MOD, OMAP24XX_CM_FCLKEN),
.enable_bit = OMAP24XX_EN_2D_SHIFT,
- .rate_offset = 0,
+ .rate_offset = OMAP_CLKSEL_GFX_SHIFT,
.recalc = &omap2_clksel_recalc,
};
.parent = &core_ck,
.flags = CLOCK_IN_OMAP243X | RATE_CKCTL | CM_MODEM_SEL1 |
DELAYED_APP | CONFIG_PARTICIPANT,
- .rate_offset = 0,
+ .rate_offset = OMAP2430_CLKSEL_MDM_SHIFT,
.enable_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_ICLKEN),
.enable_bit = OMAP2430_CM_ICLKEN_MDM_EN_MDM_SHIFT,
.recalc = &omap2_clksel_recalc,
.flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
RATE_CKCTL | ALWAYS_ENABLED | CM_CORE_SEL1 |
DELAYED_APP | RATE_PROPAGATES,
- .rate_offset = 5,
+ .rate_offset = OMAP24XX_CLKSEL_L4_SHIFT,
.recalc = &omap2_clksel_recalc,
};
RATE_CKCTL | CM_CORE_SEL1 | DELAYED_APP,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP24XX_EN_DSS1_SHIFT,
- .rate_offset = 8,
- .src_offset = 8,
+ .rate_offset = OMAP24XX_CLKSEL_DSS1_SHIFT,
+ .src_offset = OMAP24XX_CLKSEL_DSS1_SHIFT,
.recalc = &omap2_clksel_recalc,
};
DELAYED_APP,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP24XX_EN_DSS2_SHIFT,
- .src_offset = 13,
+ .src_offset = OMAP24XX_CLKSEL_DSS2_SHIFT,
.recalc = &omap2_followparent_recalc,
};
CM_WKUP_SEL1,
.enable_reg = OMAP_CM_REGADDR(WKUP_MOD, OMAP24XX_CM_FCLKEN), /* Bit0 */
.enable_bit = OMAP24XX_EN_GPT1_SHIFT,
- .src_offset = 0,
+ .src_offset = OMAP24XX_CLKSEL_GPT1_SHIFT,
.recalc = &omap2_followparent_recalc,
};
CM_CORE_SEL2,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP24XX_EN_GPT2_SHIFT,
- .src_offset = 2,
+ .src_offset = OMAP24XX_CLKSEL_GPT2_SHIFT,
.recalc = &omap2_followparent_recalc,
};
CM_CORE_SEL2,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP24XX_EN_GPT3_SHIFT,
- .src_offset = 4,
+ .src_offset = OMAP24XX_CLKSEL_GPT3_SHIFT,
.recalc = &omap2_followparent_recalc,
};
CM_CORE_SEL2,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP24XX_EN_GPT4_SHIFT,
- .src_offset = 6,
+ .src_offset = OMAP24XX_CLKSEL_GPT4_SHIFT,
.recalc = &omap2_followparent_recalc,
};
CM_CORE_SEL2,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP24XX_EN_GPT5_SHIFT,
- .src_offset = 8,
+ .src_offset = OMAP24XX_CLKSEL_GPT5_SHIFT,
.recalc = &omap2_followparent_recalc,
};
CM_CORE_SEL2,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP24XX_EN_GPT6_SHIFT,
- .src_offset = 10,
+ .src_offset = OMAP24XX_CLKSEL_GPT6_SHIFT,
.recalc = &omap2_followparent_recalc,
};
CM_CORE_SEL2,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP24XX_EN_GPT7_SHIFT,
- .src_offset = 12,
+ .src_offset = OMAP24XX_CLKSEL_GPT7_SHIFT,
.recalc = &omap2_followparent_recalc,
};
CM_CORE_SEL2,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP24XX_EN_GPT8_SHIFT,
- .src_offset = 14,
+ .src_offset = OMAP24XX_CLKSEL_GPT8_SHIFT,
.recalc = &omap2_followparent_recalc,
};
CM_CORE_SEL2,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP24XX_EN_GPT9_SHIFT,
- .src_offset = 16,
+ .src_offset = OMAP24XX_CLKSEL_GPT9_SHIFT,
.recalc = &omap2_followparent_recalc,
};
CM_CORE_SEL2,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP24XX_EN_GPT10_SHIFT,
- .src_offset = 18,
+ .src_offset = OMAP24XX_CLKSEL_GPT10_SHIFT,
.recalc = &omap2_followparent_recalc,
};
CM_CORE_SEL2,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP24XX_EN_GPT11_SHIFT,
- .src_offset = 20,
+ .src_offset = OMAP24XX_CLKSEL_GPT11_SHIFT,
.recalc = &omap2_followparent_recalc,
};
CM_CORE_SEL2,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP24XX_EN_GPT12_SHIFT,
- .src_offset = 22,
+ .src_offset = OMAP24XX_CLKSEL_GPT12_SHIFT,
.recalc = &omap2_followparent_recalc,
};
.flags = CLOCK_IN_OMAP242X | RATE_CKCTL | CM_CORE_SEL1 | DELAYED_APP,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP2420_EN_VLYNQ_SHIFT,
- .src_offset = 15,
+ .src_offset = OMAP2420_CLKSEL_VLYNQ_SHIFT,
.recalc = &omap2_clksel_recalc,
};