From fb1c43cc37ae45c6c0576d976a53b9222819691c Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 27 Feb 2017 18:22:03 +0100 Subject: common: Move environment choice to Kconfig The environment location is something that might change per board (depending on what storage options are availaible there) or depending on the user choice (when we have several options). Instead of hardcoding it in our configuration header, create a Kconfig choice with the options we use for now, and the symbols that depend on it. Once done, also remove the irrelevant sunxi defines. Signed-off-by: Maxime Ripard Reviewed-by: Tom Rini Reviewed-by: Jagan Teki --- include/configs/sunxi-common.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'include/configs/sunxi-common.h') diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 377ae00a7b..bebbe94088 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -134,7 +134,9 @@ /* mmc config */ #ifdef CONFIG_MMC #define CONFIG_MMC_SUNXI_SLOT 0 -#define CONFIG_ENV_IS_IN_MMC +#endif + +#if defined(CONFIG_ENV_IS_IN_MMC) #define CONFIG_SYS_MMC_ENV_DEV 0 /* first detected MMC controller */ #define CONFIG_SYS_MMC_MAX_DEVICE 4 #endif @@ -164,9 +166,6 @@ #define CONFIG_SYS_MONITOR_LEN (768 << 10) /* 768 KiB */ -#define CONFIG_ENV_OFFSET (544 << 10) /* (8 + 24 + 512) KiB */ -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ - #define CONFIG_FAT_WRITE /* enable write access */ #define CONFIG_SPL_FRAMEWORK @@ -330,13 +329,6 @@ extern int soft_i2c_gpio_scl; #define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE #endif -#if !defined CONFIG_ENV_IS_IN_MMC && \ - !defined CONFIG_ENV_IS_IN_NAND && \ - !defined CONFIG_ENV_IS_IN_FAT && \ - !defined CONFIG_ENV_IS_IN_SPI_FLASH -#define CONFIG_ENV_IS_NOWHERE -#endif - #define CONFIG_MISC_INIT_R #ifndef CONFIG_SPL_BUILD -- cgit