Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jul 2016 23:37:02 -0400
From:      Lee D <embaudarm@gmail.com>
To:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Questions about writing custom boot loader, Zynq, Zybo
Message-ID:  <CANC_bnOba%2B_805pnXohGPMxOUe6_cMBUwDXcC6PDLvFE%2BDxUdw@mail.gmail.com>
In-Reply-To: <C91EF32E-7131-4E03-8FE4-758C53613C7D@yahoo.com>
References:  <C91EF32E-7131-4E03-8FE4-758C53613C7D@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 24, 2016 at 11:43 AM, Thomas Skibo via freebsd-arm <
freebsd-arm@freebsd.org> wrote:
>
> >
> > 3. Is there anything special about how the Zynq is configured in
> > ps7_init.c?
>
> Absolutely.  ps7_init.c sets up all the clocks and DDR parameters and is
> very board specific.  This might be why you=E2=80=99re having problems wi=
th the
> RS232 port.  The clock settings may not match the clock values in the dtb=
.
>

I was able to track down my boot hang to the mmc_wait_for_req() function
in src/sys/dev/mmc/mmc.c.

It gets stuck in an msleep call waiting for a mutex to be released... I
think...  the call looks like:

        while ((req->flags & MMC_REQ_DONE) =3D=3D 0) {
                msleep(req, &sc->sc_mtx, 0, "mmcreq", 0);
        }

It's not spinning in that while loop, it just never returns from msleep().

I'm not sure if this is a timer problem or an MMC driver problem.  I've
tried setting the Zynq SD controller to the same register values it has
when booting normally with u-boot, but to no avail.

Does u-boot do any important configuration to the timers or to the SD
controller?

Suggestions welcome...  I'm not sure how to continue debugging this.

Thanks,

Lee



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANC_bnOba%2B_805pnXohGPMxOUe6_cMBUwDXcC6PDLvFE%2BDxUdw>