brcm2708: add linux 4.19 support
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.19 / 950-0539-arm-bcm2835-DMA-can-only-address-1GB.patch
1 From 4f8fa14b05198c3d145d72d47ad9adfc25601842 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 539/703] 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 @@ -123,6 +123,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,