From: yannick fertre Date: Fri, 2 Mar 2018 14:59:21 +0000 (+0100) Subject: video: stm32: stm32_ltdc: add reset X-Git-Tag: v2018.05-rc1~64^2~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c0fb2fc0453a9a3cf1486887d7b5685af6767040;p=u-boot video: stm32: stm32_ltdc: add reset Add reset of LTDC display controller. Signed-off-by: yannick fertre --- diff --git a/drivers/video/stm32/stm32_ltdc.c b/drivers/video/stm32/stm32_ltdc.c index b417ac260a..d8784f1590 100644 --- a/drivers/video/stm32/stm32_ltdc.c +++ b/drivers/video/stm32/stm32_ltdc.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -302,6 +303,7 @@ static int stm32_ltdc_probe(struct udevice *dev) struct stm32_ltdc_priv *priv = dev_get_priv(dev); struct udevice *panel; struct clk pclk, pxclk; + struct reset_ctl rst; int ret; priv->regs = (void *)dev_read_addr(dev); @@ -316,6 +318,15 @@ static int stm32_ltdc_probe(struct udevice *dev) return ret; } + ret = reset_get_by_index(dev, 0, &rst); + if (ret) { + debug("%s: missing ltdc hardware reset\n", __func__); + return -ENODEV; + } + + /* Reset */ + reset_deassert(&rst); + ret = panel_enable_backlight(panel); if (ret) { debug("%s: panel %s enable backlight error %d\n",