diff options
author | Hiroshi Doyu <hdoyu@nvidia.com> | 2013-02-13 12:15:50 -0500 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2013-03-11 16:29:43 -0400 |
commit | 1b14f3a57b0a1a9e0ca7091ca9f8c14fe23dfd70 (patch) | |
tree | ca40ba80b0bed737e96c958f62e6e4ae918fadb6 | |
parent | 2dfc91e831f56b36966d5ef924ccd98354986f8f (diff) |
ARM: tegra: Unify Device tree board files
Unify board-dt-tegra{30,114} to the Tegra20 DT board file, "tegra.c".
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-dt-tegra114.c | 46 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-dt-tegra30.c | 60 | ||||
-rw-r--r-- | arch/arm/mach-tegra/tegra.c | 14 |
4 files changed, 10 insertions, 114 deletions
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile index c6d6be2cc951..92703f955a37 100644 --- a/arch/arm/mach-tegra/Makefile +++ b/arch/arm/mach-tegra/Makefile | |||
@@ -10,6 +10,7 @@ obj-y += pm.o | |||
10 | obj-y += reset.o | 10 | obj-y += reset.o |
11 | obj-y += reset-handler.o | 11 | obj-y += reset-handler.o |
12 | obj-y += sleep.o | 12 | obj-y += sleep.o |
13 | obj-y += tegra.o | ||
13 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | 14 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o |
14 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20_speedo.o | 15 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20_speedo.o |
15 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_emc.o | 16 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_emc.o |
@@ -27,9 +28,6 @@ obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | |||
27 | obj-$(CONFIG_CPU_FREQ) += cpu-tegra.o | 28 | obj-$(CONFIG_CPU_FREQ) += cpu-tegra.o |
28 | obj-$(CONFIG_TEGRA_PCI) += pcie.o | 29 | obj-$(CONFIG_TEGRA_PCI) += pcie.o |
29 | 30 | ||
30 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra.o | ||
31 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o | ||
32 | obj-$(CONFIG_ARCH_TEGRA_114_SOC) += board-dt-tegra114.o | ||
33 | ifeq ($(CONFIG_CPU_IDLE),y) | 31 | ifeq ($(CONFIG_CPU_IDLE),y) |
34 | obj-$(CONFIG_ARCH_TEGRA_114_SOC) += cpuidle-tegra114.o | 32 | obj-$(CONFIG_ARCH_TEGRA_114_SOC) += cpuidle-tegra114.o |
35 | endif | 33 | endif |
diff --git a/arch/arm/mach-tegra/board-dt-tegra114.c b/arch/arm/mach-tegra/board-dt-tegra114.c deleted file mode 100644 index 08e82941e53c..000000000000 --- a/arch/arm/mach-tegra/board-dt-tegra114.c +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * NVIDIA Tegra114 device tree board support | ||
3 | * | ||
4 | * Copyright (C) 2013 NVIDIA Corporation | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <linux/of.h> | ||
18 | #include <linux/of_platform.h> | ||
19 | #include <linux/clocksource.h> | ||
20 | |||
21 | #include <asm/mach/arch.h> | ||
22 | |||
23 | #include "board.h" | ||
24 | #include "common.h" | ||
25 | |||
26 | static void __init tegra114_dt_init(void) | ||
27 | { | ||
28 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
29 | } | ||
30 | |||
31 | static const char * const tegra114_dt_board_compat[] = { | ||
32 | "nvidia,tegra114", | ||
33 | NULL, | ||
34 | }; | ||
35 | |||
36 | DT_MACHINE_START(TEGRA114_DT, "NVIDIA Tegra114 (Flattened Device Tree)") | ||
37 | .smp = smp_ops(tegra_smp_ops), | ||
38 | .map_io = tegra_map_common_io, | ||
39 | .init_early = tegra_init_early, | ||
40 | .init_irq = tegra_dt_init_irq, | ||
41 | .init_time = clocksource_of_init, | ||
42 | .init_machine = tegra114_dt_init, | ||
43 | .init_late = tegra_init_late, | ||
44 | .restart = tegra_assert_system_reset, | ||
45 | .dt_compat = tegra114_dt_board_compat, | ||
46 | MACHINE_END | ||
diff --git a/arch/arm/mach-tegra/board-dt-tegra30.c b/arch/arm/mach-tegra/board-dt-tegra30.c deleted file mode 100644 index 63f8139879b9..000000000000 --- a/arch/arm/mach-tegra/board-dt-tegra30.c +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-tegra/board-dt-tegra30.c | ||
3 | * | ||
4 | * NVIDIA Tegra30 device tree board support | ||
5 | * | ||
6 | * Copyright (C) 2011, 2013, NVIDIA Corporation | ||
7 | * | ||
8 | * Derived from: | ||
9 | * | ||
10 | * arch/arm/mach-tegra/board-dt-tegra20.c | ||
11 | * | ||
12 | * Copyright (C) 2010 Secret Lab Technologies, Ltd. | ||
13 | * Copyright (C) 2010 Google, Inc. | ||
14 | * | ||
15 | * This software is licensed under the terms of the GNU General Public | ||
16 | * License version 2, as published by the Free Software Foundation, and | ||
17 | * may be copied, distributed, and modified under those terms. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | */ | ||
25 | |||
26 | #include <linux/clocksource.h> | ||
27 | #include <linux/kernel.h> | ||
28 | #include <linux/of.h> | ||
29 | #include <linux/of_address.h> | ||
30 | #include <linux/of_fdt.h> | ||
31 | #include <linux/of_irq.h> | ||
32 | #include <linux/of_platform.h> | ||
33 | |||
34 | #include <asm/mach/arch.h> | ||
35 | |||
36 | #include "board.h" | ||
37 | #include "common.h" | ||
38 | #include "iomap.h" | ||
39 | |||
40 | static void __init tegra30_dt_init(void) | ||
41 | { | ||
42 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
43 | } | ||
44 | |||
45 | static const char *tegra30_dt_board_compat[] = { | ||
46 | "nvidia,tegra30", | ||
47 | NULL | ||
48 | }; | ||
49 | |||
50 | DT_MACHINE_START(TEGRA30_DT, "NVIDIA Tegra30 (Flattened Device Tree)") | ||
51 | .smp = smp_ops(tegra_smp_ops), | ||
52 | .map_io = tegra_map_common_io, | ||
53 | .init_early = tegra_init_early, | ||
54 | .init_irq = tegra_dt_init_irq, | ||
55 | .init_time = clocksource_of_init, | ||
56 | .init_machine = tegra30_dt_init, | ||
57 | .init_late = tegra_init_late, | ||
58 | .restart = tegra_assert_system_reset, | ||
59 | .dt_compat = tegra30_dt_board_compat, | ||
60 | MACHINE_END | ||
diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c index fca18e9157bd..27232c901a22 100644 --- a/arch/arm/mach-tegra/tegra.c +++ b/arch/arm/mach-tegra/tegra.c | |||
@@ -1,6 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * nVidia Tegra device tree board support | 2 | * NVIDIA Tegra SoC device tree board support |
3 | * | 3 | * |
4 | * Copyright (C) 2011, 2013, NVIDIA Corporation | ||
4 | * Copyright (C) 2010 Secret Lab Technologies, Ltd. | 5 | * Copyright (C) 2010 Secret Lab Technologies, Ltd. |
5 | * Copyright (C) 2010 Google, Inc. | 6 | * Copyright (C) 2010 Google, Inc. |
6 | * | 7 | * |
@@ -111,7 +112,8 @@ static void __init harmony_init(void) | |||
111 | 112 | ||
112 | static void __init paz00_init(void) | 113 | static void __init paz00_init(void) |
113 | { | 114 | { |
114 | tegra_paz00_wifikill_init(); | 115 | if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC)) |
116 | tegra_paz00_wifikill_init(); | ||
115 | } | 117 | } |
116 | 118 | ||
117 | static struct { | 119 | static struct { |
@@ -137,12 +139,14 @@ static void __init tegra_dt_init_late(void) | |||
137 | } | 139 | } |
138 | } | 140 | } |
139 | 141 | ||
140 | static const char *tegra20_dt_board_compat[] = { | 142 | static const char * const tegra_dt_board_compat[] = { |
143 | "nvidia,tegra114", | ||
144 | "nvidia,tegra30", | ||
141 | "nvidia,tegra20", | 145 | "nvidia,tegra20", |
142 | NULL | 146 | NULL |
143 | }; | 147 | }; |
144 | 148 | ||
145 | DT_MACHINE_START(TEGRA_DT, "nVidia Tegra20 (Flattened Device Tree)") | 149 | DT_MACHINE_START(TEGRA_DT, "NVIDIA Tegra SoC (Flattened Device Tree)") |
146 | .map_io = tegra_map_common_io, | 150 | .map_io = tegra_map_common_io, |
147 | .smp = smp_ops(tegra_smp_ops), | 151 | .smp = smp_ops(tegra_smp_ops), |
148 | .init_early = tegra_init_early, | 152 | .init_early = tegra_init_early, |
@@ -151,5 +155,5 @@ DT_MACHINE_START(TEGRA_DT, "nVidia Tegra20 (Flattened Device Tree)") | |||
151 | .init_machine = tegra_dt_init, | 155 | .init_machine = tegra_dt_init, |
152 | .init_late = tegra_dt_init_late, | 156 | .init_late = tegra_dt_init_late, |
153 | .restart = tegra_assert_system_reset, | 157 | .restart = tegra_assert_system_reset, |
154 | .dt_compat = tegra20_dt_board_compat, | 158 | .dt_compat = tegra_dt_board_compat, |
155 | MACHINE_END | 159 | MACHINE_END |