bcm27xx: add support for linux v5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.15 / 950-0141-arm-bcm2835-DMA-can-only-address-1GB.patch
1 From 6808d6ad11225c29e18e71d92916e65bfd8db99d Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Wed, 29 May 2019 15:47:42 +0100
4 Subject: [PATCH] arm: bcm2835: DMA can only address 1GB
5
6 The legacy peripherals can only address the first gigabyte of RAM, so
7 ensure that DMA allocations are restricted to that region.
8
9 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
10 ---
11 arch/arm/mach-bcm/board_bcm2835.c | 3 +++
12 1 file changed, 3 insertions(+)
13
14 --- a/arch/arm/mach-bcm/board_bcm2835.c
15 +++ b/arch/arm/mach-bcm/board_bcm2835.c
16 @@ -114,6 +114,9 @@ static const char * const bcm2835_compat
17 };
18
19 DT_MACHINE_START(BCM2835, "BCM2835")
20 +#if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE)
21 + .dma_zone_size = SZ_1G,
22 +#endif
23 .map_io = bcm2835_map_io,
24 .init_machine = bcm2835_init,
25 .dt_compat = bcm2835_compat,