static void ddr_init(u32 dram_speed_bin, u32 freq)
{
- printk(KERN_DEBUG pr_fmt("In Func:%s,dram_speed_bin:%d,freq:%d\n"),
- __func__, dram_speed_bin, freq);
- if (scpi_ddr_init(dram_speed_bin, freq))
+ int lcdc_type;
+
+ lcdc_type = rockchip_get_screen_type();
+ printk(KERN_DEBUG pr_fmt("In Func:%s,dram_speed_bin:%d,freq:%d,lcdc_type:%d\n"),
+ __func__, dram_speed_bin, freq, lcdc_type);
+ if (scpi_ddr_init(dram_speed_bin, freq, lcdc_type))
pr_info("ddr init error\n");
else
printk(KERN_DEBUG pr_fmt("%s out\n"), __func__);
}
+static int ddr_init_resume(struct platform_device *pdev)
+{
+ ddr_init(DDR3_DEFAULT, 0);
+ return 0;
+}
+
static int __init rockchip_ddr_probe(struct platform_device *pdev)
{
struct device_node *np;
};
static struct platform_driver rockchip_ddr_driver = {
+#ifdef CONFIG_PM
+ .resume = ddr_init_resume,
+#endif /* CONFIG_PM */
.driver = {
.name = "rockchip_ddr",
.of_match_table = rockchip_ddr_of_match,