U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sekhar Nori <nsekhar@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/7] configs: k2*_evm: let each board decide env location
Date: Fri, 2 Jun 2017 17:54:00 +0530	[thread overview]
Message-ID: <20170602122405.18983-3-nsekhar@ti.com> (raw)
In-Reply-To: <20170602122405.18983-1-nsekhar@ti.com>

Not all TI Keystone2 EVMs want environment in NAND flash.
K2G EVM which has an MMC/SD slot, keep environment in a
FAT partition on SD card.

Since ti_armv7_keystone2.h defines environment is in NAND,
boards which do not follow that have to #undef'ine that
configuration. This leads to ugly ordering issues around
where exactly the include of ti_armv7_keystone2.h can come
in within the k2*_evm.h files.

Move environment location to config file of each board.
This should make it easy to change it for any one board
without affecting all other boards.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
 include/configs/k2e_evm.h            | 4 ++++
 include/configs/k2g_evm.h            | 2 +-
 include/configs/k2hk_evm.h           | 4 ++++
 include/configs/k2l_evm.h            | 4 ++++
 include/configs/ti_armv7_keystone2.h | 3 ---
 5 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/include/configs/k2e_evm.h b/include/configs/k2e_evm.h
index 3a7993e8290c..b186bfc89151 100644
--- a/include/configs/k2e_evm.h
+++ b/include/configs/k2e_evm.h
@@ -27,6 +27,10 @@
 	"name_uboot=u-boot-spi-k2e-evm.gph\0"				\
 	"name_fs=arago-console-image-k2e-evm.cpio.gz\0"
 
+#define CONFIG_ENV_SIZE				(256 << 10)  /* 256 KiB */
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET			0x100000
+
 #include <configs/ti_armv7_keystone2.h>
 
 /* SPL SPI Loader Configuration */
diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h
index bee1be794baf..9a07eacb8e7a 100644
--- a/include/configs/k2g_evm.h
+++ b/include/configs/k2g_evm.h
@@ -63,8 +63,8 @@
 #define CONFIG_PHY_MICREL
 #define PHY_ANEG_TIMEOUT	10000 /* PHY needs longer aneg time */
 
-#undef CONFIG_ENV_IS_IN_NAND
 #define CONFIG_ENV_IS_IN_FAT
+#define CONFIG_ENV_SIZE			(256 << 10)  /* 256 KiB */
 #define FAT_ENV_INTERFACE		"mmc"
 #define FAT_ENV_DEVICE_AND_PART		"0:1"
 #define FAT_ENV_FILE			"uboot.env"
diff --git a/include/configs/k2hk_evm.h b/include/configs/k2hk_evm.h
index 202167bdef79..9598bc6976e9 100644
--- a/include/configs/k2hk_evm.h
+++ b/include/configs/k2hk_evm.h
@@ -27,6 +27,10 @@
 	"name_uboot=u-boot-spi-k2hk-evm.gph\0"				\
 	"name_fs=arago-console-image-k2hk-evm.cpio.gz\0"
 
+#define CONFIG_ENV_SIZE				(256 << 10)  /* 256 KiB */
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET			0x100000
+
 #include <configs/ti_armv7_keystone2.h>
 
 /* SPL SPI Loader Configuration */
diff --git a/include/configs/k2l_evm.h b/include/configs/k2l_evm.h
index a7ccdd117cd2..d054276e61eb 100644
--- a/include/configs/k2l_evm.h
+++ b/include/configs/k2l_evm.h
@@ -27,6 +27,10 @@
 	"name_uboot=u-boot-spi-k2l-evm.gph\0"				\
 	"name_fs=arago-console-image-k2l-evm.cpio.gz\0"
 
+#define CONFIG_ENV_SIZE				(256 << 10)  /* 256 KiB */
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET			0x100000
+
 #include <configs/ti_armv7_keystone2.h>
 
 /* SPL SPI Loader Configuration */
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index 3161c50abb14..512c28a5f075 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -185,9 +185,6 @@
 #define CONFIG_SYS_MAX_NAND_DEVICE		1
 #define CONFIG_SYS_NAND_MAX_CHIPS		1
 #define CONFIG_SYS_NAND_NO_SUBPAGE_WRITE
-#define CONFIG_ENV_SIZE				(256 << 10)  /* 256 KiB */
-#define CONFIG_ENV_IS_IN_NAND
-#define CONFIG_ENV_OFFSET			0x100000
 #define CONFIG_MTD_PARTITIONS
 #define CONFIG_RBTREE
 #define CONFIG_LZO
-- 
2.9.0

  parent reply	other threads:[~2017-06-02 12:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02 12:23 [U-Boot] [PATCH 0/7] fs: fat: convert to kconfig + switch some TI platforms Sekhar Nori
2017-06-02 12:23 ` [U-Boot] [PATCH RESEND 1/7] fs: fat: add kbuild configuration support Sekhar Nori
2017-06-02 14:04   ` Tom Rini
2017-06-04 17:10   ` Tom Rini
2017-06-02 12:24 ` Sekhar Nori [this message]
2017-06-02 14:03   ` [U-Boot] [PATCH 2/7] configs: k2*_evm: let each board decide env location Tom Rini
2017-06-04 17:10   ` Tom Rini
2017-06-02 12:24 ` [U-Boot] [PATCH 3/7] configs: k2g_evm: make sure config fallbacks take effect Sekhar Nori
2017-06-02 14:03   ` Tom Rini
2017-06-04 17:10   ` Tom Rini
2017-06-02 12:24 ` [U-Boot] [PATCH 4/7] config_fallbacks: add additional fallbacks for fat filesystem Sekhar Nori
2017-06-02 15:02   ` Tom Rini
2017-06-04 17:10   ` Tom Rini
2017-06-02 12:24 ` [U-Boot] [PATCH 5/7] configs: am335x: siemens: migrate to enabling FAT FS using kconfig Sekhar Nori
2017-06-02 12:24 ` [U-Boot] [PATCH 6/7] board: ti: enable support for writing to fat partition Sekhar Nori
2017-06-02 14:04   ` Tom Rini
2017-06-04 17:10   ` Tom Rini
2017-06-02 12:24 ` [U-Boot] [PATCH 7/7] configs: omapl138_lcdk: enable fat filesystem support Sekhar Nori
2017-06-03 22:02   ` Tom Rini
2017-06-03 22:00 ` [U-Boot] [PATCH] Kconfig: Migrate FS_FAT / FAT_WRITE Tom Rini
2017-06-04 17:11   ` Tom Rini

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=20170602122405.18983-3-nsekhar@ti.com \
    --to=nsekhar@ti.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox