mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: barebox@lists.infradead.org, d.schultz@phytec.de, c.hemp@phytec.de
Subject: Re: [ptxdist] boot problem w/ barebox
Date: Tue, 12 Sep 2017 10:32:02 +0200	[thread overview]
Message-ID: <20170912083202.urfrvyewzddlghg6@pengutronix.de> (raw)
In-Reply-To: <207dcf09-6116-29e2-e854-aa3e02cc0c10@gr13.net>

Hello,

On Mon, Sep 11, 2017 at 08:47:03PM +0200, Enrico Weigelt, metux IT consult wrote:
> On 11.09.2017 09:16, Uwe Kleine-König wrote:
> 
> > Try adding a #define DEBUG in linux-4.13/arch/arm/boot/compressed/head.S
> > > and make sure enabled DEBUG_LL and selected the right UART in your>
> .config.
> After deep digging in the init code, I've meanwhile fixed it (at least
> with self-compiled 2015 bbx - didn't try newer versions yet). In the end
> was just dt misconfiguration (that wasn't obvious in this dts wood,
> which I ported from the old 4.1-phy tree): the debug uart was disabled.
> 
> This lead to some funny situations:
> 
> * DEBUG_ll worked after fixing the port number (the counting is a bit
>   confusing: ttymxc1 is #2)

CONFIG_DEBUG_IMX_UART_PORT=2 means it should use UART-2 as documented in
the reference manual. But yeah, this is confusing, the problem is that
the hardware guy numbering the UARTS named the first UART UART-1 which
isn't what a kernel hacker would have picked.

> * console works up to the point where the uarts tty drivers are
>   configured. as the uart was disabled in dt, no tty driver was
>   associated (while ll driver was still active), so the clock was
>   disabled on some point, leading to supposedly hangup (actually,
>   just the console was gone)

When the UART tty driver are configured doesn't play a role here. At
some point during boot all unused clocks are disabled and up to then no
driver ensured your uart clock to be used. And maybe you had a real
hangup because writing to an UART with its clock off might have "funny"
effects.

> * hacking out the clock disable lead further to the point where rootfs
>   is mounted and init started

There is no need for a hack, just pass "clk_ignore_unused" on the kernel
command line.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2017-09-12  8:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-09  9:01 Enrico Weigelt, metux IT consult
2017-09-11  7:16 ` Uwe Kleine-König
2017-09-11 18:47   ` Enrico Weigelt, metux IT consult
2017-09-12  8:32     ` Uwe Kleine-König [this message]
2017-09-13 10:56       ` Enrico Weigelt, metux IT consult

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170912083202.urfrvyewzddlghg6@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=c.hemp@phytec.de \
    --cc=d.schultz@phytec.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox