ret = of_property_read_u32(gpu_dn,"def_clk",
&mpdata->def_clock);
if (ret) {
- dev_notice(&pdev->dev, "default clk set to %d\n", mpdata->dvfs_table_size/2-1);
- mpdata->def_clock = mpdata->dvfs_table_size/2 - 1;
+ mpdata->def_clock = mpdata->scale_info.maxclk;
+ dev_notice(&pdev->dev, "default clk set to %d\n", mpdata->def_clock);
}
+ if (mpdata->def_clock > mpdata->scale_info.maxclk)
+ mpdata->def_clock = mpdata->scale_info.maxclk;
+
_dev_info(&pdev->dev, "default clk is %d\n", mpdata->def_clock);
dvfs_tbl = mpdata->dvfs_table;
ret = of_property_read_u32(gpu_dn,"def_clk",
&mpdata->def_clock);
if (ret) {
- dev_notice(&pdev->dev, "default clk set to %d\n", mpdata->dvfs_table_size/2-1);
- mpdata->def_clock = mpdata->dvfs_table_size/2 - 1;
+ mpdata->def_clock = mpdata->scale_info.maxclk;
+ dev_notice(&pdev->dev, "default clk set to %d\n", mpdata->def_clock);
}
if (mpdata->def_clock > mpdata->scale_info.maxclk)
mpdata->def_clock = mpdata->scale_info.maxclk;
ret = of_property_read_u32(gpu_dn,"def_clk",
&mpdata->def_clock);
if (ret) {
- dev_notice(&pdev->dev, "default clk set to %d\n", mpdata->dvfs_table_size/2-1);
- mpdata->def_clock = mpdata->dvfs_table_size/2 - 1;
+ mpdata->def_clock = mpdata->scale_info.maxclk;
+ dev_notice(&pdev->dev, "default clk set to %d\n", mpdata->def_clock);
}
+ if (mpdata->def_clock > mpdata->scale_info.maxclk)
+ mpdata->def_clock = mpdata->scale_info.maxclk;
+
_dev_info(&pdev->dev, "default clk is %d\n", mpdata->def_clock);
dvfs_tbl = mpdata->dvfs_table;
ret = of_property_read_u32(gpu_dn,"def_clk",
&mpdata->def_clock);
if (ret) {
- dev_notice(&pdev->dev, "default clk set to %d\n", mpdata->dvfs_table_size/2-1);
- mpdata->def_clock = mpdata->dvfs_table_size/2 - 1;
+ mpdata->def_clock = mpdata->scale_info.maxclk;
+ dev_notice(&pdev->dev, "default clk set to %d\n", mpdata->def_clock);
}
if (mpdata->def_clock > mpdata->scale_info.maxclk)
mpdata->def_clock = mpdata->scale_info.maxclk;