ARM: tegra11: Fake clk-m rate as 13M in Quickturn
Bo Yan [Wed, 23 May 2012 01:10:22 +0000 (18:10 -0700)]
In Quickturn environment, the detected clock rate can be 115200
or 230400. In this case, we need to fake clock rate as 13M.

Change-Id: I926bc932a002c17c463a62bebce2554194c716cd
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: http://git-master/r/104029
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

Rebase-Id: Rde09a61ede880cad10a3038dde9a01892c1aa430

arch/arm/mach-tegra/tegra11_clocks.c

index 64c8c88..4c095de 100644 (file)
@@ -603,6 +603,12 @@ static unsigned long tegra11_clk_m_autodetect_rate(struct clk *c)
                auto_clock_control |= OSC_CTRL_OSC_FREQ_48MHZ;
                BUG_ON(pll_ref_div != OSC_CTRL_PLL_REF_DIV_4);
                break;
+       case 115200:    /* fake 13M for QT */
+       case 230400:    /* fake 13M for QT */
+               auto_clock_control |= OSC_CTRL_OSC_FREQ_13MHZ;
+               c->rate = 13000000;
+               BUG_ON(pll_ref_div != OSC_CTRL_PLL_REF_DIV_1);
+               break;
        default:
                pr_err("%s: Unexpected clock rate %ld", __func__, c->rate);
                BUG();