MLK-14283: mxsfb: fix clock definitions for lcdif
authorRobert Chiras <robert.chiras@nxp.com>
Mon, 27 Feb 2017 13:19:50 +0000 (15:19 +0200)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:10:47 +0000 (15:10 -0500)
The mxsfb framebuffer driver uses three clock definitions, but only two
are defined in DTS for imx7s (also used by imx7d); because of this,
driver fails in probe. Since iMX7D uses only one clock, add the third clock
and make two of them dummy.
Also, add additional error messages for better identification of a
failing probe.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
arch/arm/boot/dts/imx7s.dtsi
drivers/video/fbdev/mxsfb.c

index 47da8b6..b063854 100644 (file)
                                reg = <0x30730000 0x10000>;
                                interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clks IMX7D_LCDIF_PIXEL_ROOT_CLK>,
-                                       <&clks IMX7D_LCDIF_PIXEL_ROOT_CLK>;
-                               clock-names = "pix", "axi";
+                                       <&clks IMX7D_CLK_DUMMY>,
+                                       <&clks IMX7D_CLK_DUMMY>;
+                               clock-names = "pix", "axi", "disp_axi";
                                status = "disabled";
                        };
                };
index cf8a13f..62840ec 100644 (file)
@@ -2142,6 +2142,7 @@ static int mxsfb_probe(struct platform_device *pdev)
        if (IS_ERR(host->clk_axi)) {
                host->clk_axi = NULL;
                ret = PTR_ERR(host->clk_axi);
+               dev_err(&pdev->dev, "Failed to get axi clock: %d\n", ret);
                goto fb_release;
        }
 
@@ -2149,6 +2150,7 @@ static int mxsfb_probe(struct platform_device *pdev)
        if (IS_ERR(host->clk_disp_axi)) {
                host->clk_disp_axi = NULL;
                ret = PTR_ERR(host->clk_disp_axi);
+               dev_err(&pdev->dev, "Failed to get disp_axi clock: %d\n", ret);
                goto fb_release;
        }
 
@@ -2160,6 +2162,7 @@ static int mxsfb_probe(struct platform_device *pdev)
                                               GFP_KERNEL);
        if (!fb_info->pseudo_palette) {
                ret = -ENOMEM;
+               dev_err(&pdev->dev, "Failed to allocate pseudo_palette memory\n");
                goto fb_release;
        }
 
@@ -2168,8 +2171,10 @@ static int mxsfb_probe(struct platform_device *pdev)
        pm_runtime_enable(&host->pdev->dev);
 
        ret = mxsfb_init_fbinfo(host);
-       if (ret != 0)
+       if (ret != 0) {
+               dev_err(&pdev->dev, "Failed to initialize fbinfo: %d\n", ret);
                goto fb_pm_runtime_disable;
+       }
 
        ret = mxsfb_dispdrv_init(pdev, fb_info);
        if (ret != 0) {