From: Frank Wunderlich <linux@fw-web.de>
To: u-boot@lists.denx.de
Subject: [RFC PATCH 1/4] mt7622: Support to build 32 bits version.
Date: Mon, 10 Aug 2020 16:26:49 +0200 [thread overview]
Message-ID: <20200810142652.40669-2-linux@fw-web.de> (raw)
In-Reply-To: <20200810142652.40669-1-linux@fw-web.de>
From: Oleksandr Rybalko <ray@ddteam.net>
allow building uboot in 32bit-mode for mt7622 to
be compatible with bpi-r64 images
Signed-off-by: Oleksandr Rybalko <ray@ddteam.net>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
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 <common.h>
#include <fdtdec.h>
#include <init.h>
-#include <asm/armv8/mmu.h>
#include <asm/cache.h>
+#ifdef CONFIG_ARM64
+#include <asm/armv8/mmu.h>
+#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
--
2.25.1
next prev parent reply other threads:[~2020-08-10 14:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-10 14:26 [RFC PATCH 0/4] Add 32bit-mode for mt7622 Frank Wunderlich
2020-08-10 14:26 ` Frank Wunderlich [this message]
2020-08-11 2:11 ` [RFC PATCH 1/4] mt7622: Support to build 32 bits version Sam Shih
2020-08-11 10:01 ` Frank Wunderlich
2020-08-10 14:26 ` [RFC PATCH 2/4] mt7622: add lowlevel_init from 2014-04 Frank Wunderlich
2020-08-10 14:26 ` [RFC PATCH 3/4] jumparch64: insert into bootm Frank Wunderlich
2020-08-10 14:26 ` [RFC PATCH 4/4] jumparch64: add go64 Frank Wunderlich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200810142652.40669-2-linux@fw-web.de \
--to=linux@fw-web.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox