diff options
| -rw-r--r-- | arch/arm/mach-zynq/board_dt.c | 37 | ||||
| -rw-r--r-- | arch/arm/mach-zynq/common.c | 22 | ||||
| -rw-r--r-- | arch/arm/mach-zynq/common.h | 5 |
3 files changed, 19 insertions, 45 deletions
diff --git a/arch/arm/mach-zynq/board_dt.c b/arch/arm/mach-zynq/board_dt.c index 5b4710d09258..e69de29bb2d1 100644 --- a/arch/arm/mach-zynq/board_dt.c +++ b/arch/arm/mach-zynq/board_dt.c | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * This file contains code for boards with device tree support. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Xilinx | ||
| 5 | * | ||
| 6 | * based on arch/arm/mach-realview/core.c | ||
| 7 | * | ||
| 8 | * Copyright (C) 1999 - 2003 ARM Limited | ||
| 9 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
| 10 | * | ||
| 11 | * This software is licensed under the terms of the GNU General Public | ||
| 12 | * License version 2, as published by the Free Software Foundation, and | ||
| 13 | * may be copied, distributed, and modified under those terms. | ||
| 14 | * | ||
| 15 | * This program is distributed in the hope that it will be useful, | ||
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | * GNU General Public License for more details. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/of.h> | ||
| 22 | #include <asm/mach/arch.h> | ||
| 23 | #include <asm/mach-types.h> | ||
| 24 | #include "common.h" | ||
| 25 | |||
| 26 | static const char *xilinx_dt_match[] = { | ||
| 27 | "xlnx,zynq-ep107", | ||
| 28 | NULL | ||
| 29 | }; | ||
| 30 | |||
| 31 | MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") | ||
| 32 | .map_io = xilinx_map_io, | ||
| 33 | .init_irq = xilinx_irq_init, | ||
| 34 | .init_machine = xilinx_init_machine, | ||
| 35 | .timer = &xttcpss_sys_timer, | ||
| 36 | .dt_compat = xilinx_dt_match, | ||
| 37 | MACHINE_END | ||
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c index b3ac5c2e12dc..73e93687b81a 100644 --- a/arch/arm/mach-zynq/common.c +++ b/arch/arm/mach-zynq/common.c | |||
| @@ -21,8 +21,11 @@ | |||
| 21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
| 22 | #include <linux/of_irq.h> | 22 | #include <linux/of_irq.h> |
| 23 | #include <linux/of_platform.h> | 23 | #include <linux/of_platform.h> |
| 24 | #include <linux/of.h> | ||
| 24 | 25 | ||
| 26 | #include <asm/mach/arch.h> | ||
| 25 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
| 28 | #include <asm/mach-types.h> | ||
| 26 | #include <asm/page.h> | 29 | #include <asm/page.h> |
| 27 | #include <asm/hardware/gic.h> | 30 | #include <asm/hardware/gic.h> |
| 28 | #include <asm/hardware/cache-l2x0.h> | 31 | #include <asm/hardware/cache-l2x0.h> |
| @@ -40,7 +43,7 @@ static struct of_device_id zynq_of_bus_ids[] __initdata = { | |||
| 40 | * xilinx_init_machine() - System specific initialization, intended to be | 43 | * xilinx_init_machine() - System specific initialization, intended to be |
| 41 | * called from board specific initialization. | 44 | * called from board specific initialization. |
| 42 | */ | 45 | */ |
| 43 | void __init xilinx_init_machine(void) | 46 | static void __init xilinx_init_machine(void) |
| 44 | { | 47 | { |
| 45 | #ifdef CONFIG_CACHE_L2X0 | 48 | #ifdef CONFIG_CACHE_L2X0 |
| 46 | /* | 49 | /* |
| @@ -55,7 +58,7 @@ void __init xilinx_init_machine(void) | |||
| 55 | /** | 58 | /** |
| 56 | * xilinx_irq_init() - Interrupt controller initialization for the GIC. | 59 | * xilinx_irq_init() - Interrupt controller initialization for the GIC. |
| 57 | */ | 60 | */ |
| 58 | void __init xilinx_irq_init(void) | 61 | static void __init xilinx_irq_init(void) |
| 59 | { | 62 | { |
| 60 | gic_init(0, 29, SCU_GIC_DIST_BASE, SCU_GIC_CPU_BASE); | 63 | gic_init(0, 29, SCU_GIC_DIST_BASE, SCU_GIC_CPU_BASE); |
| 61 | } | 64 | } |
| @@ -96,7 +99,20 @@ static struct map_desc io_desc[] __initdata = { | |||
| 96 | /** | 99 | /** |
| 97 | * xilinx_map_io() - Create memory mappings needed for early I/O. | 100 | * xilinx_map_io() - Create memory mappings needed for early I/O. |
| 98 | */ | 101 | */ |
| 99 | void __init xilinx_map_io(void) | 102 | static void __init xilinx_map_io(void) |
| 100 | { | 103 | { |
| 101 | iotable_init(io_desc, ARRAY_SIZE(io_desc)); | 104 | iotable_init(io_desc, ARRAY_SIZE(io_desc)); |
| 102 | } | 105 | } |
| 106 | |||
| 107 | static const char *xilinx_dt_match[] = { | ||
| 108 | "xlnx,zynq-ep107", | ||
| 109 | NULL | ||
| 110 | }; | ||
| 111 | |||
| 112 | MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") | ||
| 113 | .map_io = xilinx_map_io, | ||
| 114 | .init_irq = xilinx_irq_init, | ||
| 115 | .init_machine = xilinx_init_machine, | ||
| 116 | .timer = &xttcpss_sys_timer, | ||
| 117 | .dt_compat = xilinx_dt_match, | ||
| 118 | MACHINE_END | ||
diff --git a/arch/arm/mach-zynq/common.h b/arch/arm/mach-zynq/common.h index bca21968f80b..a009644a1555 100644 --- a/arch/arm/mach-zynq/common.h +++ b/arch/arm/mach-zynq/common.h | |||
| @@ -17,13 +17,8 @@ | |||
| 17 | #ifndef __MACH_ZYNQ_COMMON_H__ | 17 | #ifndef __MACH_ZYNQ_COMMON_H__ |
| 18 | #define __MACH_ZYNQ_COMMON_H__ | 18 | #define __MACH_ZYNQ_COMMON_H__ |
| 19 | 19 | ||
| 20 | #include <linux/init.h> | ||
| 21 | #include <asm/mach/time.h> | 20 | #include <asm/mach/time.h> |
| 22 | 21 | ||
| 23 | extern void xilinx_init_machine(void); | ||
| 24 | extern void xilinx_irq_init(void); | ||
| 25 | extern void xilinx_map_io(void); | ||
| 26 | |||
| 27 | extern struct sys_timer xttcpss_sys_timer; | 22 | extern struct sys_timer xttcpss_sys_timer; |
| 28 | 23 | ||
| 29 | #endif | 24 | #endif |
