u-boot-brain/arch
Stephen Warren 6c7dc6236a ARM: tegra: fix PLLP frequency calc on T210
AFAIK, for all PLLs on all Tegra SoCs, the primary PLL output frequency
is (input * m) / (n * p). However, PLLP's primary output (pllP_out0) on
T210 is the VCO output, and divp is not applied. pllP_out2 does have divp
applied. All other pllP_outN are divided down from pllP_out0. We only
support pllP_out0 in U-Boot at the time of writing.

Fix clock_get_rate() to handle this special case.

This corrects the returned rate for PLLP to be 408MHz rather than 204MHz.
In turn, this causes high enough dividers to be calculated for the various
peripheral clocks that feed off of PLLP. Without this, some peripherals
failed to operate correctly. For instance, one of my SD cards worked
perfectly but an older (presumably slower) card could not be read.

Note that prior to commit 722e000ccd "Tegra: PLL: use per-SoC pllinfo
table instead of PLL_DIVM/N/P, etc.", the calculated PLL frequency was
816MHz since the wrong values were being extracted from the PLLP divider
register. This caused overly large peripheral dividers to be calculated,
which while wrong, didn't cause any correctness issues; things simply ran
slower than they could.

Reported-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-09-16 16:10:22 -07:00
..
arc arc: make AXS101 default platform 2015-09-07 13:38:24 +03:00
arm ARM: tegra: fix PLLP frequency calc on T210 2015-09-16 16:10:22 -07:00
avr32 avr32: delete ancient board.c 2015-06-10 14:03:26 +02:00
blackfin arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
m68k m68k: cache: add an empty stub functions for invalidate/flush dcache 2015-08-12 20:47:46 -04:00
microblaze arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
mips MIPS: fix syntax for fdt_chosen/initrd. 2015-08-21 15:22:41 +02:00
nds32 NDS32: Generic Board Support and Unsupport 2015-08-28 11:46:35 -04:00
nios2 arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
openrisc arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
powerpc powerpc: mpc85xx: remove stxgp3, stxssa support 2015-09-02 11:33:19 -04:00
sandbox dm: test: Add a new test case for dm_test_eth_rotate 2015-09-09 07:48:03 -06:00
sh Move default y configs out of arch/board Kconfig 2015-06-25 22:17:55 -04:00
sparc arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
x86 x86: quark: Add USB PHY initialization support 2015-09-09 07:48:03 -06:00
.gitignore .gitignore: drop include/asm/proc from ignore pattern 2014-06-19 11:18:54 -04:00
Kconfig NDS32: Generic Board Support and Unsupport 2015-08-28 11:46:35 -04:00