From patchwork Mon Aug 10 14:26:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 1342854 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=mailerdienst.de header.i=@mailerdienst.de header.a=rsa-sha256 header.s=20200217 header.b=fKuTnuA6; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BQJQG4GpJz9sTh for ; Tue, 11 Aug 2020 00:34:46 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E487F81B50; Mon, 10 Aug 2020 16:34:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="fKuTnuA6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A0CA981C17; Mon, 10 Aug 2020 16:27:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mxwww.masterlogin.de (mxwww.masterlogin.de [95.129.51.220]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1D6E481260 for ; Mon, 10 Aug 2020 16:27:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=linux@fw-web.de Received: from mxout4.routing.net (unknown [192.168.10.112]) by forward.mxwww.masterlogin.de (Postfix) with ESMTPS id 9C24D962F3; Mon, 10 Aug 2020 14:27:13 +0000 (UTC) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout4.routing.net (Postfix) with ESMTP id 63D241014C8; Mon, 10 Aug 2020 14:27:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1597069633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WeZ2P3oSe6RFETx8dCdTRu9v9S9R+0Uf9F0lMCrlRzA=; b=fKuTnuA6oKBIs6AITbncEUO3BtEkjyh+iWR40tFIahOswT0gU3P5pAMgoulewo9iNwLQVB uGABlibIUk8xbOpaoIzAzq9zqZLlGlNHWMIV8JRzv0iWbG7UDhWpVUXR5uO28b+kUm9hdV OCR1sqvBW2atWcPdzMbntSQcklPdoFk= Received: from localhost.localdomain (fttx-pool-217.61.151.249.bambit.de [217.61.151.249]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id B001940501; Mon, 10 Aug 2020 14:27:12 +0000 (UTC) From: Frank Wunderlich To: u-boot@lists.denx.de Cc: Frank Wunderlich , GSS_MTK_Uboot_upstream , Ryder Lee , Weijie Gao , Oleksandr Rybalko Subject: [RFC PATCH 1/4] mt7622: Support to build 32 bits version. Date: Mon, 10 Aug 2020 16:26:49 +0200 Message-Id: <20200810142652.40669-2-linux@fw-web.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200810142652.40669-1-linux@fw-web.de> References: <20200810142652.40669-1-linux@fw-web.de> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 10 Aug 2020 16:34:27 +0200 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.102.3 at phobos.denx.de X-Virus-Status: Clean From: Oleksandr Rybalko allow building uboot in 32bit-mode for mt7622 to be compatible with bpi-r64 images Signed-off-by: Oleksandr Rybalko Signed-off-by: Frank Wunderlich --- arch/arm/mach-mediatek/Kconfig | 7 ++++++- arch/arm/mach-mediatek/mt7622/init.c | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig index 0042e57017..46e10025e4 100644 --- a/arch/arm/mach-mediatek/Kconfig +++ b/arch/arm/mach-mediatek/Kconfig @@ -10,12 +10,17 @@ config MT8512 bool "MediaTek MT8512 SoC" default n +config ARCH_MEDIATEK_32 + bool "Build 32 bits version" + default n + choice prompt "MediaTek board select" config TARGET_MT7622 bool "MediaTek MT7622 SoC" - select ARM64 + select CPU_V7A if ARCH_MEDIATEK_32 + select ARM64 if !ARCH_MEDIATEK_32 help The MediaTek MT7622 is a ARM64-based SoC with a dual-core Cortex-A53. including UART, SPI, USB3.0, SD and MMC cards, NAND, SNFI, PWM, PCIe, diff --git a/arch/arm/mach-mediatek/mt7622/init.c b/arch/arm/mach-mediatek/mt7622/init.c index 7f6ce80f37..884c45e183 100644 --- a/arch/arm/mach-mediatek/mt7622/init.c +++ b/arch/arm/mach-mediatek/mt7622/init.c @@ -7,8 +7,10 @@ #include #include #include -#include #include +#ifdef CONFIG_ARM64 +#include +#endif int print_cpuinfo(void) { @@ -27,6 +29,7 @@ int dram_init(void) } +#ifdef CONFIG_ARM64 void reset_cpu(ulong addr) { psci_system_reset(); @@ -51,3 +54,4 @@ static struct mm_region mt7622_mem_map[] = { } }; struct mm_region *mem_map = mt7622_mem_map; +#endif