From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 31 Jan 2012 12:38:04 +0100 Subject: [U-Boot] [PATCH] i.MX28: Fix VDDIO and VDDA setup In-Reply-To: <4F27C164.2030203@esd.eu> References: <1327968001-13567-1-git-send-email-marek.vasut@gmail.com> <4F27C164.2030203@esd.eu> Message-ID: <201201311238.04453.marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > I tested both patch on my mx28evk. At least I cannot notice any > missbehavior :-) Downloading the patched u-boot via USB recovery > download still does not work. Good, any improvements though? > > Marek, did you find any further mentionable difference between bootlets > code and current u-boot implementation? Not yet. > > Matthias M > > On 31.01.2012 01:00, Marek Vasut wrote: > > The DC power STS shouldn't be checked if booting off 5V supply. > > > > Signed-off-by: Marek Vasut > > Cc: Wolfgang Denk > > Cc: Detlev Zundel > > Cc: Stefano Babic > > Cc: Robert Deli?n > > Cc: Fabio Estevam > > Cc: Matthias Fuchs > > --- > > > > arch/arm/cpu/arm926ejs/mx28/spl_power_init.c | 16 ++++++++++++---- > > 1 files changed, 12 insertions(+), 4 deletions(-) > > > > Note: Guys, please give this a testrun. I think it might fix the issue > > Robert was observing. I dug into the imx-bootlets and the bootrom > > X-Files and found this paranormal piece of code. Adding it fixes the > > boot issue on my crappy board. > > > > M > > > > diff --git a/arch/arm/cpu/arm926ejs/mx28/spl_power_init.c > > b/arch/arm/cpu/arm926ejs/mx28/spl_power_init.c index ee0f237..c6c25d9 > > 100644 > > --- a/arch/arm/cpu/arm926ejs/mx28/spl_power_init.c > > +++ b/arch/arm/cpu/arm926ejs/mx28/spl_power_init.c > > @@ -802,7 +802,9 @@ void mx28_power_set_vddio(uint32_t new_target, > > uint32_t new_brownout) > > > > clrsetbits_le32(&power_regs->hw_power_vddioctrl, > > > > POWER_VDDIOCTRL_TRG_MASK, diff); > > > > - if (powered_by_linreg) > > + if (powered_by_linreg || > > + (readl(&power_regs->hw_power_sts) & > > + POWER_STS_VDD5V_GT_VDDIO)) > > > > early_delay(1500); > > > > else { > > > > while (!(readl(&power_regs->hw_power_sts) & > > > > @@ -837,7 +839,9 @@ void mx28_power_set_vddio(uint32_t new_target, > > uint32_t new_brownout) > > > > clrsetbits_le32(&power_regs->hw_power_vddioctrl, > > > > POWER_VDDIOCTRL_TRG_MASK, diff); > > > > - if (powered_by_linreg) > > + if (powered_by_linreg || > > + (readl(&power_regs->hw_power_sts) & > > + POWER_STS_VDD5V_GT_VDDIO)) > > > > early_delay(1500); > > > > else { > > > > while (!(readl(&power_regs->hw_power_sts) & > > > > @@ -895,7 +899,9 @@ void mx28_power_set_vddd(uint32_t new_target, > > uint32_t new_brownout) > > > > clrsetbits_le32(&power_regs->hw_power_vdddctrl, > > > > POWER_VDDDCTRL_TRG_MASK, diff); > > > > - if (powered_by_linreg) > > + if (powered_by_linreg || > > + (readl(&power_regs->hw_power_sts) & > > + POWER_STS_VDD5V_GT_VDDIO)) > > > > early_delay(1500); > > > > else { > > > > while (!(readl(&power_regs->hw_power_sts) & > > > > @@ -930,7 +936,9 @@ void mx28_power_set_vddd(uint32_t new_target, > > uint32_t new_brownout) > > > > clrsetbits_le32(&power_regs->hw_power_vdddctrl, > > > > POWER_VDDDCTRL_TRG_MASK, diff); > > > > - if (powered_by_linreg) > > + if (powered_by_linreg || > > + (readl(&power_regs->hw_power_sts) & > > + POWER_STS_VDD5V_GT_VDDIO)) > > > > early_delay(1500); > > > > else { > > > > while (!(readl(&power_regs->hw_power_sts) &