* RaspberryPi4 support * Update kernel file * Fix lint * Fix uboot defconfig * Update firmware for rpi4 * fix naming * Add support for 64bit * fix path for dts
59 lines
1.5 KiB
Diff
59 lines
1.5 KiB
Diff
From bfa71106beb565c2f3bc2f5f948477e0d3801285 Mon Sep 17 00:00:00 2001
|
|
From: Andrei Gherzan <andrei@balena.io>
|
|
Date: Fri, 12 Jul 2019 14:27:31 +0100
|
|
Subject: [PATCH 15/17] rpi: Add memory map for bcm2838
|
|
|
|
Signed-off-by: Andrei Gherzan <andrei@balena.io>
|
|
---
|
|
board/raspberrypi/rpi/rpi.c | 27 ++++++++++++++++++++++++---
|
|
1 file changed, 24 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
|
|
index 6d6f1ef39a..4242ef35a4 100644
|
|
--- a/board/raspberrypi/rpi/rpi.c
|
|
+++ b/board/raspberrypi/rpi/rpi.c
|
|
@@ -249,7 +249,8 @@ static uint32_t rev_type;
|
|
static const struct rpi_model *model;
|
|
|
|
#ifdef CONFIG_ARM64
|
|
-static struct mm_region bcm2837_mem_map[] = {
|
|
+#ifndef CONFIG_BCM2838
|
|
+static struct mm_region bcm283x_mem_map[] = {
|
|
{
|
|
.virt = 0x00000000UL,
|
|
.phys = 0x00000000UL,
|
|
@@ -268,8 +269,28 @@ static struct mm_region bcm2837_mem_map[] = {
|
|
0,
|
|
}
|
|
};
|
|
-
|
|
-struct mm_region *mem_map = bcm2837_mem_map;
|
|
+#else
|
|
+static struct mm_region bcm283x_mem_map[] = {
|
|
+ {
|
|
+ .virt = 0x00000000UL,
|
|
+ .phys = 0x00000000UL,
|
|
+ .size = 0xf3000000UL,
|
|
+ .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
|
|
+ PTE_BLOCK_INNER_SHARE
|
|
+ }, {
|
|
+ .virt = 0xfe000000UL,
|
|
+ .phys = 0xfe000000UL,
|
|
+ .size = 0x01800000UL,
|
|
+ .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
|
+ PTE_BLOCK_NON_SHARE |
|
|
+ PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
|
+ }, {
|
|
+ /* List terminator */
|
|
+ 0,
|
|
+ }
|
|
+};
|
|
+#endif
|
|
+struct mm_region *mem_map = bcm283x_mem_map;
|
|
#endif
|
|
|
|
int dram_init(void)
|
|
--
|
|
2.17.1
|
|
|