aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <damm+renesas@opensource.se>2014-08-27 23:35:18 -0400
committerSimon Horman <horms+renesas@verge.net.au>2014-09-03 23:59:37 -0400
commit52031d41be060e9a7f6d113728109aed4758f7ae (patch)
tree0caacd7703b42445d7c8aa3ae202025764c95e2a
parent1174c712afa2779fad54b86b3569f40fab78c0c2 (diff)
ARM: shmobile: armadillo800eva reference: Remove C board code
Now when the r8a7740 generic multiplatform case has the same features as the DT reference board code then get rid of the Armadillo800EVA DT reference C board code. DT Reference code in the future shall make use of the r8a7740 Multiplatform support code with the generic SoC machine vector. Signed-off-by: Magnus Damm <damm+renesas@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r--arch/arm/mach-shmobile/Kconfig15
-rw-r--r--arch/arm/mach-shmobile/Makefile1
-rw-r--r--arch/arm/mach-shmobile/Makefile.boot1
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva-reference.c199
4 files changed, 0 insertions, 216 deletions
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 498162fb757e..723bcc501c54 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -200,21 +200,6 @@ config MACH_ARMADILLO800EVA
200 select SND_SOC_WM8978 if SND_SIMPLE_CARD 200 select SND_SOC_WM8978 if SND_SIMPLE_CARD
201 select USE_OF 201 select USE_OF
202 202
203config MACH_ARMADILLO800EVA_REFERENCE
204 bool "Armadillo-800 EVA board - Reference Device Tree Implementation"
205 depends on ARCH_R8A7740
206 select ARCH_REQUIRE_GPIOLIB
207 select REGULATOR_FIXED_VOLTAGE if REGULATOR
208 select SMSC_PHY if SH_ETH
209 select SND_SOC_WM8978 if SND_SIMPLE_CARD
210 select USE_OF
211 ---help---
212 Use reference implementation of Armadillo800 EVA board support
213 which makes greater use of device tree at the expense
214 of not supporting a number of devices.
215
216 This is intended to aid developers
217
218config MACH_BOCKW 203config MACH_BOCKW
219 bool "BOCK-W platform" 204 bool "BOCK-W platform"
220 depends on ARCH_R8A7778 205 depends on ARCH_R8A7778
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index fe3878a1a69a..7a9d03a7c07c 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -77,7 +77,6 @@ obj-$(CONFIG_MACH_GENMAI) += board-genmai.o
77obj-$(CONFIG_MACH_MARZEN) += board-marzen.o 77obj-$(CONFIG_MACH_MARZEN) += board-marzen.o
78obj-$(CONFIG_MACH_LAGER) += board-lager.o 78obj-$(CONFIG_MACH_LAGER) += board-lager.o
79obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o 79obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o
80obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o
81obj-$(CONFIG_MACH_KOELSCH) += board-koelsch.o 80obj-$(CONFIG_MACH_KOELSCH) += board-koelsch.o
82obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o 81obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o
83obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o 82obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot
index ebf97d4bcfd8..ec8caffdb5d0 100644
--- a/arch/arm/mach-shmobile/Makefile.boot
+++ b/arch/arm/mach-shmobile/Makefile.boot
@@ -3,7 +3,6 @@ loadaddr-y :=
3loadaddr-$(CONFIG_MACH_APE6EVM) += 0x40008000 3loadaddr-$(CONFIG_MACH_APE6EVM) += 0x40008000
4loadaddr-$(CONFIG_MACH_APE6EVM_REFERENCE) += 0x40008000 4loadaddr-$(CONFIG_MACH_APE6EVM_REFERENCE) += 0x40008000
5loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000 5loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000
6loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000
7loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 6loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000
8loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000 7loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000
9loadaddr-$(CONFIG_MACH_GENMAI) += 0x08008000 8loadaddr-$(CONFIG_MACH_GENMAI) += 0x08008000
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
deleted file mode 100644
index f06e1f336dfb..000000000000
--- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
+++ /dev/null
@@ -1,199 +0,0 @@
1/*
2 * armadillo 800 eva board support
3 *
4 * Copyright (C) 2012 Renesas Solutions Corp.
5 * Copyright (C) 2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 */
21
22#include <linux/clk.h>
23#include <linux/err.h>
24#include <linux/kernel.h>
25#include <linux/gpio.h>
26#include <linux/io.h>
27#include <linux/of_platform.h>
28
29#include <asm/mach/arch.h>
30#include <asm/hardware/cache-l2x0.h>
31
32#include "common.h"
33#include "r8a7740.h"
34
35/*
36 * CON1 Camera Module
37 * CON2 Extension Bus
38 * CON3 HDMI Output
39 * CON4 Composite Video Output
40 * CON5 H-UDI JTAG
41 * CON6 ARM JTAG
42 * CON7 SD1
43 * CON8 SD2
44 * CON9 RTC BackUp
45 * CON10 Monaural Mic Input
46 * CON11 Stereo Headphone Output
47 * CON12 Audio Line Output(L)
48 * CON13 Audio Line Output(R)
49 * CON14 AWL13 Module
50 * CON15 Extension
51 * CON16 LCD1
52 * CON17 LCD2
53 * CON19 Power Input
54 * CON20 USB1
55 * CON21 USB2
56 * CON22 Serial
57 * CON23 LAN
58 * CON24 USB3
59 * LED1 Camera LED (Yellow)
60 * LED2 Power LED (Green)
61 * LED3-LED6 User LED (Yellow)
62 * LED7 LAN link LED (Green)
63 * LED8 LAN activity LED (Yellow)
64 */
65
66/*
67 * DipSwitch
68 *
69 * SW1
70 *
71 * -12345678-+---------------+----------------------------
72 * 1 | boot | hermit
73 * 0 | boot | OS auto boot
74 * -12345678-+---------------+----------------------------
75 * 00 | boot device | eMMC
76 * 10 | boot device | SDHI0 (CON7)
77 * 01 | boot device | -
78 * 11 | boot device | Extension Buss (CS0)
79 * -12345678-+---------------+----------------------------
80 * 0 | Extension Bus | D8-D15 disable, eMMC enable
81 * 1 | Extension Bus | D8-D15 enable, eMMC disable
82 * -12345678-+---------------+----------------------------
83 * 0 | SDHI1 | COM8 disable, COM14 enable
84 * 1 | SDHI1 | COM8 enable, COM14 disable
85 * -12345678-+---------------+----------------------------
86 * 0 | USB0 | COM20 enable, COM24 disable
87 * 1 | USB0 | COM20 disable, COM24 enable
88 * -12345678-+---------------+----------------------------
89 * 00 | JTAG | SH-X2
90 * 10 | JTAG | ARM
91 * 01 | JTAG | -
92 * 11 | JTAG | Boundary Scan
93 *-----------+---------------+----------------------------
94 */
95
96/*
97 * FSI-WM8978
98 *
99 * this command is required when playback.
100 *
101 * # amixer set "Headphone" 50
102 *
103 * this command is required when capture.
104 *
105 * # amixer set "Input PGA" 15
106 * # amixer set "Left Input Mixer MicP" on
107 * # amixer set "Left Input Mixer MicN" on
108 * # amixer set "Right Input Mixer MicN" on
109 * # amixer set "Right Input Mixer MicP" on
110 */
111
112/*
113 * USB function
114 *
115 * When you use USB Function,
116 * set SW1.6 ON, and connect cable to CN24.
117 *
118 * USBF needs workaround on R8A7740 chip.
119 * These are a little bit complex.
120 * see
121 * usbhsf_power_ctrl()
122 */
123
124static void __init eva_clock_init(void)
125{
126 struct clk *system = clk_get(NULL, "system_clk");
127 struct clk *xtal1 = clk_get(NULL, "extal1");
128 struct clk *usb24s = clk_get(NULL, "usb24s");
129 struct clk *fsibck = clk_get(NULL, "fsibck");
130
131 if (IS_ERR(system) ||
132 IS_ERR(xtal1) ||
133 IS_ERR(usb24s) ||
134 IS_ERR(fsibck)) {
135 pr_err("armadillo800eva board clock init failed\n");
136 goto clock_error;
137 }
138
139 /* armadillo 800 eva extal1 is 24MHz */
140 clk_set_rate(xtal1, 24000000);
141
142 /* usb24s use extal1 (= system) clock (= 24MHz) */
143 clk_set_parent(usb24s, system);
144
145 /* FSIBCK is 12.288MHz, and it is parent of FSI-B */
146 clk_set_rate(fsibck, 12288000);
147
148clock_error:
149 if (!IS_ERR(system))
150 clk_put(system);
151 if (!IS_ERR(xtal1))
152 clk_put(xtal1);
153 if (!IS_ERR(usb24s))
154 clk_put(usb24s);
155 if (!IS_ERR(fsibck))
156 clk_put(fsibck);
157}
158
159/*
160 * board init
161 */
162static void __init eva_init(void)
163{
164 r8a7740_clock_init(MD_CK0 | MD_CK2);
165 eva_clock_init();
166
167 r8a7740_meram_workaround();
168
169#ifdef CONFIG_CACHE_L2X0
170 /* Shared attribute override enable, 32K*8way */
171 l2x0_init(IOMEM(0xf0002000), 0x00400000, 0xc20f0fff);
172#endif
173
174 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
175
176 r8a7740_pm_init();
177}
178
179#define RESCNT2 IOMEM(0xe6188020)
180static void eva_restart(enum reboot_mode mode, const char *cmd)
181{
182 /* Do soft power on reset */
183 writel(1 << 31, RESCNT2);
184}
185
186static const char *eva_boards_compat_dt[] __initdata = {
187 "renesas,armadillo800eva-reference",
188 NULL,
189};
190
191DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva-reference")
192 .map_io = r8a7740_map_io,
193 .init_early = shmobile_init_delay,
194 .init_irq = r8a7740_init_irq_of,
195 .init_machine = eva_init,
196 .init_late = shmobile_init_late,
197 .dt_compat = eva_boards_compat_dt,
198 .restart = eva_restart,
199MACHINE_END