public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Allen Martin <amartin@nvidia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] CONFIG_DELAY_ENVIRONMENT usage
Date: Tue, 29 Jan 2013 19:05:49 -0800	[thread overview]
Message-ID: <20130130030549.GA19514@badger> (raw)

Simon, I had a question about your CONFIG_DELAY_ENVIRONMENT patch.  In
the commit description it says:

    When CONFIG_DELAY_ENVIRONMENT is defined, it is convenient to have a
    run-time way of enabling loading of the environment. Add this to the
    fdt as /config/delay-environment.

In the code, it's actually reading /config/load-environment, and it
defaults to prevent loading environment regardless if
CONFIG_DELAY_ENVIRONMENT is set or not:

static int should_load_env(void)
{
#ifdef CONFIG_OF_CONTROL
       return fdtdec_get_config_int(gd->fdt_blob, "load-environment", 0);
#elif defined CONFIG_DELAY_ENVIRONMENT
       return 0;
#else
       return 1;
#endif
}


The problem I'm seeing is that this regressed environment loading on
all boards that use fdt, because none of them have
/config/load-environment defined.  If I read the commit message
correctly, I think the actual intention is:

static int should_load_env(void)
{
#ifdef CONFIG_DELAY_ENVIRONMENT
#ifdef CONFIG_OF_CONTROL
        return fdtdec_get_config_int(gd->fdt_blob, "load-environment",
	0);
#else
        return 0;
#endif
#else
        return 1;
#endif
}


Is my understanding correct?

-Allen
-- 
nvpublic

             reply	other threads:[~2013-01-30  3:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-30  3:05 Allen Martin [this message]
2013-01-30  6:08 ` [U-Boot] CONFIG_DELAY_ENVIRONMENT usage Lucas Stach
2013-01-30 17:37   ` Allen Martin

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=20130130030549.GA19514@badger \
    --to=amartin@nvidia.com \
    --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