All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aditya Prayoga <aditya@kobol.io>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/6] arm: mvebu: helios4: mmc: move environment before 1M
Date: Fri, 30 Nov 2018 10:54:54 +0800	[thread overview]
Message-ID: <1543546499-106725-2-git-send-email-aditya@kobol.io> (raw)
In-Reply-To: <1543546499-106725-1-git-send-email-aditya@kobol.io>

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 */
-- 
2.7.4

  reply	other threads:[~2018-11-30  2:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30  2:54 [U-Boot] [PATCH v2 0/6] Update support for Helios4 board Aditya Prayoga
2018-11-30  2:54 ` Aditya Prayoga [this message]
2018-11-30  2:54 ` [U-Boot] [PATCH v2 2/6] arm: mvebu: helios4: Enable I2C and IO Expander Aditya Prayoga
2018-11-30  2:54 ` [U-Boot] [PATCH v2 3/6] arm: mvebu: helios4: Enable mvebu GPIO Aditya Prayoga
2018-11-30  2:54 ` [U-Boot] [PATCH v2 4/6] arm: mvebu: helios4: Reduce U-Boot image size Aditya Prayoga
2018-11-30  2:54 ` [U-Boot] [PATCH v2 5/6] arm: mvebu: helios4: Enable SPI flash support Aditya Prayoga
2018-11-30  2:54 ` [U-Boot] [PATCH v2 6/6] arm: mvebu: helios4: Reset uSOM onboard phy during board init Aditya Prayoga
2018-11-30  7:44   ` Stefan Roese
2018-11-30  8:14     ` Aditya Prayoga
2018-11-30  8:25       ` Stefan Roese
2018-12-03  2:39         ` Aditya Prayoga
2018-12-04 14:40           ` Baruch Siach
2018-12-04 15:37             ` Aditya Prayoga
2018-12-04 15:51               ` Stefan Roese
2018-12-04 16:06                 ` Aditya Prayoga

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=1543546499-106725-2-git-send-email-aditya@kobol.io \
    --to=aditya@kobol.io \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.