[PATCH 3/4] video: mxsfb: add clk_enable()

Giulio Benetti giulio.benetti at benettiengineering.com
Mon Apr 27 01:43:00 CEST 2020


BROM doesn't enable lcdif by default so add clk_enable() before
clk_set_rate().

Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
---
 drivers/video/mxsfb.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 8a5a61c9fb..7eab8835b0 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -72,6 +72,12 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr,
 		return;
 	}
 
+	ret = clk_enable(&per_clk);
+	if (ret < 0) {
+		dev_err(dev, "Failed to enable mxs clk: %d\n", ret);
+		return;
+	}
+
 	ret = clk_set_rate(&per_clk, timings->pixelclock.typ);
 	if (ret < 0) {
 		dev_err(dev, "Failed to set mxs clk: %d\n", ret);
-- 
2.20.1



More information about the U-Boot mailing list