]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powerpc/512x: clk: enforce even SDHC divider values
authorGerhard Sittig <gsi@denx.de>
Tue, 10 Dec 2013 13:11:35 +0000 (14:11 +0100)
committerAnatolij Gustschin <agust@denx.de>
Sun, 12 Jan 2014 17:59:21 +0000 (18:59 +0100)
commit76922ebb02fb531142285682352ccdd7091a2bfb
treea0778868b3fea328d5a7b4bb975911dc71d022a5
parent2a2b9ff8a544944ee97b80b9ff977986c9e05e7f
powerpc/512x: clk: enforce even SDHC divider values

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: Gerhard Sittig <gsi@denx.de>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
arch/powerpc/platforms/512x/clock-commonclk.c