Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9700DC433F5 for ; Fri, 10 Sep 2021 08:21:17 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 70A5061074 for ; Fri, 10 Sep 2021 08:21:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 70A5061074 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5B04F83590; Fri, 10 Sep 2021 10:21:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="VAx/SE/Z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BAF7F8351C; Fri, 10 Sep 2021 10:21:12 +0200 (CEST) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3E2798351C for ; Fri, 10 Sep 2021 10:21:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=glaroque@baylibre.com Received: by mail-wm1-x334.google.com with SMTP id v20-20020a1cf714000000b002e71f4d2026so582105wmh.1 for ; Fri, 10 Sep 2021 01:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0bDjbYU03k7k/IxYX8XgOmV7lBglR2JRg8E62DEGCJA=; b=VAx/SE/ZiMgchZfbORd15erPxRwG3ZLxwinwsrlfvgdEkuV5eLu9JJmYJ7Nh5RsgxM pCYi9Fobia6uYyA2evXvbDmAaCgKp2xGfeMk7BQDUmxR9sNKimnaM/O7RsVyZU0arqod Bi/SUll54AN4QIiCkoD0Sf/de/dPB7QrjlFDc86gszv+K53c4h5x1Vl+3sT0xK3xSuVq LWWMGes69m77RWnakCh299CCX+CMCiwnT9OhH1tOeEYHih6L/hoqMbwzqmGJH2D/in2k hvrM3DyZH9wpMolUPs8P8xsalzLO1VJ98o87GXUs3rC/hl+i03o8vNFz7nb33E8Px5xC klYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0bDjbYU03k7k/IxYX8XgOmV7lBglR2JRg8E62DEGCJA=; b=KFeaGqiduy467DWzA8zRi6ndnc8zElg+wMF6Xz1p6zeinnRo5b1VvG38lBya9N0uCi OzG5sSTXrRkLrN1cSne9tZrnN8iXIYHtu73Jnm0pltlh7i2M6U7vjpEgFybL081drmsz 1hEr9b+vBYAmUcuEnHbTOyXPf1cntJmTf/VibbV3S0UQk1Gb9cbxY6ZYeDKTJ42geoLy I76xORL8K9D9waRnfLAJGK+kOav9Irwg7XtWmZSXaM5H7wJe3nU6SvL2FNX1kuxb3srY ZF3VqtOqsDM+cx+TzwuxXuTn1FtZSqYqAr/+kb9c/Ec/xFbsUcx1dnjp03KZkKeYxtpA lmow== X-Gm-Message-State: AOAM5318LF8cFqwLu0rWECeGhHj9WQt5fwHAlmNGdX0Kt3m+ysSE9wH3 2xWZVK3bNcjnaZgLiVmq9v4MjQ== X-Google-Smtp-Source: ABdhPJz0wlHAv+WHrQPd9Kbmi45UfpYTdnG3I3U6OzZtxNvGykCcb8bvx33MVQRgdzJaa9jexuPXRw== X-Received: by 2002:a05:600c:4f86:: with SMTP id n6mr7176675wmq.53.1631262067596; Fri, 10 Sep 2021 01:21:07 -0700 (PDT) Received: from localhost.localdomain ([88.127.185.201]) by smtp.gmail.com with ESMTPSA id c4sm4052927wme.14.2021.09.10.01.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 01:21:07 -0700 (PDT) From: Guillaume La Roque To: GSS_MTK_Uboot_upstream@mediatek.com, chunfeng.yun@mediatek.com, weijie.gao@mediatek.com, ryder.lee@mediatek.com Cc: daniel.schwierzeck@gmail.com, fparent@baylibre.com, u-boot@lists.denx.de, mkorpershoek@baylibre.com Subject: [PATCH v2] arm: mediatek: merge board Kconfigs into mach-mediatek Date: Fri, 10 Sep 2021 10:21:06 +0200 Message-Id: <20210910082106.2724908-1-glaroque@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean 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 --- arch/arm/mach-mediatek/Kconfig | 42 +++++++++++++++++++++++----- arch/mips/mach-mtmips/Kconfig | 3 ++ arch/mips/mach-mtmips/mt7620/Kconfig | 8 +++++- arch/mips/mach-mtmips/mt7628/Kconfig | 9 +++++- board/mediatek/mt7620/Kconfig | 12 -------- board/mediatek/mt7622/Kconfig | 17 ----------- board/mediatek/mt7623/Kconfig | 13 --------- board/mediatek/mt7628/Kconfig | 12 -------- board/mediatek/mt7629/Kconfig | 17 ----------- board/mediatek/mt8183/Kconfig | 13 --------- board/mediatek/mt8512/Kconfig | 14 ---------- board/mediatek/mt8516/Kconfig | 13 --------- board/mediatek/mt8518/Kconfig | 14 ---------- 13 files changed, 53 insertions(+), 134 deletions(-) delete mode 100644 board/mediatek/mt7620/Kconfig delete mode 100644 board/mediatek/mt7622/Kconfig delete mode 100644 board/mediatek/mt7623/Kconfig delete mode 100644 board/mediatek/mt7628/Kconfig delete mode 100644 board/mediatek/mt7629/Kconfig delete mode 100644 board/mediatek/mt8183/Kconfig delete mode 100644 board/mediatek/mt8512/Kconfig delete mode 100644 board/mediatek/mt8516/Kconfig delete mode 100644 board/mediatek/mt8518/Kconfig diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig index e067604d9b..43979838e0 100644 --- a/arch/arm/mach-mediatek/Kconfig +++ b/arch/arm/mach-mediatek/Kconfig @@ -80,12 +80,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// 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/.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 diff --git a/arch/mips/mach-mtmips/Kconfig b/arch/mips/mach-mtmips/Kconfig index 8756cadb0b..05347ff78c 100644 --- a/arch/mips/mach-mtmips/Kconfig +++ b/arch/mips/mach-mtmips/Kconfig @@ -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 diff --git a/arch/mips/mach-mtmips/mt7620/Kconfig b/arch/mips/mach-mtmips/mt7620/Kconfig index 5db83eb9d9..3ca711ad0f 100644 --- a/arch/mips/mach-mtmips/mt7620/Kconfig +++ b/arch/mips/mach-mtmips/mt7620/Kconfig @@ -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 diff --git a/arch/mips/mach-mtmips/mt7628/Kconfig b/arch/mips/mach-mtmips/mt7628/Kconfig index e3f56e782e..feb122df32 100644 --- a/arch/mips/mach-mtmips/mt7628/Kconfig +++ b/arch/mips/mach-mtmips/mt7628/Kconfig @@ -45,8 +45,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 index b9137adcc9..0000000000 --- a/board/mediatek/mt7620/Kconfig +++ /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 index d0abdc0a67..0000000000 --- a/board/mediatek/mt7622/Kconfig +++ /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 index a8c670e71f..0000000000 --- a/board/mediatek/mt7623/Kconfig +++ /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 index d6b6f9d632..0000000000 --- a/board/mediatek/mt7628/Kconfig +++ /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 index 6055164b52..0000000000 --- a/board/mediatek/mt7629/Kconfig +++ /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 index b75c3b8d80..0000000000 --- a/board/mediatek/mt8183/Kconfig +++ /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 index 87bd1fbe69..0000000000 --- a/board/mediatek/mt8512/Kconfig +++ /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 index a87d3872fe..0000000000 --- a/board/mediatek/mt8516/Kconfig +++ /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 index 1971c4d8c3..0000000000 --- a/board/mediatek/mt8518/Kconfig +++ /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 -- 2.25.1