From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Sun, 02 Aug 2015 10:53:47 +0200 Subject: [U-Boot] [PATCH 04/12] arm: mx6: cm-fx6: setup hdmi only on hdmi enable In-Reply-To: <1437661179-32128-5-git-send-email-nikita@compulab.co.il> References: <1437661179-32128-1-git-send-email-nikita@compulab.co.il> <1437661179-32128-5-git-send-email-nikita@compulab.co.il> Message-ID: <55BDDA9B.3020801@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 23/07/2015 16:19, Nikita Kiryanov wrote: > Refactor display code to only setup hdmi if do_enable_hdmi() is invoked. > > Cc: Stefano Babic > Cc: Igor Grinberg > Signed-off-by: Nikita Kiryanov > --- > board/compulab/cm_fx6/cm_fx6.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c > index 3e518c1..e85c8ab 100644 > --- a/board/compulab/cm_fx6/cm_fx6.c > +++ b/board/compulab/cm_fx6/cm_fx6.c > @@ -52,6 +52,9 @@ int splash_screen_prepare(void) > #ifdef CONFIG_IMX_HDMI > static void cm_fx6_enable_hdmi(struct display_info_t const *dev) > { > + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; > + imx_setup_hdmi(); > + setbits_le32(&mxc_ccm->CCGR3, MXC_CCM_CCGR3_IPU1_IPU_DI0_MASK); > imx_enable_hdmi_phy(); > } > > @@ -79,15 +82,9 @@ static struct display_info_t preset_hdmi_1024X768 = { > > static void cm_fx6_setup_display(void) > { > - struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; > struct iomuxc *const iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR; > - int reg; > > enable_ipu_clock(); > - imx_setup_hdmi(); > - reg = __raw_readl(&mxc_ccm->CCGR3); > - reg |= MXC_CCM_CCGR3_IPU1_IPU_DI0_MASK; > - writel(reg, &mxc_ccm->CCGR3); > clrbits_le32(&iomuxc_regs->gpr[3], MXC_CCM_CCGR3_IPU1_IPU_DI0_MASK); > } > > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================