aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-zynq/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-zynq/common.c')
-rw-r--r--arch/arm/mach-zynq/common.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 1db2a5ca9ab8..a39be8e80856 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -25,6 +25,7 @@
25#include <linux/of_irq.h> 25#include <linux/of_irq.h>
26#include <linux/of_platform.h> 26#include <linux/of_platform.h>
27#include <linux/of.h> 27#include <linux/of.h>
28#include <linux/memblock.h>
28#include <linux/irqchip.h> 29#include <linux/irqchip.h>
29#include <linux/irqchip/arm-gic.h> 30#include <linux/irqchip/arm-gic.h>
30 31
@@ -41,6 +42,18 @@
41 42
42void __iomem *zynq_scu_base; 43void __iomem *zynq_scu_base;
43 44
45/**
46 * zynq_memory_init - Initialize special memory
47 *
48 * We need to stop things allocating the low memory as DMA can't work in
49 * the 1st 512K of memory.
50 */
51static void __init zynq_memory_init(void)
52{
53 if (!__pa(PAGE_OFFSET))
54 memblock_reserve(__pa(PAGE_OFFSET), __pa(swapper_pg_dir));
55}
56
44static struct platform_device zynq_cpuidle_device = { 57static struct platform_device zynq_cpuidle_device = {
45 .name = "cpuidle-zynq", 58 .name = "cpuidle-zynq",
46}; 59};
@@ -51,6 +64,8 @@ static struct platform_device zynq_cpuidle_device = {
51 */ 64 */
52static void __init zynq_init_machine(void) 65static void __init zynq_init_machine(void)
53{ 66{
67 struct platform_device_info devinfo = { .name = "cpufreq-cpu0", };
68
54 /* 69 /*
55 * 64KB way size, 8-way associativity, parity disabled 70 * 64KB way size, 8-way associativity, parity disabled
56 */ 71 */
@@ -59,6 +74,7 @@ static void __init zynq_init_machine(void)
59 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 74 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
60 75
61 platform_device_register(&zynq_cpuidle_device); 76 platform_device_register(&zynq_cpuidle_device);
77 platform_device_register_full(&devinfo);
62} 78}
63 79
64static void __init zynq_timer_init(void) 80static void __init zynq_timer_init(void)
@@ -117,5 +133,6 @@ DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform")
117 .init_machine = zynq_init_machine, 133 .init_machine = zynq_init_machine,
118 .init_time = zynq_timer_init, 134 .init_time = zynq_timer_init,
119 .dt_compat = zynq_dt_match, 135 .dt_compat = zynq_dt_match,
136 .reserve = zynq_memory_init,
120 .restart = zynq_system_reset, 137 .restart = zynq_system_reset,
121MACHINE_END 138MACHINE_END