Message ID | 1457437348-31327-7-git-send-email-semen.protsenko@linaro.org |
---|---|
State | Deferred |
Delegated to: | Tom Rini |
Headers | show |
On Tuesday 08 March 2016 05:12 PM, Semen Protsenko wrote: > From: Sam Protsenko <semen.protsenko@linaro.org> > > Use eMMC (instead of SD card) to store U-Boot environment. Any specific reason why you want this change? Thanks and regards, Lokesh > > Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> > --- > include/configs/am57xx_evm.h | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h > index 1ab9498..f467f46 100644 > --- a/include/configs/am57xx_evm.h > +++ b/include/configs/am57xx_evm.h > @@ -22,11 +22,13 @@ > > #define CONFIG_NR_DRAM_BANKS 2 > > -#define CONFIG_ENV_SIZE (64 << 10) > -#define CONFIG_ENV_IS_IN_FAT > -#define FAT_ENV_INTERFACE "mmc" > -#define FAT_ENV_DEVICE_AND_PART "0:1" > -#define FAT_ENV_FILE "uboot.env" > +/* MMC ENV related defines */ > +#define CONFIG_ENV_IS_IN_MMC > +#define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */ > +#define CONFIG_ENV_SIZE (128 << 10) > +#define CONFIG_ENV_OFFSET 0xE0000 > +#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) > +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT > > #define CONSOLEDEV "ttyO2" > #define CONFIG_SYS_NS16550_COM1 UART1_BASE /* Base EVM has UART0 */ >
On Tue, Mar 8, 2016 at 6:42 PM, Lokesh Vutla <a0131933@ti.com> wrote: > Any specific reason why you want this change? > Yes, I'm thinking about use case when developer uses eMMC exclusively (no SD card). In that case the environment should be stored somewhere, and that should be eMMC. In other words, once eMMC support is fully available in U-Boot, we can think more about eMMC use-case, because developers usually prefer to work with eMMC. Also see how it's done in DRA7 config, for example. And in SD card use case we can still work with environment stored in eMMC. Seems like win-win to me.
On Wed, Mar 09, 2016 at 05:46:49PM +0700, Sam Protsenko wrote: > On Tue, Mar 8, 2016 at 6:42 PM, Lokesh Vutla <a0131933@ti.com> wrote: > > Any specific reason why you want this change? > > > > Yes, I'm thinking about use case when developer uses eMMC exclusively > (no SD card). In that case the environment should be stored somewhere, > and that should be eMMC. In other words, once eMMC support is fully > available in U-Boot, we can think more about eMMC use-case, because > developers usually prefer to work with eMMC. Also see how it's done in > DRA7 config, for example. And in SD card use case we can still work > with environment stored in eMMC. Seems like win-win to me. Except the DRA7 boards don't also support a community board like am57xx does, the Beagle x15. That's a big SD heavy use-case.
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 1ab9498..f467f46 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -22,11 +22,13 @@ #define CONFIG_NR_DRAM_BANKS 2 -#define CONFIG_ENV_SIZE (64 << 10) -#define CONFIG_ENV_IS_IN_FAT -#define FAT_ENV_INTERFACE "mmc" -#define FAT_ENV_DEVICE_AND_PART "0:1" -#define FAT_ENV_FILE "uboot.env" +/* MMC ENV related defines */ +#define CONFIG_ENV_IS_IN_MMC +#define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */ +#define CONFIG_ENV_SIZE (128 << 10) +#define CONFIG_ENV_OFFSET 0xE0000 +#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT #define CONSOLEDEV "ttyO2" #define CONFIG_SYS_NS16550_COM1 UART1_BASE /* Base EVM has UART0 */