[U-Boot] usb start crashing on arndale

Inderpal Singh inderpal.singh at linaro.org
Wed Mar 12 05:18:25 CET 2014


Hi,


On 11 March 2014 20:25, armdev <armdev.ftm at gmail.com> wrote:

> Adding Inderpal singh and Trini. Please help
>
> On 11-Mar-2014, at 12:27 pm, armdev <armdev.ftm at gmail.com> wrote:
>
> > Hi,
> >
> > We have recently started working on arndale and running u-boot head on
> it. Seems like it is crashing on our setup with a data abort on usb start.
> Can anyone please confirm and suggest a fix / solution
> >
> > U-Boot 2014.04-rc1-00486-geeb72e6 (Mar 11 2014 - 11:44:32) for ARNDALE
> >
> > CPU:    Exynos5250 at 1000MHz
> >
> > Board: Arndale
> > I2C:   i2c_init: failed to init bus 0 for speed = 100000
> > ready
> > DRAM:  2 GiB
> > trace: copying 00084f98 bytes of early data from 50000000 to beff0000
> > trace: enabled
> > WARNING: Caches not enabled
> > MMC:   EXYNOS DWMMC: 0, EXYNOS DWMMC: 1
> > i2c_init: failed to init bus 0 for speed = 100000
> > In:    serial
> > Out:   serial
> > Err:   serial
> > Net:   Net Initialization Skipped
> > No ethernet found.
> > Hit any key to stop autoboot:  0
> > ARNDALE # usb start
> > (Re)start USB...
> > USB0:   data abort
> > pc : [<bef8524c>]          lr : [<bef85298>]
> > sp : beb5f9c0  ip : 00000003     fp : 00000000
> > r10: 00000000  r9 : beb62ecc     r8 : befbcc80
> > r7 : befbcc84  r6 : 0000ffff     r5 : 000000ff  r4 : 00000001
> > r3 : 00000000  r2 : 00000001     r1 : 000000ff  r0 : 0000ffff
> > Flags: nzCv  IRQs off  FIQs off  Mode SVC_32
> > Resetting CPU ...
> >
> >
>

I was able to reproduce the issue and git bisect tells me that it started
happening after the commit "8475c86 s5p: gpio: change gpio coding method
for s5p gpio".

Upon debugging further I figured out that it happens because the function
fdtdec_setup_gpio returns success even if there is no gpio defined. Since
no error is returned the exynos ehci driver goes ahead to setup the gpio
and data abort happens. If I return failure from this function it works
well.

diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 1fecab3..b1c4e92 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -526,7 +526,7 @@ int fdtdec_setup_gpio(struct fdt_gpio_state *gpio)
         * optional GPIOs)
         */
        if (!fdt_gpio_isvalid(gpio))
-               return 0;
+               return -1;


I am not sure of the objective to return success if there is no gpio
defined.
Simon, could you please suggest where do we need to fix it ? the above
function or gpio driver ?

Thanks,
Inder




> > Thanks and Regards
> > Armdev at FTM Team
> >
>
>


More information about the U-Boot mailing list