From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Mon, 16 Nov 2015 12:05:28 +0100 Subject: [U-Boot] [PATCH 14/17] km83xx: use CONFIG_ENV_ADDR for the newenv env command In-Reply-To: <1447426768-23226-15-git-send-email-valentin.longchamp@keymile.com> References: <1447426768-23226-1-git-send-email-valentin.longchamp@keymile.com> <1447426768-23226-15-git-send-email-valentin.longchamp@keymile.com> Message-ID: <5649B878.70006@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Valentin, Am 13.11.2015 um 15:59 schrieb Valentin Longchamp: > The hardcoded value are bad, since the address could change between > different boards. > > Furthermore, the relevant #defines are set only if #undefined here, so > that they can be changed by some boards if required. > > Signed-off-by: Valentin Longchamp > --- > > include/configs/km/km83xx-common.h | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) Reviewed-by: Heiko Schocher bye, Heiko > > diff --git a/include/configs/km/km83xx-common.h b/include/configs/km/km83xx-common.h > index 2325451..27b47d7 100644 > --- a/include/configs/km/km83xx-common.h > +++ b/include/configs/km/km83xx-common.h > @@ -182,10 +182,14 @@ > > #ifndef CONFIG_SYS_RAMBOOT > #define CONFIG_ENV_IS_IN_FLASH > +#ifndef CONFIG_ENV_ADDR > #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + \ > CONFIG_SYS_MONITOR_LEN) > +#endif > #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */ > +#ifndef CONFIG_ENV_OFFSET > #define CONFIG_ENV_OFFSET (CONFIG_SYS_MONITOR_LEN) > +#endif > > /* Address and size of Redundant Environment Sector */ > #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \ > @@ -320,8 +324,8 @@ > CONFIG_KM_DEF_ENV \ > CONFIG_KM_DEF_ARCH \ > "newenv=" \ > - "prot off 0xF00C0000 +0x40000 && " \ > - "era 0xF00C0000 +0x40000\0" \ > + "prot off "__stringify(CONFIG_ENV_ADDR)" +0x40000 && " \ > + "era "__stringify(CONFIG_ENV_ADDR)" +0x40000\0" \ > "unlock=yes\0" \ > "" > > -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany