mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] common: oftree: Pass bootsource and bootsource instance to kernel
Date: Mon, 14 May 2018 09:48:08 +0200	[thread overview]
Message-ID: <20180514074808.gs6vnuy5ba5qmcmk@pengutronix.de> (raw)
In-Reply-To: <20180508212125.5923-2-andrew.smirnov@gmail.com>

Hi Andrey,

On Tue, May 08, 2018 at 02:21:24PM -0700, Andrey Smirnov wrote:
> Pass barebox-detected bootsource and bootsource instance to Linux to
> make it availible to Linux userspace. We use put the version under
> /chosen/bootsource and it can be read under Linux in
> 
> /sys/firmware/devicetree/base/chosen/bootsource

I like the idea of having the bootsource available in Linux and more
than once thought about implementing it. However, I don't think it's
good to put the rather adhoc strings from barebox into the devicetree.

I'd rather have a phandle pointing to the actual device providing the
bootsource. Something like converting bootsource/bootsource_instance
into an alias name, lookup that alias in the device tree and create a
phandle pointing to the node the alias points to aswell. This may be
more complicated, but this way we do not have to think up any mapping.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-05-14  7:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08 21:21 [PATCH 0/2] Pass reset and boot sources via /chosen node Andrey Smirnov
2018-05-08 21:21 ` [PATCH 1/2] common: oftree: Pass bootsource and bootsource instance to kernel Andrey Smirnov
2018-05-14  7:48   ` Sascha Hauer [this message]
2018-05-15  5:40     ` Andrey Smirnov
2018-05-08 21:21 ` [PATCH 2/2] common: oftree: Pass reset source and reset source " Andrey Smirnov

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=20180514074808.gs6vnuy5ba5qmcmk@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=andrew.smirnov@gmail.com \
    --cc=barebox@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox