diff options
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-2019.07/0007-rpi-Add-memory-map-for-bcm2838.patch')
-rw-r--r-- | recipes-bsp/u-boot/u-boot-2019.07/0007-rpi-Add-memory-map-for-bcm2838.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0007-rpi-Add-memory-map-for-bcm2838.patch b/recipes-bsp/u-boot/u-boot-2019.07/0007-rpi-Add-memory-map-for-bcm2838.patch new file mode 100644 index 0000000..af1af7d --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-2019.07/0007-rpi-Add-memory-map-for-bcm2838.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From e9b0fcf3d311999df5c112fbe66b2c9cde632778 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrei Gherzan <andrei@balena.io> | ||
3 | Date: Fri, 12 Jul 2019 14:27:31 +0100 | ||
4 | Subject: [PATCH 7/7] rpi: Add memory map for bcm2838 | ||
5 | |||
6 | Define the memory map for the BCM2838 based on the dt configuration | ||
7 | available in the Raspberry Pi kernel fork[1]. | ||
8 | |||
9 | [1] https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/bcm2838.dtsi | ||
10 | |||
11 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
12 | Upstream-status: Pending | ||
13 | --- | ||
14 | board/raspberrypi/rpi/rpi.c | 27 ++++++++++++++++++++++++--- | ||
15 | 1 file changed, 24 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c | ||
18 | index 92c6534da6..bddf2a578d 100644 | ||
19 | --- a/board/raspberrypi/rpi/rpi.c | ||
20 | +++ b/board/raspberrypi/rpi/rpi.c | ||
21 | @@ -249,7 +249,8 @@ static uint32_t rev_type; | ||
22 | static const struct rpi_model *model; | ||
23 | |||
24 | #ifdef CONFIG_ARM64 | ||
25 | -static struct mm_region bcm2837_mem_map[] = { | ||
26 | +#ifndef CONFIG_BCM2838 | ||
27 | +static struct mm_region bcm283x_mem_map[] = { | ||
28 | { | ||
29 | .virt = 0x00000000UL, | ||
30 | .phys = 0x00000000UL, | ||
31 | @@ -268,8 +269,28 @@ static struct mm_region bcm2837_mem_map[] = { | ||
32 | 0, | ||
33 | } | ||
34 | }; | ||
35 | - | ||
36 | -struct mm_region *mem_map = bcm2837_mem_map; | ||
37 | +#else | ||
38 | +static struct mm_region bcm283x_mem_map[] = { | ||
39 | + { | ||
40 | + .virt = 0x00000000UL, | ||
41 | + .phys = 0x00000000UL, | ||
42 | + .size = 0xfe000000UL, | ||
43 | + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | | ||
44 | + PTE_BLOCK_INNER_SHARE | ||
45 | + }, { | ||
46 | + .virt = 0xfe000000UL, | ||
47 | + .phys = 0xfe000000UL, | ||
48 | + .size = 0x01800000UL, | ||
49 | + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | | ||
50 | + PTE_BLOCK_NON_SHARE | | ||
51 | + PTE_BLOCK_PXN | PTE_BLOCK_UXN | ||
52 | + }, { | ||
53 | + /* List terminator */ | ||
54 | + 0, | ||
55 | + } | ||
56 | +}; | ||
57 | +#endif | ||
58 | +struct mm_region *mem_map = bcm283x_mem_map; | ||
59 | #endif | ||
60 | |||
61 | int dram_init(void) | ||
62 | -- | ||
63 | 2.22.0 | ||
64 | |||