rk3288 lcdc: add control vop power domain
authorhjc <hjc@rock-chips.com>
Thu, 17 Apr 2014 06:34:55 +0000 (14:34 +0800)
committerhjc <hjc@rock-chips.com>
Thu, 17 Apr 2014 06:52:32 +0000 (14:52 +0800)
arch/arm/boot/dts/rk3288.dtsi
drivers/video/rockchip/lcdc/rk3288_lcdc.c

index 662a0f256dadb462dc467393d28881b9f007b684..cfa032626d43023f32e30de12f709521e221b415 100755 (executable)
                pinctrl-0 = <&lcdc0_lcdc>;
                pinctrl-1 = <&lcdc0_gpio>;              
                status = "disabled";
-               clocks = <&clk_gates15 7>, <&dclk_lcdc1>, <&clk_gates15 8>;
-               clock-names = "aclk_lcdc", "dclk_lcdc", "hclk_lcdc";
+               clocks = <&clk_gates15 7>, <&dclk_lcdc1>, <&clk_gates15 8>, <&pd_vop1>;
+               clock-names = "aclk_lcdc", "dclk_lcdc", "hclk_lcdc", "pd_lcdc";
        };
 
        lcdc0: lcdc@ff930000 {
                //pinctrl-0 = <&lcdc0_lcdc>;
                //pinctrl-1 = <&lcdc0_gpio>;
                status = "disabled";
-               clocks = <&clk_gates15 5>, <&dclk_lcdc0>, <&clk_gates15 6>;
-               clock-names = "aclk_lcdc", "dclk_lcdc", "hclk_lcdc";
+               clocks = <&clk_gates15 5>, <&dclk_lcdc0>, <&clk_gates15 6>, <&pd_vop0>;
+               clock-names = "aclk_lcdc", "dclk_lcdc", "hclk_lcdc", "pd_lcdc";
        };
 
        adc: adc@ff100000 {
index 9dc130775dd58b46431abb160f50c6c6ddfcb967..bd495095fb20e7a8a6168b3b02826031d33c0a33 100755 (executable)
@@ -96,7 +96,7 @@ static int rk3288_lcdc_clk_enable(struct lcdc_device *lcdc_dev)
                clk_prepare_enable(lcdc_dev->hclk);
                clk_prepare_enable(lcdc_dev->dclk);
                clk_prepare_enable(lcdc_dev->aclk);
-               /*clk_enable(lcdc_dev->pd);*/
+               clk_prepare_enable(lcdc_dev->pd);
                spin_lock(&lcdc_dev->reg_lock);
                lcdc_dev->clk_on = 1;
                spin_unlock(&lcdc_dev->reg_lock);
@@ -119,7 +119,7 @@ static int rk3288_lcdc_clk_disable(struct lcdc_device *lcdc_dev)
                clk_disable_unprepare(lcdc_dev->dclk);
                clk_disable_unprepare(lcdc_dev->hclk);
                clk_disable_unprepare(lcdc_dev->aclk);
-               /*clk_disable(lcdc_dev->pd);*/
+               clk_disable_unprepare(lcdc_dev->pd);
        }
 
        return 0;
@@ -211,6 +211,7 @@ static int rk3288_lcdc_pre_init(struct rk_lcdc_driver *dev_drv)
        lcdc_dev->hclk = devm_clk_get(lcdc_dev->dev, "hclk_lcdc");
        lcdc_dev->aclk = devm_clk_get(lcdc_dev->dev, "aclk_lcdc");
        lcdc_dev->dclk = devm_clk_get(lcdc_dev->dev, "dclk_lcdc");
+       lcdc_dev->pd   = devm_clk_get(lcdc_dev->dev, "pd_lcdc");
        
        if (IS_ERR(lcdc_dev->pd) || (IS_ERR(lcdc_dev->aclk)) ||
            (IS_ERR(lcdc_dev->dclk)) || (IS_ERR(lcdc_dev->hclk))) {