• Gerhard Sittig's avatar
    powerpc/512x: clk: enforce even SDHC divider values · 76922ebb
    Gerhard Sittig authored
    the SDHC clock is derived from CSB with a fractional divider which can
    address "quarters"; the implementation multiplies CSB by 4 and divides
    it by the (integer) divider value
    
    a bug in the clock domain synchronisation requires that only even
    divider values get setup; we achieve this by
    - multiplying CSB by 2 only instead of 4
    - registering with CCF the divider's bit field without bit0
    - the divider's lowest bit remains clear as this is the reset value
      and later operations won't touch it
    
    this change keeps fully utilizing common clock primitives (needs no
    additional support logic, and avoids an excessive divider table) and
    satisfies the hardware's constraint of only supporting even divider
    values
    Signed-off-by: default avatarGerhard Sittig <gsi@denx.de>
    Acked-by: default avatarMike Turquette <mturquette@linaro.org>
    Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
    76922ebb
clock-commonclk.c 30.4 KB