diff mbox series

[v2,5/5] sunxi-common.h: remove pointless #ifdefs

Message ID 20220201014116.25864-6-andre.przywara@arm.com
State Accepted
Commit f2c33699d1b029438ccaa154d03d632dd80aac11
Delegated to: Andre Przywara
Headers show
Series sunxi: remove lowlevel_init | expand

Commit Message

Andre Przywara Feb. 1, 2022, 1:41 a.m. UTC
Remove some pointless #ifdefs from this file, as there are quite too
many of them already.

Some definitions don't really hurt to have in any case, so remove the
pointless CONFIG_MMC guard around CONFIG_MMC_SUNXI_SLOT.

The BOARD_SIZE_LIMIT applies regardless of ARM64 or not (now), so remove
that guard as well. The maximum number of MMC devices does not depend on
CONFIG_ENV_IS_IN_MMC, so move that out to simplify the file.

Last but not least CONFIG_SPL_BOARD_LOAD_IMAGE serves no real purpose
anymore: it's unconditionally defined for all sunxi boards, and protects
nothing applicable outside of sunxi code anymore. Just remove it.

Reviewed-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 include/configs/sunxi-common.h | 7 -------
 1 file changed, 7 deletions(-)

Comments

Samuel Holland Feb. 3, 2022, 1:07 a.m. UTC | #1
On 1/31/22 7:41 PM, Andre Przywara wrote:
> Remove some pointless #ifdefs from this file, as there are quite too
> many of them already.
> 
> Some definitions don't really hurt to have in any case, so remove the
> pointless CONFIG_MMC guard around CONFIG_MMC_SUNXI_SLOT.
> 
> The BOARD_SIZE_LIMIT applies regardless of ARM64 or not (now), so remove
> that guard as well. The maximum number of MMC devices does not depend on
> CONFIG_ENV_IS_IN_MMC, so move that out to simplify the file.
> 
> Last but not least CONFIG_SPL_BOARD_LOAD_IMAGE serves no real purpose
> anymore: it's unconditionally defined for all sunxi boards, and protects
> nothing applicable outside of sunxi code anymore. Just remove it.
> 
> Reviewed-by: Samuel Holland <samuel@sholland.org>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Tested-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Even with the SMPEN code missing from SPL, for the series:

Tested-by: Samuel Holland <samuel@sholland.org>
Tested-on: Orange Pi Plus 2E
diff mbox series

Patch

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 7260eb72a40..01c3cfced20 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -93,13 +93,9 @@ 
 #endif
 
 /* mmc config */
-#ifdef CONFIG_MMC
 #define CONFIG_MMC_SUNXI_SLOT		0
-#endif
 
 #if defined(CONFIG_ENV_IS_IN_MMC)
-
-#ifdef CONFIG_ARM64
 /*
  * This is actually (CONFIG_ENV_OFFSET -
  * (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)), but the value will be used
@@ -109,7 +105,6 @@ 
 #endif
 
 #define CONFIG_SYS_MMC_MAX_DEVICE	4
-#endif
 
 /*
  * Miscellaneous configurable options
@@ -124,8 +119,6 @@ 
 
 #define CONFIG_SYS_MONITOR_LEN		(768 << 10)	/* 768 KiB */
 
-#define CONFIG_SPL_BOARD_LOAD_IMAGE
-
 /*
  * We cannot use expressions here, because expressions won't be evaluated in
  * autoconf.mk.