toolchain-external: reduce nesting in copy_toolchain_sysroot
[buildroot-gz.git] / board / qemu / arm-versatile / patches / linux / versatile-nommu.patch
blob961b6c3dd1412e0609b2e951b76fe8a2a3b0eb49
1 From b7c1666813424d329868335c8faf8886b0f85b6c Mon Sep 17 00:00:00 2001
2 From: Greg Ungerer <gerg@linux-m68k.org>
3 Date: Thu, 11 Aug 2016 21:33:11 +1000
4 Subject: [PATCH] arm: fix versatile platform to work in no-MMU mode
6 If CONFIG_MMU is disabled then do not carry out the virtual memory address
7 translation for IO devices.
9 With this fix in place we can run the ARM Versatile board (including its
10 qemu emulation) as a no-MMU Linux system.
12 Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
13 Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
15 diff -Nur linux-4.4.17.orig/arch/arm/mach-versatile/include/mach/hardware.h linux-4.4.17/arch/arm/mach-versatile/include/mach/hardware.h
16 --- linux-4.4.17.orig/arch/arm/mach-versatile/include/mach/hardware.h 2016-08-10 11:49:43.000000000 +0200
17 +++ linux-4.4.17/arch/arm/mach-versatile/include/mach/hardware.h 2016-08-25 23:19:03.691716292 +0200
18 @@ -30,8 +30,12 @@
19 #define VERSATILE_PCI_VIRT_BASE (void __iomem *)0xe8000000ul
20 #define VERSATILE_PCI_CFG_VIRT_BASE (void __iomem *)0xe9000000ul
22 +#ifdef CONFIG_MMU
23 /* macro to get at MMIO space when running virtually */
24 #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
25 +#else
26 +#define IO_ADDRESS(x) (x)
27 +#endif
29 #define __io_address(n) ((void __iomem __force *)IO_ADDRESS(n))