[PATCH v3 18/23] solidrun: mx6cuboxi: use CONFIG_IS_ENABLED(SATA) instead of ifdef CONFIG_SATA

Troy Kisky troykiskyboundary at gmail.com
Mon Mar 13 22:31:40 CET 2023


Prepare for linking setup_sata only when CONFIG_SATA/CONFIG_SPL_SATA
is defined.

Signed-off-by: Troy Kisky <troykiskyboundary at gmail.com>
Reviewed-by: Simon Glass <sjg at chromium.org>
---

Changes in v3:
- Rebase on Simon's s/CMD_SATA/SATA/ change
- commit message updated

Changes in v2:
- use normal if, not preprocessor

 board/solidrun/mx6cuboxi/mx6cuboxi.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index cb14c2f30c9..6fa5cf4d27d 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -275,9 +275,8 @@ int board_early_init_f(void)
 {
 	setup_iomux_uart();
 
-#ifdef CONFIG_SATA
-	setup_sata();
-#endif
+	if (CONFIG_IS_ENABLED(SATA))
+		setup_sata();
 	setup_fec();
 
 	return 0;
-- 
2.34.1



More information about the U-Boot mailing list