[PATCH 4/8] Convert CONFIG_AT91SAM9G10EK et al to Kconfig

Tom Rini trini at konsulko.com
Sat Mar 12 05:07:32 CET 2022


This converts the following to Kconfig:
   CONFIG_AT91SAM9G10EK
   CONFIG_AT91SAM9261EK
   CONFIG_AT91SAM9G10

Cc: Eugen Hristev <eugen.hristev at microchip.com>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
 board/atmel/at91sam9261ek/Kconfig             | 14 ++++++++++++++
 configs/at91sam9261ek_dataflash_cs0_defconfig |  1 +
 configs/at91sam9261ek_dataflash_cs3_defconfig |  1 +
 configs/at91sam9261ek_nandflash_defconfig     |  1 +
 configs/at91sam9g10ek_dataflash_cs0_defconfig |  3 ++-
 configs/at91sam9g10ek_dataflash_cs3_defconfig |  3 ++-
 configs/at91sam9g10ek_nandflash_defconfig     |  3 ++-
 include/configs/at91sam9261ek.h               |  6 ------
 8 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/board/atmel/at91sam9261ek/Kconfig b/board/atmel/at91sam9261ek/Kconfig
index 2971b3cf9fb4..6133efe23e8a 100644
--- a/board/atmel/at91sam9261ek/Kconfig
+++ b/board/atmel/at91sam9261ek/Kconfig
@@ -9,4 +9,18 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
 	default "at91sam9261ek"
 
+choice
+	prompt "Evaluation board"
+
+config AT91SAM9G10EK
+	bool "Atmel AT91SAM9G10 EK"
+
+config AT91SAM9261EK
+	bool "Atmel AT91SAM9261 EK"
+
+config AT91SAM9G10
+	bool "Atmel AT91SAM9G10 EK"
+
+endchoice
+
 endif
diff --git a/configs/at91sam9261ek_dataflash_cs0_defconfig b/configs/at91sam9261ek_dataflash_cs0_defconfig
index 809aa718160f..1bfd11f92fb8 100644
--- a/configs/at91sam9261ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9261ek_dataflash_cs0_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_TEXT_BASE=0x21f00000
 CONFIG_SYS_MALLOC_LEN=0x2d000
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_AT91SAM9261EK=y
+CONFIG_AT91SAM9261EK=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_SIZE=0x4200
 CONFIG_ENV_OFFSET=0x4200
diff --git a/configs/at91sam9261ek_dataflash_cs3_defconfig b/configs/at91sam9261ek_dataflash_cs3_defconfig
index aa7770637508..ed6621438abe 100644
--- a/configs/at91sam9261ek_dataflash_cs3_defconfig
+++ b/configs/at91sam9261ek_dataflash_cs3_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_TEXT_BASE=0x21f00000
 CONFIG_SYS_MALLOC_LEN=0x2d000
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_AT91SAM9261EK=y
+CONFIG_AT91SAM9261EK=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_SIZE=0x4200
 CONFIG_ENV_OFFSET=0x4200
diff --git a/configs/at91sam9261ek_nandflash_defconfig b/configs/at91sam9261ek_nandflash_defconfig
index 9b86fc5628e4..8e1bbb0441a3 100644
--- a/configs/at91sam9261ek_nandflash_defconfig
+++ b/configs/at91sam9261ek_nandflash_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_TEXT_BASE=0x21f00000
 CONFIG_SYS_MALLOC_LEN=0x80000
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_AT91SAM9261EK=y
+CONFIG_AT91SAM9261EK=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9261ek"
diff --git a/configs/at91sam9g10ek_dataflash_cs0_defconfig b/configs/at91sam9g10ek_dataflash_cs0_defconfig
index cee1f9c6f75a..a84736277d83 100644
--- a/configs/at91sam9g10ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9g10ek_dataflash_cs0_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_TEXT_BASE=0x21f00000
 CONFIG_SYS_MALLOC_LEN=0x2d000
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_AT91SAM9261EK=y
+CONFIG_AT91SAM9G10=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_SIZE=0x4200
 CONFIG_ENV_OFFSET=0x4200
@@ -16,7 +17,7 @@ CONFIG_DEBUG_UART_BASE=0xfffff200
 CONFIG_DEBUG_UART_CLOCK=100000000
 CONFIG_DEBUG_UART=y
 CONFIG_SYS_LOAD_ADDR=0x22000000
-CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G10,SYS_USE_DATAFLASH_CS0"
+CONFIG_SYS_EXTRA_OPTIONS="SYS_USE_DATAFLASH_CS0"
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/mtdblock0 mtdparts=atmel_nand:-(root) rw rootfstype=jffs2"
diff --git a/configs/at91sam9g10ek_dataflash_cs3_defconfig b/configs/at91sam9g10ek_dataflash_cs3_defconfig
index f2724cd26ddc..baff817cfaf2 100644
--- a/configs/at91sam9g10ek_dataflash_cs3_defconfig
+++ b/configs/at91sam9g10ek_dataflash_cs3_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_TEXT_BASE=0x21f00000
 CONFIG_SYS_MALLOC_LEN=0x2d000
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_AT91SAM9261EK=y
+CONFIG_AT91SAM9G10=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_SIZE=0x4200
 CONFIG_ENV_OFFSET=0x4200
@@ -16,7 +17,7 @@ CONFIG_DEBUG_UART_BASE=0xfffff200
 CONFIG_DEBUG_UART_CLOCK=100000000
 CONFIG_DEBUG_UART=y
 CONFIG_SYS_LOAD_ADDR=0x22000000
-CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G10,SYS_USE_DATAFLASH_CS3"
+CONFIG_SYS_EXTRA_OPTIONS="SYS_USE_DATAFLASH_CS3"
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/mtdblock0 mtdparts=atmel_nand:-(root) rw rootfstype=jffs2"
diff --git a/configs/at91sam9g10ek_nandflash_defconfig b/configs/at91sam9g10ek_nandflash_defconfig
index 647a0e7d1da7..9cdf3a2ee008 100644
--- a/configs/at91sam9g10ek_nandflash_defconfig
+++ b/configs/at91sam9g10ek_nandflash_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_TEXT_BASE=0x21f00000
 CONFIG_SYS_MALLOC_LEN=0x80000
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_AT91SAM9261EK=y
+CONFIG_AT91SAM9G10=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9261ek"
@@ -14,7 +15,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
 CONFIG_ENV_OFFSET_REDUND=0x100000
 CONFIG_DEBUG_UART=y
 CONFIG_SYS_LOAD_ADDR=0x22000000
-CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G10,SYS_USE_NANDFLASH"
+CONFIG_SYS_EXTRA_OPTIONS="SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) root=/dev/mtdblock7 rw rootfstype=jffs2"
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index b6d0247d7cf6..347e255bfb0a 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -14,12 +14,6 @@
 #define CONFIG_SYS_AT91_SLOW_CLOCK	32768		/* slow clock xtal */
 #define CONFIG_SYS_AT91_MAIN_CLOCK	18432000	/* 18.432 MHz crystal */
 
-#ifdef CONFIG_AT91SAM9G10
-#define CONFIG_AT91SAM9G10EK		/* It's an Atmel AT91SAM9G10 EK*/
-#else
-#define CONFIG_AT91SAM9261EK		/* It's an Atmel AT91SAM9261 EK*/
-#endif
-
 #include <asm/hardware.h>
 
 #define CONFIG_ATMEL_LEGACY
-- 
2.25.1



More information about the U-Boot mailing list