OSDN Git Service

clk: qcom: Update the hmss_gpll0_clk_src to 300MHz
authorTaniya Das <tdas@codeaurora.org>
Tue, 18 Apr 2017 06:21:23 +0000 (11:51 +0530)
committerTaniya Das <tdas@codeaurora.org>
Tue, 18 Apr 2017 06:21:26 +0000 (11:51 +0530)
The GPLL0 source to the CPU subsystem requires 300MHz for OSM to use the
clock source. OSM internally cannot set the RCGR divider, so set the RCG to
300MHz at GCC.

Change-Id: I7a781c69656410eb4ce30126789dbaacf815e8ec
Signed-off-by: Taniya Das <tdas@codeaurora.org>
drivers/clk/qcom/clk-cpu-osm.c
drivers/clk/qcom/gcc-sdm660.c

index f82ddc3..d3914ab 100644 (file)
@@ -772,7 +772,7 @@ static const char * const gcc_parent_names_1[] = {
 };
 
 static struct freq_tbl ftbl_osm_clk_src[] = {
-       F(200000000, LMH_LITE_CLK_SRC, 3, 0, 0),
+       F(200000000, LMH_LITE_CLK_SRC, 1.5, 0, 0),
        { }
 };
 
index b55310e..b10f9ca 100644 (file)
@@ -732,6 +732,7 @@ static struct clk_rcg2 gp3_clk_src = {
 };
 
 static const struct freq_tbl ftbl_hmss_gpll0_clk_src[] = {
+       F(300000000, P_GPLL0_OUT_MAIN, 2, 0, 0),
        F(600000000, P_GPLL0_OUT_MAIN, 1, 0, 0),
        { }
 };
@@ -2755,6 +2756,9 @@ static int gcc_660_probe(struct platform_device *pdev)
        /* Keep bimc gfx clock port on all the time */
        clk_prepare_enable(gcc_bimc_gfx_clk.clkr.hw.clk);
 
+       /* Set the HMSS_GPLL0_SRC for 300MHz to CPU subsystem */
+       clk_set_rate(hmss_gpll0_clk_src.clkr.hw.clk, 300000000);
+
        dev_info(&pdev->dev, "Registered GCC clocks\n");
 
        return ret;