summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/u-boot/u-boot-2019.07/0011-rpi-Add-memory-map-for-bcm2838.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-2019.07/0011-rpi-Add-memory-map-for-bcm2838.patch')
-rw-r--r--recipes-bsp/u-boot/u-boot-2019.07/0011-rpi-Add-memory-map-for-bcm2838.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0011-rpi-Add-memory-map-for-bcm2838.patch b/recipes-bsp/u-boot/u-boot-2019.07/0011-rpi-Add-memory-map-for-bcm2838.patch
new file mode 100644
index 0000000..b2d25d0
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-2019.07/0011-rpi-Add-memory-map-for-bcm2838.patch
@@ -0,0 +1,59 @@
1From ab0137601cea84296f607da22d27f0bbf1265e1a Mon Sep 17 00:00:00 2001
2From: Andrei Gherzan <andrei@balena.io>
3Date: Fri, 12 Jul 2019 14:27:31 +0100
4Subject: [PATCH 11/12] rpi: Add memory map for bcm2838
5
6Signed-off-by: Andrei Gherzan <andrei@balena.io>
7Upstream-status: Pending
8---
9 board/raspberrypi/rpi/rpi.c | 27 ++++++++++++++++++++++++---
10 1 file changed, 24 insertions(+), 3 deletions(-)
11
12diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
13index 6d6f1ef39a..1c4fae9166 100644
14--- a/board/raspberrypi/rpi/rpi.c
15+++ b/board/raspberrypi/rpi/rpi.c
16@@ -249,7 +249,8 @@ static uint32_t rev_type;
17 static const struct rpi_model *model;
18
19 #ifdef CONFIG_ARM64
20-static struct mm_region bcm2837_mem_map[] = {
21+#ifndef CONFIG_BCM2838
22+static struct mm_region bcm283x_mem_map[] = {
23 {
24 .virt = 0x00000000UL,
25 .phys = 0x00000000UL,
26@@ -268,8 +269,28 @@ static struct mm_region bcm2837_mem_map[] = {
27 0,
28 }
29 };
30-
31-struct mm_region *mem_map = bcm2837_mem_map;
32+#else
33+static struct mm_region bcm283x_mem_map[] = {
34+ {
35+ .virt = 0x00000000UL,
36+ .phys = 0x00000000UL,
37+ .size = 0xfe000000UL,
38+ .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
39+ PTE_BLOCK_INNER_SHARE
40+ }, {
41+ .virt = 0xfe000000UL,
42+ .phys = 0xfe000000UL,
43+ .size = 0x01800000UL,
44+ .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
45+ PTE_BLOCK_NON_SHARE |
46+ PTE_BLOCK_PXN | PTE_BLOCK_UXN
47+ }, {
48+ /* List terminator */
49+ 0,
50+ }
51+};
52+#endif
53+struct mm_region *mem_map = bcm283x_mem_map;
54 #endif
55
56 int dram_init(void)
57--
582.22.0
59