
On Tue, Jul 25, 2023 at 12:47:10PM -0500, Andrew Davis wrote:
On 7/25/23 12:18 PM, Tom Rini wrote:
On Tue, Jul 25, 2023 at 11:40:58AM -0500, Andrew Davis wrote:
This is more complex than it needs to be and makes converting these boards over to plain text env files more difficult. Simplify this environment variable scheme.
Signed-off-by: Andrew Davis afd@ti.com
include/configs/k2e_evm.h | 5 +---- include/configs/k2g_evm.h | 4 +--- include/configs/k2hk_evm.h | 5 +---- include/configs/k2l_evm.h | 5 +---- include/configs/ti_armv7_keystone2.h | 6 +----- include/environment/ti/spi.h | 14 -------------- 6 files changed, 5 insertions(+), 34 deletions(-) delete mode 100644 include/environment/ti/spi.h
So this unwinding isn't quite enough as the defconfigs also set CONFIG_MTDPARTS_DEFAULT and that's the best way.
The one in CONFIG_MTDPARTS_DEFAULT is different from the one defined in k2*_evm.h, so switching would change the env. This patch was attempting to make no changes.
Maybe a better question is do we need these anymore? They don't seem to do anything anymore and these partitions are board specific, so couldn't be set universally in defconfig anyway. Plus They are instead already defined (correctly too) in the DTS files for each board. Should we just drop mtdparts=?
So, CONFIG_MTDPARTS_DEFAULT (and related) largely just results in setting mtdparts= in the default environment. So yes, if they're correct in the DTS files the best thing to do is remove the CONFIG options and remove the environment settings and then there won't be confusion about which one is the source of truth.