bcm27xx: add linux 5.4 support
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0210-arm-bcm2835-DMA-can-only-address-1GB.patch
1 From 67b31f71da2c251860dc6ddeffc5d15f8a74c675 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,