[U-Boot] [PATCH v3] MX28: Check if we are using a valid VBUS for power initialization

Marek Vasut marex at denx.de
Sun Aug 5 01:40:20 CEST 2012


Dear Otavio Salvador,

> On Sat, Aug 4, 2012 at 7:49 PM, Marek Vasut <marex at denx.de> wrote:
> > Dear Otavio Salvador,
> > 
> >> Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
> >> ---
[...]

> >> -     /*
> >> -      * NOTE: In original IMX-Bootlets, this also checks for VBUSVALID,
> >> -      * but their implementation always returns 1 so we omit it here.
> >> -      */
> >> -     if (readl(&power_regs->hw_power_sts) & POWER_STS_VDD5V_GT_VDDIO) {
> >> +     if (mx28_valid_vbus() &&
> > 
> > And again ... you unconditionally add something that will break other
> > boards that aren't supplied from 5V. This part isn't present in mx28
> > bootlets if I'm right, yes?
> 
> Yes; this check is there too. But the comment about the difference
> between mx23 and mx28 code is applied here too.

According to 5VCTRL register (mx28 11.12.2) bit 4 (VBUSVALID_5VDETECT), this 
check is even redundant. Actually, if you don't use the VBUSVALID comparator, 
this check might fail I think.

> >> +             (readl(&power_regs->hw_power_sts) &
> >> POWER_STS_VDD5V_GT_VDDIO)) {
> >> 
> >>               mx28_boot_valid_5v();
> >>               return;
> >>       
> >>       }
> >>       
> >>       early_delay(1000);
> >> 
> >> -     if (readl(&power_regs->hw_power_sts) & POWER_STS_VDD5V_GT_VDDIO) {
> >> +     if (mx28_valid_vbus() &&
> >> +             (readl(&power_regs->hw_power_sts) &
> >> POWER_STS_VDD5V_GT_VDDIO)) {
> >> 
> >>               mx28_boot_valid_5v();
> >>               return;
> >>       
> >>       }
> 
> Regards,

Best regards,
Marek Vasut


More information about the U-Boot mailing list