aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2016-02-05 11:17:32 -0500
committerThierry Reding <treding@nvidia.com>2016-06-10 10:11:44 -0400
commiteddb65e7fdeac175cd61c54da5a217f47861ddd2 (patch)
tree163488134796b1dd5b835776572ec07c3e416fb5
parent1a695a905c18548062509178b98bc91e67510864 (diff)
clk: tegra: Fixup post dividers on Tegra210
Commit 86c679a52294 ("clk: tegra: pll: Fix _pll_ramp_calc_pll logic and _calc_dynamic_ramp_rate") changed the PLL divider computation logic to consistently use P-divider values from tables as real dividers rather than the hardware values. Unfortunately for some reason many of the Tegra210 clocks didn't have their tables updated (most likely an over- sight by me when applying the patches). This commit fixes them all up. Cc: Jon Hunter <jonathanh@nvidia.com> Cc: Rhyland Klein <rklein@nvidia.com> Acked-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/clk/tegra/clk-tegra210.c94
1 files changed, 47 insertions, 47 deletions
diff --git a/drivers/clk/tegra/clk-tegra210.c b/drivers/clk/tegra/clk-tegra210.c
index 456cf586d2c2..6149573368ef 100644
--- a/drivers/clk/tegra/clk-tegra210.c
+++ b/drivers/clk/tegra/clk-tegra210.c
@@ -1366,9 +1366,9 @@ static u32 pll_expo_p_to_pdiv(u32 p, u32 *pdiv)
1366 1366
1367static struct tegra_clk_pll_freq_table pll_x_freq_table[] = { 1367static struct tegra_clk_pll_freq_table pll_x_freq_table[] = {
1368 /* 1 GHz */ 1368 /* 1 GHz */
1369 { 12000000, 1000000000, 166, 1, 1, 0 }, /* actual: 996.0 MHz */ 1369 { 12000000, 1000000000, 166, 1, 2, 0 }, /* actual: 996.0 MHz */
1370 { 13000000, 1000000000, 153, 1, 1, 0 }, /* actual: 994.0 MHz */ 1370 { 13000000, 1000000000, 153, 1, 2, 0 }, /* actual: 994.0 MHz */
1371 { 38400000, 1000000000, 156, 3, 1, 0 }, /* actual: 998.4 MHz */ 1371 { 38400000, 1000000000, 156, 3, 2, 0 }, /* actual: 998.4 MHz */
1372 { 0, 0, 0, 0, 0, 0 }, 1372 { 0, 0, 0, 0, 0, 0 },
1373}; 1373};
1374 1374
@@ -1417,9 +1417,9 @@ static struct div_nmp pllc_nmp = {
1417}; 1417};
1418 1418
1419static struct tegra_clk_pll_freq_table pll_cx_freq_table[] = { 1419static struct tegra_clk_pll_freq_table pll_cx_freq_table[] = {
1420 { 12000000, 510000000, 85, 1, 1, 0 }, 1420 { 12000000, 510000000, 85, 1, 2, 0 },
1421 { 13000000, 510000000, 78, 1, 1, 0 }, /* actual: 507.0 MHz */ 1421 { 13000000, 510000000, 78, 1, 2, 0 }, /* actual: 507.0 MHz */
1422 { 38400000, 510000000, 79, 3, 1, 0 }, /* actual: 505.6 MHz */ 1422 { 38400000, 510000000, 79, 3, 2, 0 }, /* actual: 505.6 MHz */
1423 { 0, 0, 0, 0, 0, 0 }, 1423 { 0, 0, 0, 0, 0, 0 },
1424}; 1424};
1425 1425
@@ -1532,9 +1532,9 @@ static struct div_nmp pllss_nmp = {
1532}; 1532};
1533 1533
1534static struct tegra_clk_pll_freq_table pll_c4_vco_freq_table[] = { 1534static struct tegra_clk_pll_freq_table pll_c4_vco_freq_table[] = {
1535 { 12000000, 600000000, 50, 1, 0, 0 }, 1535 { 12000000, 600000000, 50, 1, 1, 0 },
1536 { 13000000, 600000000, 46, 1, 0, 0 }, /* actual: 598.0 MHz */ 1536 { 13000000, 600000000, 46, 1, 1, 0 }, /* actual: 598.0 MHz */
1537 { 38400000, 600000000, 62, 4, 0, 0 }, /* actual: 595.2 MHz */ 1537 { 38400000, 600000000, 62, 4, 1, 0 }, /* actual: 595.2 MHz */
1538 { 0, 0, 0, 0, 0, 0 }, 1538 { 0, 0, 0, 0, 0, 0 },
1539}; 1539};
1540 1540
@@ -1583,19 +1583,19 @@ static struct tegra_clk_pll_params pll_c4_vco_params = {
1583}; 1583};
1584 1584
1585static struct tegra_clk_pll_freq_table pll_m_freq_table[] = { 1585static struct tegra_clk_pll_freq_table pll_m_freq_table[] = {
1586 { 12000000, 800000000, 66, 1, 0, 0 }, /* actual: 792.0 MHz */ 1586 { 12000000, 800000000, 66, 1, 1, 0 }, /* actual: 792.0 MHz */
1587 { 13000000, 800000000, 61, 1, 0, 0 }, /* actual: 793.0 MHz */ 1587 { 13000000, 800000000, 61, 1, 1, 0 }, /* actual: 793.0 MHz */
1588 { 38400000, 297600000, 93, 4, 2, 0 }, 1588 { 38400000, 297600000, 93, 4, 3, 0 },
1589 { 38400000, 400000000, 125, 4, 2, 0 }, 1589 { 38400000, 400000000, 125, 4, 3, 0 },
1590 { 38400000, 532800000, 111, 4, 1, 0 }, 1590 { 38400000, 532800000, 111, 4, 2, 0 },
1591 { 38400000, 665600000, 104, 3, 1, 0 }, 1591 { 38400000, 665600000, 104, 3, 2, 0 },
1592 { 38400000, 800000000, 125, 3, 1, 0 }, 1592 { 38400000, 800000000, 125, 3, 2, 0 },
1593 { 38400000, 931200000, 97, 4, 0, 0 }, 1593 { 38400000, 931200000, 97, 4, 1, 0 },
1594 { 38400000, 1065600000, 111, 4, 0, 0 }, 1594 { 38400000, 1065600000, 111, 4, 1, 0 },
1595 { 38400000, 1200000000, 125, 4, 0, 0 }, 1595 { 38400000, 1200000000, 125, 4, 1, 0 },
1596 { 38400000, 1331200000, 104, 3, 0, 0 }, 1596 { 38400000, 1331200000, 104, 3, 1, 0 },
1597 { 38400000, 1459200000, 76, 2, 0, 0 }, 1597 { 38400000, 1459200000, 76, 2, 1, 0 },
1598 { 38400000, 1600000000, 125, 3, 0, 0 }, 1598 { 38400000, 1600000000, 125, 3, 1, 0 },
1599 { 0, 0, 0, 0, 0, 0 }, 1599 { 0, 0, 0, 0, 0, 0 },
1600}; 1600};
1601 1601
@@ -1705,9 +1705,9 @@ static struct tegra_clk_pll_params pll_e_params = {
1705}; 1705};
1706 1706
1707static struct tegra_clk_pll_freq_table pll_re_vco_freq_table[] = { 1707static struct tegra_clk_pll_freq_table pll_re_vco_freq_table[] = {
1708 { 12000000, 672000000, 56, 1, 0, 0 }, 1708 { 12000000, 672000000, 56, 1, 1, 0 },
1709 { 13000000, 672000000, 51, 1, 0, 0 }, /* actual: 663.0 MHz */ 1709 { 13000000, 672000000, 51, 1, 1, 0 }, /* actual: 663.0 MHz */
1710 { 38400000, 672000000, 70, 4, 0, 0 }, 1710 { 38400000, 672000000, 70, 4, 1, 0 },
1711 { 0, 0, 0, 0, 0, 0 }, 1711 { 0, 0, 0, 0, 0, 0 },
1712}; 1712};
1713 1713
@@ -1754,8 +1754,8 @@ static struct div_nmp pllp_nmp = {
1754}; 1754};
1755 1755
1756static struct tegra_clk_pll_freq_table pll_p_freq_table[] = { 1756static struct tegra_clk_pll_freq_table pll_p_freq_table[] = {
1757 { 12000000, 408000000, 34, 1, 0, 0 }, 1757 { 12000000, 408000000, 34, 1, 1, 0 },
1758 { 38400000, 408000000, 85, 8, 0, 0 }, /* cf = 4.8MHz, allowed exception */ 1758 { 38400000, 408000000, 85, 8, 1, 0 }, /* cf = 4.8MHz, allowed exception */
1759 { 0, 0, 0, 0, 0, 0 }, 1759 { 0, 0, 0, 0, 0, 0 },
1760}; 1760};
1761 1761
@@ -1820,14 +1820,14 @@ static struct div_nmp plla_nmp = {
1820}; 1820};
1821 1821
1822static struct tegra_clk_pll_freq_table pll_a_freq_table[] = { 1822static struct tegra_clk_pll_freq_table pll_a_freq_table[] = {
1823 { 12000000, 282240000, 47, 1, 1, 1, 0xf148 }, /* actual: 282240234 */ 1823 { 12000000, 282240000, 47, 1, 2, 1, 0xf148 }, /* actual: 282240234 */
1824 { 12000000, 368640000, 61, 1, 1, 1, 0xfe15 }, /* actual: 368640381 */ 1824 { 12000000, 368640000, 61, 1, 2, 1, 0xfe15 }, /* actual: 368640381 */
1825 { 12000000, 240000000, 60, 1, 2, 1, 0 }, 1825 { 12000000, 240000000, 60, 1, 3, 1, 0 },
1826 { 13000000, 282240000, 43, 1, 1, 1, 0xfd7d }, /* actual: 282239807 */ 1826 { 13000000, 282240000, 43, 1, 2, 1, 0xfd7d }, /* actual: 282239807 */
1827 { 13000000, 368640000, 56, 1, 1, 1, 0x06d8 }, /* actual: 368640137 */ 1827 { 13000000, 368640000, 56, 1, 2, 1, 0x06d8 }, /* actual: 368640137 */
1828 { 13000000, 240000000, 55, 1, 2, 1, 0 }, /* actual: 238.3 MHz */ 1828 { 13000000, 240000000, 55, 1, 3, 1, 0 }, /* actual: 238.3 MHz */
1829 { 38400000, 282240000, 44, 3, 1, 1, 0xf333 }, /* actual: 282239844 */ 1829 { 38400000, 282240000, 44, 3, 2, 1, 0xf333 }, /* actual: 282239844 */
1830 { 38400000, 368640000, 57, 3, 1, 1, 0x0333 }, /* actual: 368639844 */ 1830 { 38400000, 368640000, 57, 3, 2, 1, 0x0333 }, /* actual: 368639844 */
1831 { 38400000, 240000000, 75, 3, 3, 1, 0 }, 1831 { 38400000, 240000000, 75, 3, 3, 1, 0 },
1832 { 0, 0, 0, 0, 0, 0, 0 }, 1832 { 0, 0, 0, 0, 0, 0, 0 },
1833}; 1833};
@@ -1873,9 +1873,9 @@ static struct div_nmp plld_nmp = {
1873}; 1873};
1874 1874
1875static struct tegra_clk_pll_freq_table pll_d_freq_table[] = { 1875static struct tegra_clk_pll_freq_table pll_d_freq_table[] = {
1876 { 12000000, 594000000, 99, 1, 1, 0, 0 }, 1876 { 12000000, 594000000, 99, 1, 2, 0, 0 },
1877 { 13000000, 594000000, 91, 1, 1, 0, 0xfc4f }, /* actual: 594000183 */ 1877 { 13000000, 594000000, 91, 1, 2, 0, 0xfc4f }, /* actual: 594000183 */
1878 { 38400000, 594000000, 30, 1, 1, 0, 0x0e00 }, 1878 { 38400000, 594000000, 30, 1, 2, 0, 0x0e00 },
1879 { 0, 0, 0, 0, 0, 0, 0 }, 1879 { 0, 0, 0, 0, 0, 0, 0 },
1880}; 1880};
1881 1881
@@ -1911,9 +1911,9 @@ static struct tegra_clk_pll_params pll_d_params = {
1911}; 1911};
1912 1912
1913static struct tegra_clk_pll_freq_table tegra210_pll_d2_freq_table[] = { 1913static struct tegra_clk_pll_freq_table tegra210_pll_d2_freq_table[] = {
1914 { 12000000, 594000000, 99, 1, 1, 0, 0xf000 }, 1914 { 12000000, 594000000, 99, 1, 2, 0, 0xf000 },
1915 { 13000000, 594000000, 91, 1, 1, 0, 0xfc4f }, /* actual: 594000183 */ 1915 { 13000000, 594000000, 91, 1, 2, 0, 0xfc4f }, /* actual: 594000183 */
1916 { 38400000, 594000000, 30, 1, 1, 0, 0x0e00 }, 1916 { 38400000, 594000000, 30, 1, 2, 0, 0x0e00 },
1917 { 0, 0, 0, 0, 0, 0, 0 }, 1917 { 0, 0, 0, 0, 0, 0, 0 },
1918}; 1918};
1919 1919
@@ -1955,9 +1955,9 @@ static struct tegra_clk_pll_params pll_d2_params = {
1955}; 1955};
1956 1956
1957static struct tegra_clk_pll_freq_table pll_dp_freq_table[] = { 1957static struct tegra_clk_pll_freq_table pll_dp_freq_table[] = {
1958 { 12000000, 270000000, 90, 1, 3, 0, 0xf000 }, 1958 { 12000000, 270000000, 90, 1, 4, 0, 0xf000 },
1959 { 13000000, 270000000, 83, 1, 3, 0, 0xf000 }, /* actual: 269.8 MHz */ 1959 { 13000000, 270000000, 83, 1, 4, 0, 0xf000 }, /* actual: 269.8 MHz */
1960 { 38400000, 270000000, 28, 1, 3, 0, 0xf400 }, 1960 { 38400000, 270000000, 28, 1, 4, 0, 0xf400 },
1961 { 0, 0, 0, 0, 0, 0, 0 }, 1961 { 0, 0, 0, 0, 0, 0, 0 },
1962}; 1962};
1963 1963
@@ -2007,9 +2007,9 @@ static struct div_nmp pllu_nmp = {
2007}; 2007};
2008 2008
2009static struct tegra_clk_pll_freq_table pll_u_freq_table[] = { 2009static struct tegra_clk_pll_freq_table pll_u_freq_table[] = {
2010 { 12000000, 480000000, 40, 1, 0, 0 }, 2010 { 12000000, 480000000, 40, 1, 1, 0 },
2011 { 13000000, 480000000, 36, 1, 0, 0 }, /* actual: 468.0 MHz */ 2011 { 13000000, 480000000, 36, 1, 1, 0 }, /* actual: 468.0 MHz */
2012 { 38400000, 480000000, 25, 2, 0, 0 }, 2012 { 38400000, 480000000, 25, 2, 1, 0 },
2013 { 0, 0, 0, 0, 0, 0 }, 2013 { 0, 0, 0, 0, 0, 0 },
2014}; 2014};
2015 2015