aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>2012-10-29 02:05:59 -0400
committerSimon Horman <horms@verge.net.au>2012-10-30 03:25:59 -0400
commit631a7b5d958d2ef2c2333b105794c693642f0641 (patch)
treeb4467af5dcc0ece42103e9ff85f1987d0f899ed7
parent6a800a0bb0483097b7a5391b4e010acad8a85d4e (diff)
ARM: shmobile: Remove G4EVM machine support
This machine is using old CPU of shmobile (sh7377) and cannot obtain machine, either. Therefore, remove G4EVM support. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--arch/arm/configs/g4evm_defconfig57
-rw-r--r--arch/arm/mach-shmobile/Kconfig9
-rw-r--r--arch/arm/mach-shmobile/Makefile1
-rw-r--r--arch/arm/mach-shmobile/board-g4evm.c384
4 files changed, 1 insertions, 450 deletions
diff --git a/arch/arm/configs/g4evm_defconfig b/arch/arm/configs/g4evm_defconfig
deleted file mode 100644
index 21c6d0307bc3..000000000000
--- a/arch/arm/configs/g4evm_defconfig
+++ /dev/null
@@ -1,57 +0,0 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y
3CONFIG_IKCONFIG=y
4CONFIG_IKCONFIG_PROC=y
5CONFIG_LOG_BUF_SHIFT=16
6CONFIG_BLK_DEV_INITRD=y
7CONFIG_SLAB=y
8# CONFIG_BLK_DEV_BSG is not set
9# CONFIG_IOSCHED_DEADLINE is not set
10# CONFIG_IOSCHED_CFQ is not set
11CONFIG_ARCH_SHMOBILE=y
12CONFIG_ARCH_SH7377=y
13CONFIG_MACH_G4EVM=y
14CONFIG_AEABI=y
15# CONFIG_OABI_COMPAT is not set
16CONFIG_ZBOOT_ROM_TEXT=0x0
17CONFIG_ZBOOT_ROM_BSS=0x0
18CONFIG_CMDLINE="console=ttySC4,115200 earlyprintk=sh-sci.4,115200"
19CONFIG_KEXEC=y
20CONFIG_PM=y
21# CONFIG_SUSPEND is not set
22CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
23# CONFIG_FIRMWARE_IN_KERNEL is not set
24CONFIG_MTD=y
25CONFIG_MTD_CONCAT=y
26CONFIG_MTD_PARTITIONS=y
27CONFIG_MTD_CHAR=y
28CONFIG_MTD_BLOCK=y
29CONFIG_MTD_CFI=y
30CONFIG_MTD_CFI_INTELEXT=y
31CONFIG_MTD_PHYSMAP=y
32CONFIG_MTD_NAND=y
33# CONFIG_BLK_DEV is not set
34# CONFIG_MISC_DEVICES is not set
35# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
36# CONFIG_INPUT_KEYBOARD is not set
37# CONFIG_INPUT_MOUSE is not set
38# CONFIG_SERIO is not set
39CONFIG_SERIAL_SH_SCI=y
40CONFIG_SERIAL_SH_SCI_NR_UARTS=8
41CONFIG_SERIAL_SH_SCI_CONSOLE=y
42# CONFIG_LEGACY_PTYS is not set
43# CONFIG_HW_RANDOM is not set
44# CONFIG_HWMON is not set
45# CONFIG_VGA_CONSOLE is not set
46# CONFIG_HID_SUPPORT is not set
47# CONFIG_USB_SUPPORT is not set
48# CONFIG_DNOTIFY is not set
49# CONFIG_INOTIFY_USER is not set
50CONFIG_TMPFS=y
51# CONFIG_MISC_FILESYSTEMS is not set
52CONFIG_MAGIC_SYSRQ=y
53CONFIG_DEBUG_KERNEL=y
54# CONFIG_DETECT_SOFTLOCKUP is not set
55# CONFIG_RCU_CPU_STALL_DETECTOR is not set
56# CONFIG_FTRACE is not set
57# CONFIG_CRC32 is not set
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 73c20213f0cd..f58c3ea97732 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -50,12 +50,6 @@ config ARCH_EMEV2
50 50
51comment "SH-Mobile Board Type" 51comment "SH-Mobile Board Type"
52 52
53config MACH_G4EVM
54 bool "G4EVM board"
55 depends on ARCH_SH7377
56 select ARCH_REQUIRE_GPIOLIB
57 select REGULATOR_FIXED_VOLTAGE if REGULATOR
58
59config MACH_AP4EVB 53config MACH_AP4EVB
60 bool "AP4EVB board" 54 bool "AP4EVB board"
61 depends on ARCH_SH7372 55 depends on ARCH_SH7372
@@ -142,7 +136,7 @@ menu "Memory configuration"
142 136
143config MEMORY_START 137config MEMORY_START
144 hex "Physical memory start address" 138 hex "Physical memory start address"
145 default "0x40000000" if MACH_G4EVM || MACH_AP4EVB || MACH_AG5EVM || \ 139 default "0x40000000" if MACH_AP4EVB || MACH_AG5EVM || \
146 MACH_MACKEREL || MACH_BONITO || \ 140 MACH_MACKEREL || MACH_BONITO || \
147 MACH_ARMADILLO800EVA 141 MACH_ARMADILLO800EVA
148 default "0x41000000" if MACH_KOTA2 142 default "0x41000000" if MACH_KOTA2
@@ -154,7 +148,6 @@ config MEMORY_START
154 148
155config MEMORY_SIZE 149config MEMORY_SIZE
156 hex "Physical memory size" 150 hex "Physical memory size"
157 default "0x08000000" if MACH_G4EVM
158 default "0x20000000" if MACH_AG5EVM || MACH_BONITO || \ 151 default "0x20000000" if MACH_AG5EVM || MACH_BONITO || \
159 MACH_ARMADILLO800EVA 152 MACH_ARMADILLO800EVA
160 default "0x1e000000" if MACH_KOTA2 153 default "0x1e000000" if MACH_KOTA2
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index 30a6c83df455..bd2633bb175a 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -45,7 +45,6 @@ obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o
45obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o 45obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o
46 46
47# Board objects 47# Board objects
48obj-$(CONFIG_MACH_G4EVM) += board-g4evm.o
49obj-$(CONFIG_MACH_AP4EVB) += board-ap4evb.o 48obj-$(CONFIG_MACH_AP4EVB) += board-ap4evb.o
50obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o 49obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o
51obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o 50obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o
diff --git a/arch/arm/mach-shmobile/board-g4evm.c b/arch/arm/mach-shmobile/board-g4evm.c
deleted file mode 100644
index 35c126caa4d8..000000000000
--- a/arch/arm/mach-shmobile/board-g4evm.c
+++ /dev/null
@@ -1,384 +0,0 @@
1/*
2 * G4EVM board support
3 *
4 * Copyright (C) 2010 Magnus Damm
5 * Copyright (C) 2008 Yoshihiro Shimoda
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#include <linux/kernel.h>
21#include <linux/init.h>
22#include <linux/interrupt.h>
23#include <linux/irq.h>
24#include <linux/platform_device.h>
25#include <linux/delay.h>
26#include <linux/mtd/mtd.h>
27#include <linux/mtd/partitions.h>
28#include <linux/mtd/physmap.h>
29#include <linux/regulator/fixed.h>
30#include <linux/regulator/machine.h>
31#include <linux/usb/r8a66597.h>
32#include <linux/io.h>
33#include <linux/input.h>
34#include <linux/input/sh_keysc.h>
35#include <linux/mmc/host.h>
36#include <linux/mmc/sh_mobile_sdhi.h>
37#include <linux/gpio.h>
38#include <linux/dma-mapping.h>
39#include <mach/irqs.h>
40#include <mach/sh7377.h>
41#include <mach/common.h>
42#include <asm/mach-types.h>
43#include <asm/mach/arch.h>
44
45#include "sh-gpio.h"
46
47/*
48 * SDHI
49 *
50 * SDHI0 : card detection is possible
51 * SDHI1 : card detection is impossible
52 *
53 * [G4-MAIN-BOARD]
54 * JP74 : short # DBG_2V8A for SDHI0
55 * JP75 : NC # DBG_3V3A for SDHI0
56 * JP76 : NC # DBG_3V3A_SD for SDHI0
57 * JP77 : NC # 3V3A_SDIO for SDHI1
58 * JP78 : short # DBG_2V8A for SDHI1
59 * JP79 : NC # DBG_3V3A for SDHI1
60 * JP80 : NC # DBG_3V3A_SD for SDHI1
61 *
62 * [G4-CORE-BOARD]
63 * S32 : all off # to dissever from G3-CORE_DBG board
64 * S33 : all off # to dissever from G3-CORE_DBG board
65 *
66 * [G3-CORE_DBG-BOARD]
67 * S1 : all off # to dissever from G3-CORE_DBG board
68 * S3 : all off # to dissever from G3-CORE_DBG board
69 * S4 : all off # to dissever from G3-CORE_DBG board
70 */
71
72static struct mtd_partition nor_flash_partitions[] = {
73 {
74 .name = "loader",
75 .offset = 0x00000000,
76 .size = 512 * 1024,
77 },
78 {
79 .name = "bootenv",
80 .offset = MTDPART_OFS_APPEND,
81 .size = 512 * 1024,
82 },
83 {
84 .name = "kernel_ro",
85 .offset = MTDPART_OFS_APPEND,
86 .size = 8 * 1024 * 1024,
87 .mask_flags = MTD_WRITEABLE,
88 },
89 {
90 .name = "kernel",
91 .offset = MTDPART_OFS_APPEND,
92 .size = 8 * 1024 * 1024,
93 },
94 {
95 .name = "data",
96 .offset = MTDPART_OFS_APPEND,
97 .size = MTDPART_SIZ_FULL,
98 },
99};
100
101static struct physmap_flash_data nor_flash_data = {
102 .width = 2,
103 .parts = nor_flash_partitions,
104 .nr_parts = ARRAY_SIZE(nor_flash_partitions),
105};
106
107static struct resource nor_flash_resources[] = {
108 [0] = {
109 .start = 0x00000000,
110 .end = 0x08000000 - 1,
111 .flags = IORESOURCE_MEM,
112 }
113};
114
115static struct platform_device nor_flash_device = {
116 .name = "physmap-flash",
117 .dev = {
118 .platform_data = &nor_flash_data,
119 },
120 .num_resources = ARRAY_SIZE(nor_flash_resources),
121 .resource = nor_flash_resources,
122};
123
124/* USBHS */
125static void usb_host_port_power(int port, int power)
126{
127 if (!power) /* only power-on supported for now */
128 return;
129
130 /* set VBOUT/PWEN and EXTLP0 in DVSTCTR */
131 __raw_writew(__raw_readw(IOMEM(0xe6890008)) | 0x600, IOMEM(0xe6890008));
132}
133
134static struct r8a66597_platdata usb_host_data = {
135 .on_chip = 1,
136 .port_power = usb_host_port_power,
137};
138
139static struct resource usb_host_resources[] = {
140 [0] = {
141 .name = "USBHS",
142 .start = 0xe6890000,
143 .end = 0xe68900e5,
144 .flags = IORESOURCE_MEM,
145 },
146 [1] = {
147 .start = evt2irq(0x0a20), /* USBHS_USHI0 */
148 .flags = IORESOURCE_IRQ,
149 },
150};
151
152static struct platform_device usb_host_device = {
153 .name = "r8a66597_hcd",
154 .id = 0,
155 .dev = {
156 .platform_data = &usb_host_data,
157 .dma_mask = NULL,
158 .coherent_dma_mask = 0xffffffff,
159 },
160 .num_resources = ARRAY_SIZE(usb_host_resources),
161 .resource = usb_host_resources,
162};
163
164/* KEYSC */
165static struct sh_keysc_info keysc_info = {
166 .mode = SH_KEYSC_MODE_5,
167 .scan_timing = 3,
168 .delay = 100,
169 .keycodes = {
170 KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, KEY_F,
171 KEY_G, KEY_H, KEY_I, KEY_J, KEY_K, KEY_L,
172 KEY_M, KEY_N, KEY_U, KEY_P, KEY_Q, KEY_R,
173 KEY_S, KEY_T, KEY_U, KEY_V, KEY_W, KEY_X,
174 KEY_Y, KEY_Z, KEY_HOME, KEY_SLEEP, KEY_WAKEUP, KEY_COFFEE,
175 KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5,
176 KEY_6, KEY_7, KEY_8, KEY_9, KEY_STOP, KEY_COMPUTER,
177 },
178};
179
180static struct resource keysc_resources[] = {
181 [0] = {
182 .name = "KEYSC",
183 .start = 0xe61b0000,
184 .end = 0xe61b000f,
185 .flags = IORESOURCE_MEM,
186 },
187 [1] = {
188 .start = evt2irq(0x0be0), /* KEYSC_KEY */
189 .flags = IORESOURCE_IRQ,
190 },
191};
192
193static struct platform_device keysc_device = {
194 .name = "sh_keysc",
195 .id = 0, /* keysc0 clock */
196 .num_resources = ARRAY_SIZE(keysc_resources),
197 .resource = keysc_resources,
198 .dev = {
199 .platform_data = &keysc_info,
200 },
201};
202
203/* Fixed 3.3V regulator to be used by SDHI0 and SDHI1 */
204static struct regulator_consumer_supply fixed3v3_power_consumers[] =
205{
206 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
207 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
208 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
209 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
210};
211
212/* SDHI */
213static struct sh_mobile_sdhi_info sdhi0_info = {
214 .tmio_caps = MMC_CAP_SDIO_IRQ,
215};
216
217static struct resource sdhi0_resources[] = {
218 [0] = {
219 .name = "SDHI0",
220 .start = 0xe6d50000,
221 .end = 0xe6d500ff,
222 .flags = IORESOURCE_MEM,
223 },
224 [1] = {
225 .start = evt2irq(0x0e00), /* SDHI0 */
226 .flags = IORESOURCE_IRQ,
227 },
228};
229
230static struct platform_device sdhi0_device = {
231 .name = "sh_mobile_sdhi",
232 .num_resources = ARRAY_SIZE(sdhi0_resources),
233 .resource = sdhi0_resources,
234 .id = 0,
235 .dev = {
236 .platform_data = &sdhi0_info,
237 },
238};
239
240static struct sh_mobile_sdhi_info sdhi1_info = {
241 .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ,
242};
243
244static struct resource sdhi1_resources[] = {
245 [0] = {
246 .name = "SDHI1",
247 .start = 0xe6d60000,
248 .end = 0xe6d600ff,
249 .flags = IORESOURCE_MEM,
250 },
251 [1] = {
252 .start = evt2irq(0x0e80), /* SDHI1 */
253 .flags = IORESOURCE_IRQ,
254 },
255};
256
257static struct platform_device sdhi1_device = {
258 .name = "sh_mobile_sdhi",
259 .num_resources = ARRAY_SIZE(sdhi1_resources),
260 .resource = sdhi1_resources,
261 .id = 1,
262 .dev = {
263 .platform_data = &sdhi1_info,
264 },
265};
266
267static struct platform_device *g4evm_devices[] __initdata = {
268 &nor_flash_device,
269 &usb_host_device,
270 &keysc_device,
271 &sdhi0_device,
272 &sdhi1_device,
273};
274
275#define GPIO_SDHID0_D0 IOMEM(0xe60520fc)
276#define GPIO_SDHID0_D1 IOMEM(0xe60520fd)
277#define GPIO_SDHID0_D2 IOMEM(0xe60520fe)
278#define GPIO_SDHID0_D3 IOMEM(0xe60520ff)
279#define GPIO_SDHICMD0 IOMEM(0xe6052100)
280
281#define GPIO_SDHID1_D0 IOMEM(0xe6052103)
282#define GPIO_SDHID1_D1 IOMEM(0xe6052104)
283#define GPIO_SDHID1_D2 IOMEM(0xe6052105)
284#define GPIO_SDHID1_D3 IOMEM(0xe6052106)
285#define GPIO_SDHICMD1 IOMEM(0xe6052107)
286
287static void __init g4evm_init(void)
288{
289 regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
290 ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
291
292 sh7377_pinmux_init();
293
294 /* Lit DS14 LED */
295 gpio_request(GPIO_PORT109, NULL);
296 gpio_direction_output(GPIO_PORT109, 1);
297 gpio_export(GPIO_PORT109, 1);
298
299 /* Lit DS15 LED */
300 gpio_request(GPIO_PORT110, NULL);
301 gpio_direction_output(GPIO_PORT110, 1);
302 gpio_export(GPIO_PORT110, 1);
303
304 /* Lit DS16 LED */
305 gpio_request(GPIO_PORT112, NULL);
306 gpio_direction_output(GPIO_PORT112, 1);
307 gpio_export(GPIO_PORT112, 1);
308
309 /* Lit DS17 LED */
310 gpio_request(GPIO_PORT113, NULL);
311 gpio_direction_output(GPIO_PORT113, 1);
312 gpio_export(GPIO_PORT113, 1);
313
314 /* USBHS */
315 gpio_request(GPIO_FN_VBUS_0, NULL);
316 gpio_request(GPIO_FN_PWEN, NULL);
317 gpio_request(GPIO_FN_OVCN, NULL);
318 gpio_request(GPIO_FN_OVCN2, NULL);
319 gpio_request(GPIO_FN_EXTLP, NULL);
320 gpio_request(GPIO_FN_IDIN, NULL);
321
322 /* setup USB phy */
323 __raw_writew(0x0200, IOMEM(0xe605810a)); /* USBCR1 */
324 __raw_writew(0x00e0, IOMEM(0xe60581c0)); /* CPFCH */
325 __raw_writew(0x6010, IOMEM(0xe60581c6)); /* CGPOSR */
326 __raw_writew(0x8a0a, IOMEM(0xe605810c)); /* USBCR2 */
327
328 /* KEYSC @ CN31 */
329 gpio_request(GPIO_FN_PORT60_KEYOUT5, NULL);
330 gpio_request(GPIO_FN_PORT61_KEYOUT4, NULL);
331 gpio_request(GPIO_FN_PORT62_KEYOUT3, NULL);
332 gpio_request(GPIO_FN_PORT63_KEYOUT2, NULL);
333 gpio_request(GPIO_FN_PORT64_KEYOUT1, NULL);
334 gpio_request(GPIO_FN_PORT65_KEYOUT0, NULL);
335 gpio_request(GPIO_FN_PORT66_KEYIN0_PU, NULL);
336 gpio_request(GPIO_FN_PORT67_KEYIN1_PU, NULL);
337 gpio_request(GPIO_FN_PORT68_KEYIN2_PU, NULL);
338 gpio_request(GPIO_FN_PORT69_KEYIN3_PU, NULL);
339 gpio_request(GPIO_FN_PORT70_KEYIN4_PU, NULL);
340 gpio_request(GPIO_FN_PORT71_KEYIN5_PU, NULL);
341 gpio_request(GPIO_FN_PORT72_KEYIN6_PU, NULL);
342
343 /* SDHI0 */
344 gpio_request(GPIO_FN_SDHICLK0, NULL);
345 gpio_request(GPIO_FN_SDHICD0, NULL);
346 gpio_request(GPIO_FN_SDHID0_0, NULL);
347 gpio_request(GPIO_FN_SDHID0_1, NULL);
348 gpio_request(GPIO_FN_SDHID0_2, NULL);
349 gpio_request(GPIO_FN_SDHID0_3, NULL);
350 gpio_request(GPIO_FN_SDHICMD0, NULL);
351 gpio_request(GPIO_FN_SDHIWP0, NULL);
352 gpio_request_pullup(GPIO_SDHID0_D0);
353 gpio_request_pullup(GPIO_SDHID0_D1);
354 gpio_request_pullup(GPIO_SDHID0_D2);
355 gpio_request_pullup(GPIO_SDHID0_D3);
356 gpio_request_pullup(GPIO_SDHICMD0);
357
358 /* SDHI1 */
359 gpio_request(GPIO_FN_SDHICLK1, NULL);
360 gpio_request(GPIO_FN_SDHID1_0, NULL);
361 gpio_request(GPIO_FN_SDHID1_1, NULL);
362 gpio_request(GPIO_FN_SDHID1_2, NULL);
363 gpio_request(GPIO_FN_SDHID1_3, NULL);
364 gpio_request(GPIO_FN_SDHICMD1, NULL);
365 gpio_request_pullup(GPIO_SDHID1_D0);
366 gpio_request_pullup(GPIO_SDHID1_D1);
367 gpio_request_pullup(GPIO_SDHID1_D2);
368 gpio_request_pullup(GPIO_SDHID1_D3);
369 gpio_request_pullup(GPIO_SDHICMD1);
370
371 sh7377_add_standard_devices();
372
373 platform_add_devices(g4evm_devices, ARRAY_SIZE(g4evm_devices));
374}
375
376MACHINE_START(G4EVM, "g4evm")
377 .map_io = sh7377_map_io,
378 .init_early = sh7377_add_early_devices,
379 .init_irq = sh7377_init_irq,
380 .handle_irq = shmobile_handle_irq_intc,
381 .init_machine = g4evm_init,
382 .init_late = shmobile_init_late,
383 .timer = &shmobile_timer,
384MACHINE_END