linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Igor Grinberg <grinberg@compulab.co.il>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Wolfgang Denk <wd@denx.de>, Arnd Bergmann <arnd@arndb.de>,
	linux-arm-kernel@lists.infradead.org,
	Lee Jones <lee.jones@linaro.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Arnd Bergmann <arnd@ardb.de>, Olof Johansson <olof@lixom.net>,
	linux-embedded@vger.kernel.org, linux-kernel@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: Handling of modular boards
Date: Fri, 11 May 2012 09:15:04 +0300	[thread overview]
Message-ID: <4FACAE68.2090004@compulab.co.il> (raw)
In-Reply-To: <4FABE9BE.2010108@wwwdotorg.org>

On 05/10/12 19:15, Stephen Warren wrote:
> On 05/10/2012 06:40 AM, Igor Grinberg wrote:
>> On 05/05/12 01:09, Mark Brown wrote:
>>> On Fri, May 04, 2012 at 10:33:57PM +0200, Wolfgang Denk wrote:
>>
>>>> On the other hand, some of the issues we're trying to solve
>>>> here for the kernel are also present in the boot loader, so
>>>> this needs to do this anyway - whether by inserting new or
>>>> modifying (enabling or disabling) existing properties in the DT
>>>> is not really relevant here.
>>
>>> FWIW if the bootloader can usefully handle this stuff I think
>>> that's a good approach but there is substantial variation in
>>> quality of implementation between bootloaders and even when the
>>> bootloader is a good one it's not always practical to update it
>>> or the data it relies on.
>>
>> I agree on this (and also with Ben), all our boards/extensions/base
>> boards/etc can be discovered in the boot loader and we will use the
>> DT to pass the relevant information on the attached extensions and
>> used base board.
>>
>> Also, most (if not all) of our boards/extensions have I2C EEPROM
>> which describes the devices on that board/extension which is useful
>> for building/extending the DT in the bootloader.
> 
> I believe that's true for all/many NVIDIA boards too.
> 
> But, duplicating all this in every bootloader might not make sense.

Yeah, I agree on this, especially when you have multiple bootloaders
for the same board...

On the other hand, that is a common problem of the open source
software - anyone can create a bootloader, publish and use it...

> Sure there are some cases where the bootloader needs this information
> (e.g. to load the kernel from an SD card that's on 1 of N plugin
> boards), but there may be much information the bootloader doesn't care
> about.
> 
> Would it make sense to write a DT-identifying-and-merging shim that
> can be executed by the bootloader, create the final DT, and then jump
> to the kernel?
> 
> Hmmm. That's probably a bad idea, since then it means needing e.g. I2C
> drivers to read the ID EEPROMs, pinmux drivers, ... in the shim.
> 
> Perhaps the common shim idea makes sense, but we need a standardized
> API it can use that all bootloaders provide for it to operate.

Let's see where we're heading:
We created/extended the DT to abstract all the SoC/board specific
(probably also undetectable) stuff away from the kernel and now we will
create a special shi(t)m that will interface the bootloader and create the DT?

I don't think it is a good idea, especially because you still need to change
the bootloader(s) and if you place the I2C/pinmux/gpio drivers inside that
shi(t)m, you duplicate the bootloader, no?

I think we should let the bootloader(s) create/extend the DT and if for some
reason a bootloader wants to separate the DT code into a shim, let it be so.

> 
> This is beginning to sound a lot like a UEFI byte code module (I
> assume; I know little about them)

That's another curse... probably we will not get away from it...

 

-- 
Regards,
Igor.

  reply	other threads:[~2012-05-11  6:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-04 18:58 Handling of modular boards Mark Brown
2012-05-04 19:34 ` Arnd Bergmann
2012-05-04 20:07   ` Mark Brown
2012-05-04 20:33   ` Wolfgang Denk
2012-05-04 20:39     ` Arnd Bergmann
2012-05-04 20:54       ` Wolfgang Denk
2012-05-04 21:03         ` Arnd Bergmann
2012-05-04 21:09           ` Stephen Warren
2012-05-04 21:52             ` Mark Brown
2012-05-04 22:09     ` Mark Brown
2012-05-10 10:41       ` Ben Dooks
2012-05-10 12:40       ` Igor Grinberg
2012-05-10 16:15         ` Stephen Warren
2012-05-11  6:15           ` Igor Grinberg [this message]
2012-05-08 12:26   ` Linus Walleij
2012-05-09 17:12     ` Mark Brown
2012-05-04 19:50 ` Stephen Warren
2012-05-04 20:38   ` Wolfgang Denk
2012-05-04 20:59     ` Stephen Warren
2012-05-04 20:44   ` Mark Brown
2012-05-08 12:33     ` Linus Walleij
2012-05-09  8:41     ` Alessandro Rubini
2012-05-10 10:43   ` Ben Dooks
2012-05-10 16:11     ` Stephen Warren
2012-05-04 22:55 ` Russell King - ARM Linux
2012-05-04 23:40   ` Mark Brown
2012-05-04 23:52     ` Russell King - ARM Linux
2012-05-05  0:03       ` Mark Brown

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=4FACAE68.2090004@compulab.co.il \
    --to=grinberg@compulab.co.il \
    --cc=arnd@ardb.de \
    --cc=arnd@arndb.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=sameo@linux.intel.com \
    --cc=swarren@wwwdotorg.org \
    --cc=wd@denx.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).