public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@bootlin.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] cmd: nvedit: env_get_f must check for env_get_char error codes
Date: Mon, 5 Feb 2018 14:43:58 +0100	[thread overview]
Message-ID: <20180205134358.h4wan73viaa6eynj@flea> (raw)
In-Reply-To: <VI1PR04MB2078BA4E1CBB467DB42909D99AF90@VI1PR04MB2078.eurprd04.prod.outlook.com>

Hi York,

On Fri, Feb 02, 2018 at 08:04:12PM +0000, York Sun wrote:
> On 02/02/2018 10:51 AM, Maxime Ripard wrote:
> >>> This patch looks correct. But it doesn't fix NOR flash. Do you have plan
> >>> to add .get_char function to other drivers? Without that function, we
> >>> cannot get env variables before relocation.
> >>
> >> Ehrm, sorry  I don't plan to do that, no: my target seems to run fine
> >> without this.
> >>
> >> Given that only the eeprom and nvram env drivers support the get_char
> >> method, I don't know if this is widely used at all. Maybe a better fallback
> >> would be to just remove that get_char code path totally and always load from
> >> the internal (default) environment until the full environment is available
> >> (after relocation).
> >>
> >> After all, the environment variables loaded via get_char are not CRC checked
> >> at all. To me, this is another indication that this code is not really
> >> useful and should probably be removed.
> > 
> > To be honest, I'm not really sure what get_char was here for in the
> > first place, so getting rid of it sounds like a good idea :)
> 
> On almost all my boards, a variable hwconfig is read before relocation
> to determine DDR configuration. This has been broken. I don't mind you
> remove some dead code. But this is breaking almost all my boards booting
> from NOR flash.

Sorry if it fell through the cracks, I don't have a board with NOR
myself. Do you know what breaks exactly?

Or can you bisect at least?

Thanks!
Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180205/411347de/attachment.sig>

  reply	other threads:[~2018-02-05 13:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31  6:56 [U-Boot] [PATCH] cmd: nvedit: env_get_f must check for env_get_char error codes Simon Goldschmidt
2018-01-31  8:39 ` Maxime Ripard
2018-01-31 23:00 ` York Sun
2018-02-01  9:16   ` Simon Goldschmidt
2018-02-02 18:51     ` Maxime Ripard
2018-02-02 20:04       ` York Sun
2018-02-05 13:43         ` Maxime Ripard [this message]
2018-02-05 16:30           ` York Sun
2018-02-07  8:31             ` Maxime Ripard
2018-02-01 13:09 ` [U-Boot] " Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2018-02-03 10:27 [U-Boot] [PATCH] " Goldschmidt Simon

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=20180205134358.h4wan73viaa6eynj@flea \
    --to=maxime.ripard@bootlin.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