mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Michael Riesch <michael.riesch@wolfvision.net>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC PATCH] bootsource: add helper to set instance by name
Date: Fri, 14 Jan 2022 10:15:00 +0100	[thread overview]
Message-ID: <20220114091500.GA2312@pengutronix.de> (raw)
In-Reply-To: <20211117142448.2091017-1-michael.riesch@wolfvision.net>

On Wed, Nov 17, 2021 at 03:24:48PM +0100, Michael Riesch wrote:
> Instance numbers should be related to device tree aliases, which may be
> board-specific.

When instance numbers were introduced they were meant to be SoC
specific, i.e. they should correspond to the numbers in the manual.
When starting with device tree aliases the alias numbers were assumed to
match the numbers in the manual. On i.MX this is still mostly true, but
on (most?) other SoCs it is not. In barebox we have several users of
bootsource_get_instance() which rely on the instance being the hardware
instance number, so we can't just change that.

If we have to keep track of both hardware numbers and alias numbers we
have to store both separately and not change the meaning of the existing
instance number.

Thinking this further I don't think the alias is worth anything because
it may differ between the barebox internal device tree and the one the
kernel is booted with. We should rather store the device node providing
the bootsource. From that we can retrieve the alias matching a given
device tree if we still need it.

That said, I don't know a good way how we get there from our existing
codebase.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
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


  parent reply	other threads:[~2022-01-14  9:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 14:03 [PATCH 0/3] arm: rockchip: minor fixes as preparation for mainline dts Michael Riesch
2021-11-11 14:03 ` [PATCH 1/3] arm: rockchip: rk3568: fix mmc boot source instances Michael Riesch
2021-11-15  7:51   ` Sascha Hauer
2021-11-15  8:06     ` Sascha Hauer
2021-11-15  9:24       ` Michael Riesch
2021-11-17 14:24         ` [RFC PATCH] bootsource: add helper to set instance by name Michael Riesch
2022-01-14  8:25           ` Michael Riesch
2022-01-14  9:15           ` Sascha Hauer [this message]
2021-11-11 14:03 ` [PATCH 2/3] net: designware: rockchip: remove unnecessary clock pclk_xpcs Michael Riesch
2022-01-14  5:24   ` Ahmad Fatoum
2022-01-14  8:16     ` Sascha Hauer
2021-11-11 14:03 ` [PATCH 3/3] pinctrl: rockchip: use alias rather than full of name Michael Riesch
2021-11-15  7:54   ` Sascha Hauer
2021-11-17 12:42     ` Michael Riesch

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=20220114091500.GA2312@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=michael.riesch@wolfvision.net \
    /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