diff options
author | Michal Simek <michal.simek@xilinx.com> | 2014-01-31 12:55:06 +0100 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2014-02-10 19:45:42 +0100 |
commit | 46f5b96085b03f9e71a0134de77efc6a1f9d84c3 (patch) | |
tree | 4b817342ee36f06bdbaffd616fb61698518d9c31 | |
parent | Merge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes (diff) | |
download | linux-46f5b96085b03f9e71a0134de77efc6a1f9d84c3.tar.xz linux-46f5b96085b03f9e71a0134de77efc6a1f9d84c3.zip |
ARM: zynq: Reserve not DMAable space in front of the kernel
Reserve space from 0x0 - __pa(swapper_pg_dir),
if kernel is loaded from 0, which is not DMAable.
It is causing problem with MMC driver and others
which want to add dma buffers to this space.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
-rw-r--r-- | arch/arm/mach-zynq/common.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c index 1db2a5ca9ab8..8c09a8393fb6 100644 --- a/arch/arm/mach-zynq/common.c +++ b/arch/arm/mach-zynq/common.c @@ -25,6 +25,7 @@ #include <linux/of_irq.h> #include <linux/of_platform.h> #include <linux/of.h> +#include <linux/memblock.h> #include <linux/irqchip.h> #include <linux/irqchip/arm-gic.h> @@ -41,6 +42,18 @@ void __iomem *zynq_scu_base; +/** + * zynq_memory_init - Initialize special memory + * + * We need to stop things allocating the low memory as DMA can't work in + * the 1st 512K of memory. + */ +static void __init zynq_memory_init(void) +{ + if (!__pa(PAGE_OFFSET)) + memblock_reserve(__pa(PAGE_OFFSET), __pa(swapper_pg_dir)); +} + static struct platform_device zynq_cpuidle_device = { .name = "cpuidle-zynq", }; @@ -117,5 +130,6 @@ DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") .init_machine = zynq_init_machine, .init_time = zynq_timer_init, .dt_compat = zynq_dt_match, + .reserve = zynq_memory_init, .restart = zynq_system_reset, MACHINE_END |