edp: anx6345、rk32-edp:load as fs_initcall
authoryxj <yxj@rock-chips.com>
Fri, 28 Mar 2014 08:27:59 +0000 (16:27 +0800)
committeryxj <yxj@rock-chips.com>
Fri, 28 Mar 2014 13:26:09 +0000 (21:26 +0800)
drivers/video/rockchip/transmitter/dp_anx6345.c
drivers/video/rockchip/transmitter/rk32_dp.c

index 1dbd77f84935a56325e3ed721c67b1762dd2643b..7da6493044ce3fd7c3bac929689543e0321ea79f 100644 (file)
@@ -1419,6 +1419,6 @@ static void __exit anx6345_module_exit(void)
        i2c_del_driver(&anx6345_i2c_driver);
 }
 
-subsys_initcall_sync(anx6345_module_init);
+fs_initcall(anx6345_module_init);
 module_exit(anx6345_module_exit);
 
index 05549c9d482e51ab69c18f79e7727e0efc4bc7cc..dcdbd9bcd77227ee9c465cfb0914321dae7674e6 100644 (file)
@@ -34,7 +34,7 @@
 //#define EDP_BIST_MODE
 
 static struct rk32_edp *rk32_edp;
-static int lcdc_probed = 0;
+
 static int rk32_edp_clk_enable(struct rk32_edp *edp)
 {
        if (!edp->clk_on) {
@@ -68,12 +68,14 @@ static int rk32_edp_pre_init(void)
 
        val = 0x80008000;
        writel_relaxed(val, RK_CRU_VIRT + 0x0d0); /*select 24m*/
-
+       dsb();
        val = 0x80008000;
        writel_relaxed(val, RK_CRU_VIRT + 0x01d0); /*reset edp*/
+       dsb();
        udelay(1);
        val = 0x80000000;
        writel_relaxed(val, RK_CRU_VIRT + 0x01d0);
+       dsb();
        udelay(1);
        return 0;
 }
@@ -1096,11 +1098,6 @@ static irqreturn_t rk32_edp_isr(int irq, void *arg)
        struct rk32_edp *edp = arg;
        enum dp_irq_type irq_type;
 
-       if (!lcdc_probed) {
-               disable_irq_nosync(edp->irq);
-               return 0;
-       }
-       
        irq_type = rk32_edp_get_irq_type(edp);
        switch (irq_type) {
        case DP_IRQ_TYPE_HP_CABLE_IN:
@@ -1135,7 +1132,6 @@ static int rk32_edp_enable(void)
 
        rk32_edp_clk_enable(edp);
        rk32_edp_pre_init();
-       lcdc_probed = 1;
        rk32_edp_init_edp(edp);
        enable_irq(edp->irq);
        /*ret = rk32_edp_handle_edid(edp);
@@ -1262,6 +1258,8 @@ static int rk32_edp_probe(struct platform_device *pdev)
        clk_prepare(edp->pclk);
        clk_prepare(edp->clk_edp);
        clk_prepare(edp->clk_24m);
+       rk32_edp_clk_enable(edp);
+       rk32_edp_pre_init();
        edp->irq = platform_get_irq(pdev, 0);
        if (edp->irq < 0) {
                dev_err(&pdev->dev, "cannot find IRQ\n");
@@ -1274,6 +1272,7 @@ static int rk32_edp_probe(struct platform_device *pdev)
                return ret;
        }
        disable_irq_nosync(edp->irq);
+       rk32_edp_clk_disable(edp);
        rk32_edp = edp;
        rk_fb_trsm_ops_register(&trsm_edp_ops, SCREEN_EDP);
        dev_info(&pdev->dev, "rk32 edp driver probe success\n");
@@ -1317,5 +1316,5 @@ static void __exit rk32_edp_module_exit(void)
 
 }
 
-subsys_initcall_sync(rk32_edp_module_init);
+fs_initcall(rk32_edp_module_init);
 module_exit(rk32_edp_module_exit);