]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: Finish migration to Kconfig
authorTom Rini <trini@konsulko.com>
Fri, 2 Dec 2022 21:42:43 +0000 (16:42 -0500)
committerTom Rini <trini@konsulko.com>
Thu, 22 Dec 2022 15:31:48 +0000 (10:31 -0500)
Stop using CONFIG_SANDBOX_ARCH and use CONFIG_SANDBOX instead. For the
SPI related defines, set them directly in Kconfig. This now empties
arch/sandbox/include/asm/config.h.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/sandbox/include/asm/config.h
drivers/adc/adc-uclass.c
drivers/spi/Kconfig

index 50215b35d7774b6bf76ef35baebcc63a3d2601dd..87b9d23b37d28acb82f041ba74998a64de8270ab 100644 (file)
@@ -6,14 +6,4 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
-#define CONFIG_SANDBOX_ARCH
-
-/* Used by drivers/spi/sandbox_spi.c and arch/sandbox/include/asm/state.h */
-#ifndef CONFIG_SANDBOX_SPI_MAX_BUS
-#define CONFIG_SANDBOX_SPI_MAX_BUS 1
-#endif
-#ifndef CONFIG_SANDBOX_SPI_MAX_CS
-#define CONFIG_SANDBOX_SPI_MAX_CS 10
-#endif
-
 #endif
index 67137ffb3414fa8e2b328fee4daa17a5281d3617..9646e4d7062795609bca8b340dfaa8b18635de97 100644 (file)
@@ -22,7 +22,7 @@
 #define CHECK_MASK                     (!CHECK_NUMBER)
 
 /* TODO: add support for timer uclass (for early calls) */
-#ifdef CONFIG_SANDBOX_ARCH
+#ifdef CONFIG_SANDBOX
 #define sdelay(x)      udelay(x)
 #else
 extern void sdelay(unsigned long loops);
index c6900f449d5f1531489379f627567434f255df42..64ceed12ce488151b2bd5b436ef25721e5d30c89 100644 (file)
@@ -429,6 +429,16 @@ config SANDBOX_SPI
                };
          };
 
+config SANDBOX_SPI_MAX_BUS
+       int
+       depends on SANDBOX
+       default 1
+
+config SANDBOX_SPI_MAX_CS
+       int
+       depends on SANDBOX
+       default 10
+
 config SPI_ASPEED_SMC
        bool "ASPEED SPI flash controller driver"
        depends on DM_SPI && SPI_MEM