All of lore.kernel.org
 help / color / mirror / Atom feed
From: domenico.andreoli@linux.com (Domenico Andreoli)
To: linux-arm-kernel@lists.infradead.org
Subject: Forcing DEBUG_UART_{PHYS, VIRT} changes when switching between v7 platforms?
Date: Mon, 14 Apr 2014 16:25:39 +0200	[thread overview]
Message-ID: <20140414142539.GA21490@glitch> (raw)
In-Reply-To: <20140320124648.GS7528@n2100.arm.linux.org.uk>

On Thu, Mar 20, 2014 at 12:46:48PM +0000, Russell King - ARM Linux wrote:
> On Thu, Mar 20, 2014 at 12:45:33PM +0100, Arnd Bergmann wrote:
> > 
> > Ok, thanks for the clarification. On a semi-related topic, we have
> > (once more) discussed adding an early printk implementation during
> > the Linaro Connect meeting this month. I think this would all become
> > much less painful if we had a way to handle console output in a
> > platform independent way before the regular console kicks in, like
> > a few other architectures do.
 
This reminds me a related investigation I did:

http://thread.gmane.org/gmane.linux.ports.arm.kernel/177186

> > debug_ll is great for debugging the extremely early code, since
> > it works basically from the first instruction on, but a lot of
> > problems actually happen much later. The early console code
> > runs from parse_early_param(), which comes after setup_arch(),
> > so we can't use to debug that part but it means we already
> > have an unflattened device tree to work with for finding typical
> > 8250 or pl011 ports. At the moment, pl011 doesn't even have a
> > console_initcall, so it comes up only at arch_initcall time,
> > which is about the earliest a normal tty driver can get registered,
> > and a lot can go wrong between parse_early_param() and
> > arch_initcall().
> 
> It depends how much crap you want to shovel into serial drivers.  Fixing
> stuff to work at console_initcall time basically means that the driver
> has to have some way to find where the console is independent of the
> driver model - because the driver model won't be up and running at that
> point.

Indeed there was some "early console" driver model and some crap to push
this through the decompressor throat.

> Yes, we could have a console_initcall() in there parsing the device tree
> for a console port, but what console= parameter would that correspond
> with?  You wouldn't know which ttyAM* port it should tie up with because
> you don't have that information at that point in time - and it's important
> to know that so that /dev/console in userspace works.

there was decomp-console-dt.patch saying:

| This is the very minimal support of DT that currently the decompressor
| console provides. That is reading the command line from the DT.
|
| This means that pure DT machines currently need some console data to
| be shipped to the decompressor (tags have their DT table) although they
| already provide all the required info in the DT, where the decompressor
| should ideally take them.
|
| So the current blocker here is what to extract from DT. Or, what to _put_
| into the DT for the decompressor.

I think that the match of console= + DT serial drivers + "early console"
driver model (which establishes the ttyXXXYY <-> DT compatible property,
in the serial driver itself) is enough to get the thing working.

Maybe it would not look so horrible, is it worth a try?

Regards,
Domenico

  reply	other threads:[~2014-04-14 14:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19 23:38 Forcing DEBUG_UART_{PHYS, VIRT} changes when switching between v7 platforms? Florian Fainelli
2014-03-20  7:07 ` Arnd Bergmann
2014-03-20 10:11   ` Russell King - ARM Linux
2014-03-20 11:45     ` Arnd Bergmann
2014-03-20 12:46       ` Russell King - ARM Linux
2014-04-14 14:25         ` Domenico Andreoli [this message]
2014-03-20 18:22   ` Florian Fainelli
2014-03-20 18:26     ` Russell King - ARM Linux
2014-03-20 13:36 ` Rob Herring

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=20140414142539.GA21490@glitch \
    --to=domenico.andreoli@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.