summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-02-18 11:57:24 -0600
committerTom Rini <[email protected]>2026-02-18 11:57:24 -0600
commit339a55865a0be5d8dc6c49b17e38b2bd587b402d (patch)
treef5dac80ac3966fafba4be1b843555b0f20255616
parente8dd062642d91a00ddb596787ff35bd3641a6a21 (diff)
parentf1c0e637cd67ffddee154f8c5282c4e910a7179e (diff)
Merge patch series "arm: mediatek: clean up some redundant board init"
David Lechner <[email protected]> says: Before adding more targets, we take a moment to clean up some some redundant code in existing Mediatek SoC support. The first three patches are removing no-op functions. The last patch generalizes the mem_map code so that it can be shared between all Mediatek ARMv8 SoCs. Link: https://lore.kernel.org/r/20260209-mtk-mach-clean-up-duplicates-v2-0-e3b22282c74d@baylibre.com
-rw-r--r--arch/arm/mach-mediatek/Kconfig27
-rw-r--r--arch/arm/mach-mediatek/Makefile1
-rw-r--r--arch/arm/mach-mediatek/armv8-mem-map.c24
-rw-r--r--arch/arm/mach-mediatek/init.h11
-rw-r--r--arch/arm/mach-mediatek/mt7622/init.c20
-rw-r--r--arch/arm/mach-mediatek/mt7623/init.c5
-rw-r--r--arch/arm/mach-mediatek/mt7629/init.c2
-rw-r--r--arch/arm/mach-mediatek/mt7981/init.c21
-rw-r--r--arch/arm/mach-mediatek/mt7986/init.c21
-rw-r--r--arch/arm/mach-mediatek/mt7987/init.c21
-rw-r--r--arch/arm/mach-mediatek/mt7988/init.c21
-rw-r--r--arch/arm/mach-mediatek/mt8183/init.c30
-rw-r--r--arch/arm/mach-mediatek/mt8188/init.c5
-rw-r--r--arch/arm/mach-mediatek/mt8365/init.c5
-rw-r--r--arch/arm/mach-mediatek/mt8512/init.c21
-rw-r--r--arch/arm/mach-mediatek/mt8516/init.c22
-rw-r--r--arch/arm/mach-mediatek/mt8518/init.c21
-rw-r--r--arch/arm/mach-mediatek/spl.c5
-rw-r--r--board/mediatek/MAINTAINERS (renamed from board/mediatek/mt8390_evk/MAINTAINERS)6
-rw-r--r--board/mediatek/mt8365_evk/MAINTAINERS5
-rw-r--r--board/mediatek/mt8365_evk/Makefile3
-rw-r--r--board/mediatek/mt8365_evk/mt8365_evk.c28
-rw-r--r--board/mediatek/mt8390_evk/Makefile3
-rw-r--r--board/mediatek/mt8390_evk/mt8390_evk.c34
-rw-r--r--configs/mt8390_evk_defconfig1
25 files changed, 64 insertions, 299 deletions
diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig
index d1d2605b2cc..d10aedc303b 100644
--- a/arch/arm/mach-mediatek/Kconfig
+++ b/arch/arm/mach-mediatek/Kconfig
@@ -130,6 +130,33 @@ config TARGET_MT8518
endchoice
+if ARM64
+
+config MTK_MEM_MAP_DDR_BASE_PHY
+ hex "DDR physical base address"
+ default 0x40000000
+ help
+ Target-specific DDR physical base address.
+
+config MTK_MEM_MAP_DDR_SIZE
+ hex "DDR .size in mem_map"
+ default 0x200000000 if TARGET_MT7987 || TARGET_MT7988 || TARGET_MT8188
+ default 0xc0000000 if TARGET_MT8365
+ default 0x80000000 if TARGET_MT7981 || TARGET_MT7986 || TARGET_MT8183
+ default 0x40000000 if TARGET_MT7622 || TARGET_MT8512
+ default 0x20000000
+ help
+ Target-specific DDR region size in mem_map.
+
+config MTK_MEM_MAP_MMIO_SIZE
+ hex "MMIO .size in mem_map"
+ default 0x40000000 if TARGET_MT7622 || TARGET_MT7981 || TARGET_MT7986 || TARGET_MT7987 || TARGET_MT7988 || TARGET_MT8512
+ default 0x20000000
+ help
+ Target-specific MMIO region size in mem_map.
+
+endif
+
config SYS_BOARD
string "Board name"
default "mt7622" if TARGET_MT7622
diff --git a/arch/arm/mach-mediatek/Makefile b/arch/arm/mach-mediatek/Makefile
index 44591bed6fa..17e645989e5 100644
--- a/arch/arm/mach-mediatek/Makefile
+++ b/arch/arm/mach-mediatek/Makefile
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_ARM64) += armv8-mem-map.o
obj-y += cpu.o
obj-$(CONFIG_MTK_TZ_MOVABLE) += tzcfg.o
obj-$(CONFIG_XPL_BUILD) += spl.o
diff --git a/arch/arm/mach-mediatek/armv8-mem-map.c b/arch/arm/mach-mediatek/armv8-mem-map.c
new file mode 100644
index 00000000000..cbaa9b4c267
--- /dev/null
+++ b/arch/arm/mach-mediatek/armv8-mem-map.c
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include <asm/armv8/mmu.h>
+
+static struct mm_region mediatek_mem_map[] = {
+ {
+ /* DDR */
+ .virt = CONFIG_MTK_MEM_MAP_DDR_BASE_PHY,
+ .phys = CONFIG_MTK_MEM_MAP_DDR_BASE_PHY,
+ .size = CONFIG_MTK_MEM_MAP_DDR_SIZE,
+ .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE,
+ }, {
+ .virt = 0x00000000UL,
+ .phys = 0x00000000UL,
+ .size = CONFIG_MTK_MEM_MAP_MMIO_SIZE,
+ .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+ PTE_BLOCK_NON_SHARE |
+ PTE_BLOCK_PXN | PTE_BLOCK_UXN
+ }, {
+ /* List terminator */
+ }
+};
+
+struct mm_region *mem_map = mediatek_mem_map;
diff --git a/arch/arm/mach-mediatek/init.h b/arch/arm/mach-mediatek/init.h
deleted file mode 100644
index 1d896fbbf7e..00000000000
--- a/arch/arm/mach-mediatek/init.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright (C) 2018 MediaTek Inc.
- */
-
-#ifndef __MEDIATEK_INIT_H_
-#define __MEDIATEK_INIT_H_
-
-extern int mtk_soc_early_init(void);
-
-#endif /* __MEDIATEK_INIT_H_ */
diff --git a/arch/arm/mach-mediatek/mt7622/init.c b/arch/arm/mach-mediatek/mt7622/init.c
index 368f2916224..a043ca87398 100644
--- a/arch/arm/mach-mediatek/mt7622/init.c
+++ b/arch/arm/mach-mediatek/mt7622/init.c
@@ -36,23 +36,3 @@ void reset_cpu(void)
{
psci_system_reset();
}
-
-static struct mm_region mt7622_mem_map[] = {
- {
- /* DDR */
- .virt = 0x40000000UL,
- .phys = 0x40000000UL,
- .size = 0x40000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE,
- }, {
- .virt = 0x00000000UL,
- .phys = 0x00000000UL,
- .size = 0x40000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
- PTE_BLOCK_NON_SHARE |
- PTE_BLOCK_PXN | PTE_BLOCK_UXN
- }, {
- 0,
- }
-};
-struct mm_region *mem_map = mt7622_mem_map;
diff --git a/arch/arm/mach-mediatek/mt7623/init.c b/arch/arm/mach-mediatek/mt7623/init.c
index 3d6ba3f383c..8713889b92d 100644
--- a/arch/arm/mach-mediatek/mt7623/init.c
+++ b/arch/arm/mach-mediatek/mt7623/init.c
@@ -16,11 +16,6 @@ DECLARE_GLOBAL_DATA_PTR;
struct boot_argument *preloader_param;
-int mtk_soc_early_init(void)
-{
- return 0;
-}
-
int dram_init(void)
{
u32 i;
diff --git a/arch/arm/mach-mediatek/mt7629/init.c b/arch/arm/mach-mediatek/mt7629/init.c
index 7cb8b72c364..ff027ed03ef 100644
--- a/arch/arm/mach-mediatek/mt7629/init.c
+++ b/arch/arm/mach-mediatek/mt7629/init.c
@@ -27,7 +27,7 @@
DECLARE_GLOBAL_DATA_PTR;
-int mtk_pll_early_init(void)
+static int mtk_pll_early_init(void)
{
unsigned long pll_rates[] = {
[CLK_APMIXED_ARMPLL] = 1250000000,
diff --git a/arch/arm/mach-mediatek/mt7981/init.c b/arch/arm/mach-mediatek/mt7981/init.c
index 07da5897190..79afd6ce6be 100644
--- a/arch/arm/mach-mediatek/mt7981/init.c
+++ b/arch/arm/mach-mediatek/mt7981/init.c
@@ -30,24 +30,3 @@ void reset_cpu(void)
{
psci_system_reset();
}
-
-static struct mm_region mt7981_mem_map[] = {
- {
- /* DDR */
- .virt = 0x40000000UL,
- .phys = 0x40000000UL,
- .size = 0x80000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE,
- }, {
- .virt = 0x00000000UL,
- .phys = 0x00000000UL,
- .size = 0x40000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
- PTE_BLOCK_NON_SHARE |
- PTE_BLOCK_PXN | PTE_BLOCK_UXN
- }, {
- 0,
- }
-};
-
-struct mm_region *mem_map = mt7981_mem_map;
diff --git a/arch/arm/mach-mediatek/mt7986/init.c b/arch/arm/mach-mediatek/mt7986/init.c
index a521c95bd9d..1fe56b3f145 100644
--- a/arch/arm/mach-mediatek/mt7986/init.c
+++ b/arch/arm/mach-mediatek/mt7986/init.c
@@ -30,24 +30,3 @@ void reset_cpu(void)
{
psci_system_reset();
}
-
-static struct mm_region mt7986_mem_map[] = {
- {
- /* DDR */
- .virt = 0x40000000UL,
- .phys = 0x40000000UL,
- .size = 0x80000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE,
- }, {
- .virt = 0x00000000UL,
- .phys = 0x00000000UL,
- .size = 0x40000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
- PTE_BLOCK_NON_SHARE |
- PTE_BLOCK_PXN | PTE_BLOCK_UXN
- }, {
- 0,
- }
-};
-
-struct mm_region *mem_map = mt7986_mem_map;
diff --git a/arch/arm/mach-mediatek/mt7987/init.c b/arch/arm/mach-mediatek/mt7987/init.c
index 8b268297809..6364ab497f7 100644
--- a/arch/arm/mach-mediatek/mt7987/init.c
+++ b/arch/arm/mach-mediatek/mt7987/init.c
@@ -39,24 +39,3 @@ void reset_cpu(ulong addr)
{
psci_system_reset();
}
-
-static struct mm_region mt7987_mem_map[] = {
- {
- /* DDR */
- .virt = 0x40000000UL,
- .phys = 0x40000000UL,
- .size = 0x200000000ULL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE,
- }, {
- .virt = 0x00000000UL,
- .phys = 0x00000000UL,
- .size = 0x40000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
- PTE_BLOCK_NON_SHARE |
- PTE_BLOCK_PXN | PTE_BLOCK_UXN
- }, {
- 0,
- }
-};
-
-struct mm_region *mem_map = mt7987_mem_map;
diff --git a/arch/arm/mach-mediatek/mt7988/init.c b/arch/arm/mach-mediatek/mt7988/init.c
index 8bdd3848d26..7ff843585ec 100644
--- a/arch/arm/mach-mediatek/mt7988/init.c
+++ b/arch/arm/mach-mediatek/mt7988/init.c
@@ -38,24 +38,3 @@ void reset_cpu(ulong addr)
{
psci_system_reset();
}
-
-static struct mm_region mt7988_mem_map[] = {
- {
- /* DDR */
- .virt = 0x40000000UL,
- .phys = 0x40000000UL,
- .size = 0x200000000ULL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE,
- }, {
- .virt = 0x00000000UL,
- .phys = 0x00000000UL,
- .size = 0x40000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
- PTE_BLOCK_NON_SHARE |
- PTE_BLOCK_PXN | PTE_BLOCK_UXN
- }, {
- 0,
- }
-};
-
-struct mm_region *mem_map = mt7988_mem_map;
diff --git a/arch/arm/mach-mediatek/mt8183/init.c b/arch/arm/mach-mediatek/mt8183/init.c
index 37243547da8..8dbf9c3df7e 100644
--- a/arch/arm/mach-mediatek/mt8183/init.c
+++ b/arch/arm/mach-mediatek/mt8183/init.c
@@ -37,16 +37,6 @@ int dram_init_banksize(void)
return 0;
}
-int mtk_pll_early_init(void)
-{
- return 0;
-}
-
-int mtk_soc_early_init(void)
-{
- return 0;
-}
-
void reset_cpu(void)
{
psci_system_reset();
@@ -57,23 +47,3 @@ int print_cpuinfo(void)
printf("CPU: MediaTek MT8183\n");
return 0;
}
-
-static struct mm_region mt8183_mem_map[] = {
- {
- /* DDR */
- .virt = 0x40000000UL,
- .phys = 0x40000000UL,
- .size = 0x80000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE,
- }, {
- .virt = 0x00000000UL,
- .phys = 0x00000000UL,
- .size = 0x20000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
- PTE_BLOCK_NON_SHARE |
- PTE_BLOCK_PXN | PTE_BLOCK_UXN
- }, {
- 0,
- }
-};
-struct mm_region *mem_map = mt8183_mem_map;
diff --git a/arch/arm/mach-mediatek/mt8188/init.c b/arch/arm/mach-mediatek/mt8188/init.c
index ed67150e611..9743e39d582 100644
--- a/arch/arm/mach-mediatek/mt8188/init.c
+++ b/arch/arm/mach-mediatek/mt8188/init.c
@@ -45,11 +45,6 @@ int dram_init_banksize(void)
return 0;
}
-int mtk_soc_early_init(void)
-{
- return 0;
-}
-
void reset_cpu(void)
{
struct udevice *wdt;
diff --git a/arch/arm/mach-mediatek/mt8365/init.c b/arch/arm/mach-mediatek/mt8365/init.c
index 8f03ed28763..fb14a5a1902 100644
--- a/arch/arm/mach-mediatek/mt8365/init.c
+++ b/arch/arm/mach-mediatek/mt8365/init.c
@@ -26,11 +26,6 @@ int dram_init_banksize(void)
return 0;
}
-int mtk_soc_early_init(void)
-{
- return 0;
-}
-
void reset_cpu(void)
{
struct udevice *wdt;
diff --git a/arch/arm/mach-mediatek/mt8512/init.c b/arch/arm/mach-mediatek/mt8512/init.c
index 3b48caf5196..361c589cbc2 100644
--- a/arch/arm/mach-mediatek/mt8512/init.c
+++ b/arch/arm/mach-mediatek/mt8512/init.c
@@ -59,24 +59,3 @@ int print_cpuinfo(void)
debug("CPU: MediaTek MT8512\n");
return 0;
}
-
-static struct mm_region mt8512_mem_map[] = {
- {
- /* DDR */
- .virt = 0x40000000UL,
- .phys = 0x40000000UL,
- .size = 0x40000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE,
- }, {
- .virt = 0x00000000UL,
- .phys = 0x00000000UL,
- .size = 0x40000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
- PTE_BLOCK_NON_SHARE |
- PTE_BLOCK_PXN | PTE_BLOCK_UXN
- }, {
- 0,
- }
-};
-
-struct mm_region *mem_map = mt8512_mem_map;
diff --git a/arch/arm/mach-mediatek/mt8516/init.c b/arch/arm/mach-mediatek/mt8516/init.c
index 892bd441a33..1d925dd478a 100644
--- a/arch/arm/mach-mediatek/mt8516/init.c
+++ b/arch/arm/mach-mediatek/mt8516/init.c
@@ -40,7 +40,7 @@ int dram_init_banksize(void)
return 0;
}
-int mtk_pll_early_init(void)
+static int mtk_pll_early_init(void)
{
unsigned long pll_rates[] = {
[CLK_APMIXED_ARMPLL] = 1300000000,
@@ -94,23 +94,3 @@ int print_cpuinfo(void)
printf("CPU: MediaTek MT8516\n");
return 0;
}
-
-static struct mm_region mt8516_mem_map[] = {
- {
- /* DDR */
- .virt = 0x40000000UL,
- .phys = 0x40000000UL,
- .size = 0x20000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE,
- }, {
- .virt = 0x00000000UL,
- .phys = 0x00000000UL,
- .size = 0x20000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
- PTE_BLOCK_NON_SHARE |
- PTE_BLOCK_PXN | PTE_BLOCK_UXN
- }, {
- 0,
- }
-};
-struct mm_region *mem_map = mt8516_mem_map;
diff --git a/arch/arm/mach-mediatek/mt8518/init.c b/arch/arm/mach-mediatek/mt8518/init.c
index c04bcb63517..8fa1346021a 100644
--- a/arch/arm/mach-mediatek/mt8518/init.c
+++ b/arch/arm/mach-mediatek/mt8518/init.c
@@ -51,24 +51,3 @@ int print_cpuinfo(void)
printf("CPU: MediaTek MT8518\n");
return 0;
}
-
-static struct mm_region mt8518_mem_map[] = {
- {
- /* DDR */
- .virt = 0x40000000UL,
- .phys = 0x40000000UL,
- .size = 0x20000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE,
- }, {
- .virt = 0x00000000UL,
- .phys = 0x00000000UL,
- .size = 0x20000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
- PTE_BLOCK_NON_SHARE |
- PTE_BLOCK_PXN | PTE_BLOCK_UXN
- }, {
- 0,
- }
-};
-
-struct mm_region *mem_map = mt8518_mem_map;
diff --git a/arch/arm/mach-mediatek/spl.c b/arch/arm/mach-mediatek/spl.c
index 247d7ee6f1d..6f1ec052b95 100644
--- a/arch/arm/mach-mediatek/spl.c
+++ b/arch/arm/mach-mediatek/spl.c
@@ -9,7 +9,10 @@
#include <init.h>
#include <spl.h>
-#include "init.h"
+__weak int mtk_soc_early_init(void)
+{
+ return 0;
+}
void board_init_f(ulong dummy)
{
diff --git a/board/mediatek/mt8390_evk/MAINTAINERS b/board/mediatek/MAINTAINERS
index d46b8b2e156..5d19892e26b 100644
--- a/board/mediatek/mt8390_evk/MAINTAINERS
+++ b/board/mediatek/MAINTAINERS
@@ -1,6 +1,10 @@
+MT8365 EVK
+M: Julien Masson <[email protected]>
+S: Maintained
+F: configs/mt8365_evk_defconfig
+
MT8390 EVK
M: Julien Masson <[email protected]>
M: Macpaul Lin <[email protected]>
S: Maintained
-F: board/mediatek/mt8390_evk/
F: configs/mt8390_evk_defconfig
diff --git a/board/mediatek/mt8365_evk/MAINTAINERS b/board/mediatek/mt8365_evk/MAINTAINERS
deleted file mode 100644
index e0d65efe812..00000000000
--- a/board/mediatek/mt8365_evk/MAINTAINERS
+++ /dev/null
@@ -1,5 +0,0 @@
-MT8365 EVK
-M: Julien Masson <[email protected]>
-S: Maintained
-F: board/mediatek/mt8365_evk/
-F: configs/mt8365_evk_defconfig
diff --git a/board/mediatek/mt8365_evk/Makefile b/board/mediatek/mt8365_evk/Makefile
deleted file mode 100644
index 90fc92b28c5..00000000000
--- a/board/mediatek/mt8365_evk/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-
-obj-y += mt8365_evk.o
diff --git a/board/mediatek/mt8365_evk/mt8365_evk.c b/board/mediatek/mt8365_evk/mt8365_evk.c
deleted file mode 100644
index 41a6febf03d..00000000000
--- a/board/mediatek/mt8365_evk/mt8365_evk.c
+++ /dev/null
@@ -1,28 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Copyright (C) 2023 BayLibre SAS
- * Author: Julien Masson <[email protected]>
- */
-
-#include <asm/armv8/mmu.h>
-
-static struct mm_region mt8365_evk_mem_map[] = {
- {
- /* DDR */
- .virt = 0x40000000UL,
- .phys = 0x40000000UL,
- .size = 0xc0000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE,
- }, {
- .virt = 0x00000000UL,
- .phys = 0x00000000UL,
- .size = 0x20000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
- PTE_BLOCK_NON_SHARE |
- PTE_BLOCK_PXN | PTE_BLOCK_UXN
- }, {
- 0,
- }
-};
-
-struct mm_region *mem_map = mt8365_evk_mem_map;
diff --git a/board/mediatek/mt8390_evk/Makefile b/board/mediatek/mt8390_evk/Makefile
deleted file mode 100644
index a26d46838c4..00000000000
--- a/board/mediatek/mt8390_evk/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-
-obj-y += mt8390_evk.o
diff --git a/board/mediatek/mt8390_evk/mt8390_evk.c b/board/mediatek/mt8390_evk/mt8390_evk.c
deleted file mode 100644
index 1ca40366a55..00000000000
--- a/board/mediatek/mt8390_evk/mt8390_evk.c
+++ /dev/null
@@ -1,34 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Copyright (C) 2026 BayLibre SAS
- * Author: Julien Masson <[email protected]>
- */
-
-#include <linux/types.h>
-#include <asm/armv8/mmu.h>
-
-int board_init(void)
-{
- return 0;
-}
-
-static struct mm_region mt8390_evk_mem_map[] = {
- {
- /* DDR */
- .virt = 0x40000000UL,
- .phys = 0x40000000UL,
- .size = 0x200000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE,
- }, {
- .virt = 0x00000000UL,
- .phys = 0x00000000UL,
- .size = 0x20000000UL,
- .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
- PTE_BLOCK_NON_SHARE |
- PTE_BLOCK_PXN | PTE_BLOCK_UXN
- }, {
- 0,
- }
-};
-
-struct mm_region *mem_map = mt8390_evk_mem_map;
diff --git a/configs/mt8390_evk_defconfig b/configs/mt8390_evk_defconfig
index 9bc1d922587..06437be625e 100644
--- a/configs/mt8390_evk_defconfig
+++ b/configs/mt8390_evk_defconfig
@@ -9,6 +9,7 @@ CONFIG_DEFAULT_DEVICE_TREE="mediatek/mt8390-genio-700-evk"
CONFIG_TARGET_MT8188=y
CONFIG_SYS_LOAD_ADDR=0x4c000000
CONFIG_IDENT_STRING="mt8390-evk"
+# CONFIG_BOARD_INIT is not set
CONFIG_CMD_CLK=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y