aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include
diff options
context:
space:
mode:
authorJon Hunter <jon-hunter@ti.com>2010-12-21 23:31:43 -0500
committerPaul Walmsley <paul@pwsan.com>2010-12-21 23:31:43 -0500
commita36795c1278112af2a78f93c99b7586cb7e2a0a2 (patch)
treeb400d44af9b83d45b9344ed9d39aa319e290bd57 /arch/arm/plat-omap/include
parentb183aaf7274245bb0241d81176cb6b06a3b01ca6 (diff)
OMAP: clock: fix configuration of J-Type DPLLs to work for OMAP3 and OMAP4
J-Type DPLLs have additional configuration parameters that need to be programmed when setting the multipler and divider for the DPLL. These parameters being the sigma delta divider (SD_DIV) for the DPLL and the digital controlled oscillator (DCO) to be used by the DPLL. The current code is implemented specifically to configure the OMAP3630 PER J-Type DPLL. The OMAP4430 USB DPLL is also a J-Type DPLL and so this code needs to be updated to work for both OMAP3 and OMAP4 devices and any other future devices that have J-TYPE DPLLs. For the OMAP3630 PER DPLL both the SD_DIV and DCO paramenters are used but for the OMAP4430 USB DPLL only the SD_DIV field is used. The current implementation will only program the SD_DIV and DCO fields if the DPLL has both and hence this does not work for OMAP4430. In order to make the code more generic add two new fields to the dpll_data structure for the SD_DIV field and DCO field bit-masks and only program these fields if the masks are defined for a specific DPLL. This simplifies the code and allows us to remove the flag DPLL_NO_DCO_SEL. Tested on OMAP36xx Zoom3 and OMAP4 Blaze. Signed-off-by: Jon Hunter <jon-hunter@ti.com> [paul@pwsan.com: removed explicit inlining and added '_' prefix on lookup_*() functions; added testing info to commit message; added 35xx comments back in] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/plat-omap/include')
-rw-r--r--arch/arm/plat-omap/include/plat/clock.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h
index 6e223158268b..8eb0adab19ea 100644
--- a/arch/arm/plat-omap/include/plat/clock.h
+++ b/arch/arm/plat-omap/include/plat/clock.h
@@ -124,8 +124,7 @@ struct clksel {
124 * 124 *
125 * Possible values for @flags: 125 * Possible values for @flags:
126 * DPLL_J_TYPE: "J-type DPLL" (only some 36xx, 4xxx DPLLs) 126 * DPLL_J_TYPE: "J-type DPLL" (only some 36xx, 4xxx DPLLs)
127 * NO_DCO_SEL: don't program DCO (only for some J-type DPLLs) 127 *
128
129 * @freqsel_mask is only used on the OMAP34xx family and AM35xx. 128 * @freqsel_mask is only used on the OMAP34xx family and AM35xx.
130 * 129 *
131 * XXX Some DPLLs have multiple bypass inputs, so it's not technically 130 * XXX Some DPLLs have multiple bypass inputs, so it's not technically
@@ -161,6 +160,8 @@ struct dpll_data {
161 u32 autoidle_mask; 160 u32 autoidle_mask;
162 u32 freqsel_mask; 161 u32 freqsel_mask;
163 u32 idlest_mask; 162 u32 idlest_mask;
163 u32 dco_mask;
164 u32 sddiv_mask;
164 u8 auto_recal_bit; 165 u8 auto_recal_bit;
165 u8 recal_en_bit; 166 u8 recal_en_bit;
166 u8 recal_st_bit; 167 u8 recal_st_bit;