From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Date: Mon, 5 Feb 2018 14:43:58 +0100 Subject: [U-Boot] [PATCH] cmd: nvedit: env_get_f must check for env_get_char error codes In-Reply-To: References: <20180131065648.5490-1-sgoldschmidt@de.pepperl-fuchs.com> <86985599-0df7-a690-b027-1ce740235bd8@de.pepperl-fuchs.com> <20180202185149.fmuled5rrxg4uiki@flea.lan> Message-ID: <20180205134358.h4wan73viaa6eynj@flea> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de 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 p= lan > >>> to add .get_char function to other drivers? Without that function, we > >>> cannot get env variables before relocation. > >> > >> Ehrm, sorry=C2=A0 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 fal= lback > >> would be to just remove that get_char code path totally and always loa= d from > >> the internal (default) environment until the full environment is avail= able > >> (after relocation). > >> > >> After all, the environment variables loaded via get_char are not CRC c= hecked > >> at all. To me, this is another indication that this code is not really > >> useful and should probably be removed. > >=20 > > 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 :) >=20 > 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 --=20 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: