• Jon Hunter's avatar
    OMAP: clock: fix configuration of J-Type DPLLs to work for OMAP3 and OMAP4 · a36795c1
    Jon Hunter authored
    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: default avatarJon 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: default avatarPaul Walmsley <paul@pwsan.com>
    a36795c1
clock.h 11.2 KB