diff mbox series

[U-Boot,v3,1/6] arm: mvebu: helios4: mmc: move environment before 1M

Message ID 1543942645-52770-2-git-send-email-aditya@kobol.io
State Awaiting Upstream
Delegated to: Stefan Roese
Headers show
Series Update support for Helios4 board | expand

Commit Message

Aditya Prayoga Dec. 4, 2018, 4:57 p.m. UTC
Store the environment before 1M into the block device.
This constant is easier to remember, saves a little space,
and is in line with what SolidRun's 2018.01-based fork does for the
clearfog.

Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
[ Aditya Prayoga:
* Port forward]
Signed-off-by: Aditya Prayoga <aditya@kobol.io>
---
 include/configs/helios4.h | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

Comments

Stefan Roese Dec. 5, 2018, 7 a.m. UTC | #1
On 04.12.18 17:57, Aditya Prayoga wrote:
> Store the environment before 1M into the block device.
> This constant is easier to remember, saves a little space,
> and is in line with what SolidRun's 2018.01-based fork does for the
> clearfog.
> 
> Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
> [ Aditya Prayoga:
> * Port forward]
> Signed-off-by: Aditya Prayoga <aditya@kobol.io>
> ---
>   include/configs/helios4.h | 11 +++--------
>   1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/include/configs/helios4.h b/include/configs/helios4.h
> index ce912ea..c71055f 100644
> --- a/include/configs/helios4.h
> +++ b/include/configs/helios4.h
> @@ -46,14 +46,9 @@
>   /* Environment in MMC */
>   #define CONFIG_SYS_MMC_ENV_DEV		0
>   #define CONFIG_ENV_SECT_SIZE		0x200
> -#define CONFIG_ENV_SIZE			0x10000
> -/*
> - * For SD - reserve 1 LBA for MBR + 1M for u-boot image. The MMC/eMMC
> - * boot image starts @ LBA-0.
> - * As result in MMC/eMMC case it will be a 1 sector gap between u-boot
> - * image and environment
> - */
> -#define CONFIG_ENV_OFFSET		0xf0000
> +#define CONFIG_ENV_SIZE			0x2000
> +/* stay within first 1M */
> +#define CONFIG_ENV_OFFSET		(SZ_1M - CONFIG_ENV_SIZE)
>   #define CONFIG_ENV_ADDR			CONFIG_ENV_OFFSET
>   
>   #define CONFIG_PHY_MARVELL		/* there is a marvell phy */
> 

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan
diff mbox series

Patch

diff --git a/include/configs/helios4.h b/include/configs/helios4.h
index ce912ea..c71055f 100644
--- a/include/configs/helios4.h
+++ b/include/configs/helios4.h
@@ -46,14 +46,9 @@ 
 /* Environment in MMC */
 #define CONFIG_SYS_MMC_ENV_DEV		0
 #define CONFIG_ENV_SECT_SIZE		0x200
-#define CONFIG_ENV_SIZE			0x10000
-/*
- * For SD - reserve 1 LBA for MBR + 1M for u-boot image. The MMC/eMMC
- * boot image starts @ LBA-0.
- * As result in MMC/eMMC case it will be a 1 sector gap between u-boot
- * image and environment
- */
-#define CONFIG_ENV_OFFSET		0xf0000
+#define CONFIG_ENV_SIZE			0x2000
+/* stay within first 1M */
+#define CONFIG_ENV_OFFSET		(SZ_1M - CONFIG_ENV_SIZE)
 #define CONFIG_ENV_ADDR			CONFIG_ENV_OFFSET
 
 #define CONFIG_PHY_MARVELL		/* there is a marvell phy */