[U-Boot] [PATCH] video: ipuv3_fb: skip IPU shutdown if IPU was not enabled before
Fabio Estevam
festevam at gmail.com
Mon Aug 28 16:22:19 UTC 2017
Hi Anatolij,
On Fri, Aug 25, 2017 at 10:10 AM, Anatolij Gustschin <agust at denx.de> wrote:
> void ipuv3_fb_shutdown(void)
> {
> - int i;
> + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
> struct ipu_stat *stat = (struct ipu_stat *)IPU_STAT;
> + u32 reg;
> + int i;
> +
> + /*
> + * Check if IPU clock was enabled before. Won't access
> + * IPU registers if clock is not enabled.
> + */
> + reg = readl(&mxc_ccm->CCGR3);
> + if ((reg & MXC_CCM_CCGR3_IPU1_IPU_MASK) == 0)
> + return;
Maybe you could also check whether IPU2 has been enabled?
More information about the U-Boot
mailing list