[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201301141054.27872.arnd@arndb.de>
Date: Mon, 14 Jan 2013 10:54:27 +0000
From: Arnd Bergmann <arnd@...db.de>
To: Vineet Gupta <Vineet.Gupta1@...opsys.com>
Cc: Grant Likely <grant.likely@...retlab.ca>,
linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
tglx@...utronix.de, Paul Mundt <lethal@...ux-sh.org>
Subject: Re: early init dt for earlyprintk (was Re: [RFC PATCH v1 25/31] ARC: [plat-arcfpga] Hooking up platform to ARC UART)
On Monday 14 January 2013, Vineet Gupta wrote:
>
> On Wednesday 07 November 2012 07:46 PM, Arnd Bergmann wrote:
>
> OK, I have DeviceTree infrastructure in place. After wrapping my head around
> irq-domains, the whole thing indeed seems like a nice abstraction. ARC Port
> converted to it and patches to arc-uart driver to that effect posted to serial
> lists.
Ok, very good.
> Couple of things though:
>
> 1. While I've eliminated the platform_device population for SERIAL_ARC, we still
> need the static resource definitions and aux platform data for
> early_platform_add_devices() for SERIAL_ARC_CONSOLE since it uses the early param
> based driver registration and device probe. AFAIKS, there's no existing way to
> scan a special "earlyprintk" node (from flat tree) which at a minimum contains a
> "reg" property and some device specific platform info. There are only a few other
> drivers which uses the same design (e.g. tty/serial/sh-sci.c) but they don't seem
> to be DT enabled. Thus in the short term we will have to live with static coding
> for early platform device. Later on we can clean it up - I can take a stab at
> adding earlyprintk based bits to fdt.c - if that makes sense.
There is always a question of how early you want the early printk to be --
the earlier you want it, the more hacks you end up needing.
The early_platform_device infrastructure is not used by a lot of architectures,
so things can get a little hairy. Something you can do though is have an
early_console without a platform_device attached to it, and scan the
device tree for the nodes manually in order to find the registers.
It would be good if we could eventually agree on a common approach for this,
but right now just use whatever works for you.
> 2. We really need a Documentation/dt-for-new-linux-arches.txt, as the existing
> refs - while very helpful - fail to mention subtleties such as you absolutely need
> a intc instance and a default irq domain ..... before the driver can start using
> the DT. Also the board specific callbacks etc are not really fundamental to the DT
> concept (at least I initially thought so) causing a distraction when adding the
> initial implementation. The minimal dynamic device population can very well be
> done in a arch initcall. I'll sum these up in a documentation-for-dummies and
> float around.
Ok, great! That is very much appreciated.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists