U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bodonoghue@codehermit.ie>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 2/3] fdt: Fixup compile error and add a new OF manipulation option
Date: Tue, 12 Feb 2008 14:16:45 +0000	[thread overview]
Message-ID: <20080212141645.32631da9@neuromancer.mindspace> (raw)
In-Reply-To: <47B19EB2.8080400@ge.com>

On Tue, 12 Feb 2008 08:27:14 -0500
Jerry Van Baren <gerald.vanbaren@ge.com> wrote:

> Bryan O'Donoghue wrote:

> Hi Bryan,
> 
> I don't think CONFIG_OF_CHOSEN_UPDATE is needed.  If it *is* needed, I 
> don't think it *should be* needed and we need to discuss scenarios.

Hey Jerry.

I'd have to say I fundamentally agree with the principal you're putting
forward here - i.e. that using a compile time define is a bit inflexible and
doubly wrong in that it's manipulating a parameter which ideally shouldn't
exist anyway.

The behavior I'm looking for is simply where /chosen/bootargs - doesn't exist
in a dts - that U-boot will fill in it's environment bootargs entry in the
tree - i.e. it creates /chosen/<prop> if <prop> doesn't exist.

> Initially, we did not touch the /chosen node *at all* if it already 
> existed.  That was where the "force" flag came from - the criteria 
> wasn't fine grained enough.  That behavior was changed in the 1.3.1 time 
> frame to be fine grained: if /chosen exists, but /chosen/<prop> doesn't, 
> that property is created and set to the required value.

That creation won't happen though due to the code fragment below.
 
> If /chosen/<prop> exists, it is overwritten only if the "force" flag is 
> set.  What you have added with CONFIG_OF_CHOSEN_UPDATE it a compile time 
> "force" flag setting.
> 
> Maybe that is desirable, but I'm going to challenge you to justify it.  :-)

Nope it's admitedly a blunt instrument to accomplish stuffing /chosen/<prop> if
<prop> doesn't exist.

What the define works around is this in fdt_support.c

/*
 * If we have a "chosen" node already the "force the writing"
 * is not set, our job is done.
 */
if ((nodeoffset >= 0) && !force)
	return 0;

The default sans CONFIG_OF_CHOSEN_UPDATE in do_bootm_linux is to pass force = 0
- which means if /chosen is present in the dts - then no manipulation of
the /chosen entry will be performed - as I read it anyway.

I was thinking that some sort of define would be the least invasive way of
changing that.... with a view to the least amount of change being the most
likely to be acceptable to other developers - not necessarily the best way to
do the thing....

  reply	other threads:[~2008-02-12 14:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-12  1:11 [U-Boot-Users] [PATCH 2/3] fdt: Fixup compile error and add a new OF manipulation option Bryan O'Donoghue
2008-02-12 13:27 ` Jerry Van Baren
2008-02-12 14:16   ` Bryan O'Donoghue [this message]
2008-02-12 14:58     ` Jerry Van Baren
2008-02-12 15:26       ` Stefan Roese
2008-02-12 16:12       ` Bryan O'Donoghue

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=20080212141645.32631da9@neuromancer.mindspace \
    --to=bodonoghue@codehermit.ie \
    --cc=u-boot@lists.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