]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mediatek: merge board Kconfigs into mach-mediatek
authorGuillaume La Roque <glaroque@baylibre.com>
Fri, 10 Sep 2021 08:21:06 +0000 (10:21 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 23 Sep 2021 18:15:32 +0000 (14:15 -0400)
On MediaTek boards we cannot override the SYS_BOARD / SYS_CONFIG_NAME
variables from defconfig.
This is because in board/mediatek/mtXXXX/Kconfig this value was override
by default due to the if CONFIG_TARGET_MTXXXX condition.

Merge all the Kconfigs to the mach-medatek/Kconfig.

This way:
- we only define SYS_{SOC,VENDOR} once
- all board definitions are in a single place, simplifying the build logic.

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
13 files changed:
arch/arm/mach-mediatek/Kconfig
arch/mips/mach-mtmips/Kconfig
arch/mips/mach-mtmips/mt7620/Kconfig
arch/mips/mach-mtmips/mt7628/Kconfig
board/mediatek/mt7620/Kconfig [deleted file]
board/mediatek/mt7622/Kconfig [deleted file]
board/mediatek/mt7623/Kconfig [deleted file]
board/mediatek/mt7628/Kconfig [deleted file]
board/mediatek/mt7629/Kconfig [deleted file]
board/mediatek/mt8183/Kconfig [deleted file]
board/mediatek/mt8512/Kconfig [deleted file]
board/mediatek/mt8516/Kconfig [deleted file]
board/mediatek/mt8518/Kconfig [deleted file]

index 134b6b17c2d3b68a38be080f05f0595fcaf84e18..f79a5c62cd3a89324dd35acdc69119c4c1c7c581 100644 (file)
@@ -79,12 +79,40 @@ config TARGET_MT8518
 
 endchoice
 
-source "board/mediatek/mt7622/Kconfig"
-source "board/mediatek/mt7623/Kconfig"
-source "board/mediatek/mt7629/Kconfig"
-source "board/mediatek/mt8183/Kconfig"
-source "board/mediatek/mt8512/Kconfig"
-source "board/mediatek/mt8516/Kconfig"
-source "board/mediatek/mt8518/Kconfig"
+config SYS_BOARD
+       string "Board name"
+       default "mt7622" if TARGET_MT7622
+       default "mt7623" if TARGET_MT7623
+       default "mt7629" if TARGET_MT7629
+       default "mt8183" if TARGET_MT8183
+       default "mt8512" if TARGET_MT8512
+       default "mt8516" if TARGET_MT8516
+       default "mt8518" if TARGET_MT8518
+       default ""
+       help
+         This option contains information about board name.
+         Based on this option board/<CONFIG_SYS_VENDOR>/<CONFIG_SYS_BOARD> will
+         be used.
+
+config SYS_CONFIG_NAME
+       string "Board configuration name"
+       default "mt7622" if TARGET_MT7622
+       default "mt7623" if TARGET_MT7623
+       default "mt7629" if TARGET_MT7629
+       default "mt8183" if TARGET_MT8183
+       default "mt8512" if TARGET_MT8512
+       default "mt8516" if TARGET_MT8516
+       default "mt8518" if TARGET_MT8518
+       default ""
+       help
+         This option contains information about board configuration name.
+         Based on this option include/configs/<CONFIG_SYS_CONFIG_NAME>.h header
+         will be used for board configuration.
+
+config MTK_BROM_HEADER_INFO
+       string
+       default "media=nor" if TARGET_MT8518 || TARGET_MT8512 || TARGET_MT7629 || TARGET_MT7622
+       default "media=emmc" if TARGET_MT8516 || TARGET_MT8365 || TARGET_MT8183
+       default "lk=1" if TARGET_MT7623
 
 endif
index 9f300a98ba87b607ae8c6cd1c6acf2b8cf63bcb1..151b004603dbd6e1129f393db9bc894f39dec7c9 100644 (file)
@@ -1,6 +1,9 @@
 menu "MediaTek MIPS platforms"
        depends on ARCH_MTMIPS
 
+config SYS_VENDOR
+       default "mediatek" if BOARD_MT7628_RFB || BOARD_MT7620_RFB || BOARD_MT7620_MT7530_RFB
+
 config SYS_MALLOC_F_LEN
        default 0x1000
 
index 5db83eb9d9a03475137ae5c762d559cd9766cf56..3ca711ad0f3fa747b1eda898c8e191d1039f04ed 100644 (file)
@@ -66,6 +66,12 @@ config CPU_FREQ_MULTI
        default 6 if CPU_FREQ_600MHZ
        default 7 if CPU_FREQ_620MHZ
 
-source "board/mediatek/mt7620/Kconfig"
+config SYS_CONFIG_NAME
+       string "Board configuration name"
+       default "mt7620" if  BOARD_MT7620_RFB || BOARD_MT7620_MT7530_RFB
+
+config SYS_BOARD
+       string "Board name"
+       default "mt7620" if  BOARD_MT7620_RFB || BOARD_MT7620_MT7530_RFB
 
 endif
index f451c1593f6aa53f6871d2436ebd9fce1650438f..e7273591bca13cfaa08988b97494c24e6ca15ad0 100644 (file)
@@ -44,8 +44,15 @@ config SPL_UART2_SPIS_PINMUX
          Select this if the UART2 of your board is connected to GPIO 16/17
          (shared with SPIS) rather than the usual GPIO 20/21.
 
+config SYS_BOARD
+       string "Board name"
+       default "mt7628" if BOARD_MT7628_RFB
+
+config SYS_CONFIG_NAME
+       string "Board configuration name"
+       default "mt7628" if BOARD_MT7628_RFB
+
 source "board/gardena/smart-gateway-mt7688/Kconfig"
-source "board/mediatek/mt7628/Kconfig"
 source "board/seeed/linkit-smart-7688/Kconfig"
 source "board/vocore/vocore2/Kconfig"
 
diff --git a/board/mediatek/mt7620/Kconfig b/board/mediatek/mt7620/Kconfig
deleted file mode 100644 (file)
index b9137ad..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-if BOARD_MT7620_RFB || BOARD_MT7620_MT7530_RFB
-
-config SYS_BOARD
-       default "mt7620"
-
-config SYS_VENDOR
-       default "mediatek"
-
-config SYS_CONFIG_NAME
-       default "mt7620"
-
-endif
diff --git a/board/mediatek/mt7622/Kconfig b/board/mediatek/mt7622/Kconfig
deleted file mode 100644 (file)
index d0abdc0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-if TARGET_MT7622
-
-config SYS_BOARD
-       default "mt7622"
-
-config SYS_CONFIG_NAME
-       default "mt7622"
-
-config MTK_BROM_HEADER_INFO
-       string
-       default "lk=1"
-
-config MTK_BROM_HEADER_INFO
-       string
-       default "media=nor"
-
-endif
diff --git a/board/mediatek/mt7623/Kconfig b/board/mediatek/mt7623/Kconfig
deleted file mode 100644 (file)
index a8c670e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-if TARGET_MT7623
-
-config SYS_BOARD
-       default "mt7623"
-
-config SYS_CONFIG_NAME
-       default "mt7623"
-
-config MTK_BROM_HEADER_INFO
-       string
-       default "lk=1"
-
-endif
diff --git a/board/mediatek/mt7628/Kconfig b/board/mediatek/mt7628/Kconfig
deleted file mode 100644 (file)
index d6b6f9d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-if BOARD_MT7628_RFB
-
-config SYS_BOARD
-       default "mt7628"
-
-config SYS_VENDOR
-       default "mediatek"
-
-config SYS_CONFIG_NAME
-       default "mt7628"
-
-endif
diff --git a/board/mediatek/mt7629/Kconfig b/board/mediatek/mt7629/Kconfig
deleted file mode 100644 (file)
index 6055164..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-if TARGET_MT7629
-
-config SYS_BOARD
-       default "mt7629"
-
-config SYS_CONFIG_NAME
-       default "mt7629"
-
-config MTK_SPL_PAD_SIZE
-       hex
-       default 0x10000
-
-config MTK_BROM_HEADER_INFO
-       string
-       default "media=nor"
-
-endif
diff --git a/board/mediatek/mt8183/Kconfig b/board/mediatek/mt8183/Kconfig
deleted file mode 100644 (file)
index b75c3b8..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-if TARGET_MT8183
-
-config SYS_BOARD
-       default "mt8183"
-
-config SYS_CONFIG_NAME
-       default "mt8183"
-
-config MTK_BROM_HEADER_INFO
-       string
-       default "media=emmc"
-
-endif
diff --git a/board/mediatek/mt8512/Kconfig b/board/mediatek/mt8512/Kconfig
deleted file mode 100644 (file)
index 87bd1fb..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-if TARGET_MT8512
-
-config SYS_BOARD
-       default "mt8512"
-
-config SYS_CONFIG_NAME
-       default "mt8512"
-
-
-config MTK_BROM_HEADER_INFO
-       string
-       default "media=nor"
-
-endif
diff --git a/board/mediatek/mt8516/Kconfig b/board/mediatek/mt8516/Kconfig
deleted file mode 100644 (file)
index a87d387..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-if TARGET_MT8516
-
-config SYS_BOARD
-       default "mt8516"
-
-config SYS_CONFIG_NAME
-       default "mt8516"
-
-config MTK_BROM_HEADER_INFO
-       string
-       default "media=emmc"
-
-endif
diff --git a/board/mediatek/mt8518/Kconfig b/board/mediatek/mt8518/Kconfig
deleted file mode 100644 (file)
index 1971c4d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-if TARGET_MT8518
-
-config SYS_BOARD
-       default "mt8518"
-
-config SYS_CONFIG_NAME
-       default "mt8518"
-
-
-config MTK_BROM_HEADER_INFO
-       string
-       default "media=nor"
-
-endif