blob: 5c41b958e022f618dec2b14cef08f70037f988ae [file] [log] [blame]
Magnus Damm2b7eda62010-02-05 11:14:58 +00001/*
2 * AP4EVB 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 */
Guennadi Liakhovetski8eda2f22010-05-23 14:04:03 +000020#include <linux/clk.h>
Magnus Damm2b7eda62010-02-05 11:14:58 +000021#include <linux/kernel.h>
22#include <linux/init.h>
23#include <linux/interrupt.h>
24#include <linux/irq.h>
25#include <linux/platform_device.h>
26#include <linux/delay.h>
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +000027#include <linux/mfd/sh_mobile_sdhi.h>
Magnus Damm2b7eda62010-02-05 11:14:58 +000028#include <linux/mtd/mtd.h>
29#include <linux/mtd/partitions.h>
30#include <linux/mtd/physmap.h>
Kuninori Morimoto91cf5082010-03-11 10:42:52 +000031#include <linux/i2c.h>
32#include <linux/i2c/tsc2007.h>
Magnus Damm2b7eda62010-02-05 11:14:58 +000033#include <linux/io.h>
Kuninori Morimoto1b7e0672010-02-17 09:30:14 +000034#include <linux/smsc911x.h>
35#include <linux/gpio.h>
Kuninori Morimoto17ccb832010-02-23 07:07:01 +000036#include <linux/input.h>
37#include <linux/input/sh_keysc.h>
Kuninori Morimotofb54d262010-04-13 06:16:32 +000038#include <linux/usb/r8a66597.h>
Guennadi Liakhovetski8eda2f22010-05-23 14:04:03 +000039
40#include <video/sh_mobile_lcdc.h>
41#include <video/sh_mipi_dsi.h>
42
Magnus Damm2b7eda62010-02-05 11:14:58 +000043#include <mach/common.h>
Guennadi Liakhovetski8eda2f22010-05-23 14:04:03 +000044#include <mach/irqs.h>
Kuninori Morimoto1b7e0672010-02-17 09:30:14 +000045#include <mach/sh7372.h>
Guennadi Liakhovetski8eda2f22010-05-23 14:04:03 +000046
Magnus Damm2b7eda62010-02-05 11:14:58 +000047#include <asm/mach-types.h>
48#include <asm/mach/arch.h>
49#include <asm/mach/map.h>
Magnus Damm495b3ce2010-05-12 14:21:34 +000050#include <asm/mach/time.h>
Magnus Damm2b7eda62010-02-05 11:14:58 +000051
Kuninori Morimoto02624a12010-02-18 17:58:19 +090052/*
53 * Address Interface BusWidth note
54 * ------------------------------------------------------------------
55 * 0x0000_0000 NOR Flash ROM (MCP) 16bit SW7 : bit1 = ON
56 * 0x0800_0000 user area -
57 * 0x1000_0000 NOR Flash ROM (MCP) 16bit SW7 : bit1 = OFF
58 * 0x1400_0000 Ether (LAN9220) 16bit
59 * 0x1600_0000 user area - cannot use with NAND
60 * 0x1800_0000 user area -
61 * 0x1A00_0000 -
62 * 0x4000_0000 LPDDR2-SDRAM (POP) 32bit
63 */
64
65/*
66 * NOR Flash ROM
67 *
68 * SW1 | SW2 | SW7 | NOR Flash ROM
69 * bit1 | bit1 bit2 | bit1 | Memory allocation
70 * ------+------------+------+------------------
71 * OFF | ON OFF | ON | Area 0
72 * OFF | ON OFF | OFF | Area 4
73 */
74
75/*
76 * NAND Flash ROM
77 *
78 * SW1 | SW2 | SW7 | NAND Flash ROM
79 * bit1 | bit1 bit2 | bit2 | Memory allocation
80 * ------+------------+------+------------------
81 * OFF | ON OFF | ON | FCE 0
82 * OFF | ON OFF | OFF | FCE 1
83 */
84
85/*
86 * SMSC 9220
87 *
88 * SW1 SMSC 9220
89 * -----------------------
90 * ON access disable
91 * OFF access enable
92 */
93
Kuninori Morimoto17ccb832010-02-23 07:07:01 +000094/*
Kuninori Morimotodda128d2010-03-12 10:07:55 +000095 * LCD / IRQ / KEYSC / IrDA
Kuninori Morimoto17ccb832010-02-23 07:07:01 +000096 *
Kuninori Morimotodda128d2010-03-12 10:07:55 +000097 * IRQ = IRQ26 (TS), IRQ27 (VIO), IRQ28 (TouchScreen)
98 * LCD = 2nd LCDC
99 *
100 * | SW43 |
101 * SW3 | ON | OFF |
102 * -------------+-----------------------+---------------+
103 * ON | KEY / IrDA | LCD |
104 * OFF | KEY / IrDA / IRQ | IRQ |
Kuninori Morimoto17ccb832010-02-23 07:07:01 +0000105 */
106
Kuninori Morimotofb54d262010-04-13 06:16:32 +0000107/*
108 * USB
109 *
110 * J7 : 1-2 MAX3355E VBUS
111 * 2-3 DC 5.0V
112 *
113 * S39: bit2: off
114 */
115
Kuninori Morimoto1b7e0672010-02-17 09:30:14 +0000116/* MTD */
Magnus Damm2b7eda62010-02-05 11:14:58 +0000117static struct mtd_partition nor_flash_partitions[] = {
118 {
119 .name = "loader",
120 .offset = 0x00000000,
121 .size = 512 * 1024,
122 },
123 {
124 .name = "bootenv",
125 .offset = MTDPART_OFS_APPEND,
126 .size = 512 * 1024,
127 },
128 {
129 .name = "kernel_ro",
130 .offset = MTDPART_OFS_APPEND,
131 .size = 8 * 1024 * 1024,
132 .mask_flags = MTD_WRITEABLE,
133 },
134 {
135 .name = "kernel",
136 .offset = MTDPART_OFS_APPEND,
137 .size = 8 * 1024 * 1024,
138 },
139 {
140 .name = "data",
141 .offset = MTDPART_OFS_APPEND,
142 .size = MTDPART_SIZ_FULL,
143 },
144};
145
146static struct physmap_flash_data nor_flash_data = {
147 .width = 2,
148 .parts = nor_flash_partitions,
149 .nr_parts = ARRAY_SIZE(nor_flash_partitions),
150};
151
152static struct resource nor_flash_resources[] = {
153 [0] = {
154 .start = 0x00000000,
155 .end = 0x08000000 - 1,
156 .flags = IORESOURCE_MEM,
157 }
158};
159
160static struct platform_device nor_flash_device = {
161 .name = "physmap-flash",
162 .dev = {
163 .platform_data = &nor_flash_data,
164 },
165 .num_resources = ARRAY_SIZE(nor_flash_resources),
166 .resource = nor_flash_resources,
167};
168
Kuninori Morimoto1b7e0672010-02-17 09:30:14 +0000169/* SMSC 9220 */
170static struct resource smc911x_resources[] = {
171 {
172 .start = 0x14000000,
173 .end = 0x16000000 - 1,
174 .flags = IORESOURCE_MEM,
175 }, {
Magnus Damm33c96072010-05-20 14:41:00 +0000176 .start = evt2irq(0x02c0) /* IRQ6A */,
Kuninori Morimoto1b7e0672010-02-17 09:30:14 +0000177 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
178 },
179};
180
181static struct smsc911x_platform_config smsc911x_info = {
182 .flags = SMSC911X_USE_16BIT | SMSC911X_SAVE_MAC_ADDRESS,
183 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
184 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
185};
186
187static struct platform_device smc911x_device = {
188 .name = "smsc911x",
189 .id = -1,
190 .num_resources = ARRAY_SIZE(smc911x_resources),
191 .resource = smc911x_resources,
192 .dev = {
193 .platform_data = &smsc911x_info,
194 },
195};
Magnus Damm2b7eda62010-02-05 11:14:58 +0000196
Kuninori Morimoto17ccb832010-02-23 07:07:01 +0000197/* KEYSC (Needs SW43 set to ON) */
198static struct sh_keysc_info keysc_info = {
199 .mode = SH_KEYSC_MODE_1,
200 .scan_timing = 3,
201 .delay = 2500,
202 .keycodes = {
203 KEY_0, KEY_1, KEY_2, KEY_3, KEY_4,
204 KEY_5, KEY_6, KEY_7, KEY_8, KEY_9,
205 KEY_A, KEY_B, KEY_C, KEY_D, KEY_E,
206 KEY_F, KEY_G, KEY_H, KEY_I, KEY_J,
207 KEY_K, KEY_L, KEY_M, KEY_N, KEY_O,
208 },
209};
210
211static struct resource keysc_resources[] = {
212 [0] = {
213 .name = "KEYSC",
214 .start = 0xe61b0000,
215 .end = 0xe61b0063,
216 .flags = IORESOURCE_MEM,
217 },
218 [1] = {
Magnus Damm33c96072010-05-20 14:41:00 +0000219 .start = evt2irq(0x0be0), /* KEYSC_KEY */
Kuninori Morimoto17ccb832010-02-23 07:07:01 +0000220 .flags = IORESOURCE_IRQ,
221 },
222};
223
224static struct platform_device keysc_device = {
225 .name = "sh_keysc",
226 .id = 0, /* "keysc0" clock */
227 .num_resources = ARRAY_SIZE(keysc_resources),
228 .resource = keysc_resources,
229 .dev = {
230 .platform_data = &keysc_info,
231 },
232};
233
Magnus Damm3a14d032010-03-10 09:26:44 +0000234/* SDHI0 */
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000235static struct sh_mobile_sdhi_info sdhi0_info = {
236 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
237 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
238};
239
Magnus Damm3a14d032010-03-10 09:26:44 +0000240static struct resource sdhi0_resources[] = {
241 [0] = {
242 .name = "SDHI0",
243 .start = 0xe6850000,
244 .end = 0xe68501ff,
245 .flags = IORESOURCE_MEM,
246 },
247 [1] = {
Magnus Damm33c96072010-05-20 14:41:00 +0000248 .start = evt2irq(0x0e00) /* SDHI0 */,
Magnus Damm3a14d032010-03-10 09:26:44 +0000249 .flags = IORESOURCE_IRQ,
250 },
251};
252
253static struct platform_device sdhi0_device = {
254 .name = "sh_mobile_sdhi",
255 .num_resources = ARRAY_SIZE(sdhi0_resources),
256 .resource = sdhi0_resources,
257 .id = 0,
Guennadi Liakhovetski69bf6f452010-05-04 14:07:15 +0000258 .dev = {
259 .platform_data = &sdhi0_info,
260 },
Magnus Damm3a14d032010-03-10 09:26:44 +0000261};
262
Kuninori Morimotofb54d262010-04-13 06:16:32 +0000263/* USB1 */
264void usb1_host_port_power(int port, int power)
265{
266 if (!power) /* only power-on supported for now */
267 return;
268
269 /* set VBOUT/PWEN and EXTLP1 in DVSTCTR */
270 __raw_writew(__raw_readw(0xE68B0008) | 0x600, 0xE68B0008);
271}
272
273static struct r8a66597_platdata usb1_host_data = {
274 .on_chip = 1,
275 .port_power = usb1_host_port_power,
276};
277
278static struct resource usb1_host_resources[] = {
279 [0] = {
280 .name = "USBHS",
281 .start = 0xE68B0000,
282 .end = 0xE68B00E6 - 1,
283 .flags = IORESOURCE_MEM,
284 },
285 [1] = {
Magnus Damm33c96072010-05-20 14:41:00 +0000286 .start = evt2irq(0x1ce0) /* USB1_USB1I0 */,
Kuninori Morimotofb54d262010-04-13 06:16:32 +0000287 .flags = IORESOURCE_IRQ,
288 },
289};
290
291static struct platform_device usb1_host_device = {
292 .name = "r8a66597_hcd",
293 .id = 1,
294 .dev = {
295 .dma_mask = NULL, /* not use dma */
296 .coherent_dma_mask = 0xffffffff,
297 .platform_data = &usb1_host_data,
298 },
299 .num_resources = ARRAY_SIZE(usb1_host_resources),
300 .resource = usb1_host_resources,
301};
302
Guennadi Liakhovetski8eda2f22010-05-23 14:04:03 +0000303static struct sh_mobile_lcdc_info sh_mobile_lcdc_info = {
304 .clock_source = LCDC_CLK_PERIPHERAL, /* One of interface clocks */
305 .ch[0] = {
306 .chan = LCDC_CHAN_MAINLCD,
307 .bpp = 16,
308 .interface_type = RGB24,
309 .clock_divider = 1,
310 .flags = LCDC_FLAGS_DWPOL,
311 .lcd_cfg = {
312 .name = "R63302(QHD)",
313 .xres = 544,
314 .yres = 961,
315 .left_margin = 72,
316 .right_margin = 600,
317 .hsync_len = 16,
318 .upper_margin = 8,
319 .lower_margin = 8,
320 .vsync_len = 2,
321 .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT,
322 },
323 .lcd_size_cfg = {
324 .width = 44,
325 .height = 79,
326 },
327 }
328};
329
330static struct resource lcdc_resources[] = {
331 [0] = {
332 .name = "LCDC",
333 .start = 0xfe940000, /* P4-only space */
334 .end = 0xfe943fff,
335 .flags = IORESOURCE_MEM,
336 },
337 [1] = {
338 .start = intcs_evt2irq(0x580),
339 .flags = IORESOURCE_IRQ,
340 },
341};
342
343static struct platform_device lcdc_device = {
344 .name = "sh_mobile_lcdc_fb",
345 .num_resources = ARRAY_SIZE(lcdc_resources),
346 .resource = lcdc_resources,
347 .dev = {
348 .platform_data = &sh_mobile_lcdc_info,
349 .coherent_dma_mask = ~0,
350 },
351};
352
353static struct resource mipidsi0_resources[] = {
354 [0] = {
355 .start = 0xffc60000,
356 .end = 0xffc68fff,
357 .flags = IORESOURCE_MEM,
358 },
359};
360
361static struct sh_mipi_dsi_info mipidsi0_info = {
362 .data_format = MIPI_RGB888,
363 .lcd_chan = &sh_mobile_lcdc_info.ch[0],
364};
365
366static struct platform_device mipidsi0_device = {
367 .name = "sh-mipi-dsi",
368 .num_resources = ARRAY_SIZE(mipidsi0_resources),
369 .resource = mipidsi0_resources,
370 .id = 0,
371 .dev = {
372 .platform_data = &mipidsi0_info,
373 },
374};
375
Magnus Damm2b7eda62010-02-05 11:14:58 +0000376static struct platform_device *ap4evb_devices[] __initdata = {
377 &nor_flash_device,
Kuninori Morimoto1b7e0672010-02-17 09:30:14 +0000378 &smc911x_device,
Kuninori Morimoto17ccb832010-02-23 07:07:01 +0000379 &keysc_device,
Magnus Damm3a14d032010-03-10 09:26:44 +0000380 &sdhi0_device,
Kuninori Morimotofb54d262010-04-13 06:16:32 +0000381 &usb1_host_device,
Guennadi Liakhovetski8eda2f22010-05-23 14:04:03 +0000382 &lcdc_device,
383 &mipidsi0_device,
Magnus Damm2b7eda62010-02-05 11:14:58 +0000384};
385
Kuninori Morimotodda128d2010-03-12 10:07:55 +0000386/* TouchScreen (Needs SW3 set to OFF) */
Magnus Damm33c96072010-05-20 14:41:00 +0000387#define IRQ28 evt2irq(0x3380) /* IRQ28A */
Kuninori Morimoto91cf5082010-03-11 10:42:52 +0000388struct tsc2007_platform_data tsc2007_info = {
389 .model = 2007,
390 .x_plate_ohms = 180,
391};
392
393/* I2C */
394static struct i2c_board_info i2c1_devices[] = {
395 {
Kuninori Morimoto8fc883c2010-03-11 07:34:37 +0000396 I2C_BOARD_INFO("r2025sd", 0x32),
397 },
398 {
Kuninori Morimoto91cf5082010-03-11 10:42:52 +0000399 I2C_BOARD_INFO("tsc2007", 0x48),
400 .type = "tsc2007",
401 .platform_data = &tsc2007_info,
402 .irq = IRQ28,
403 },
404};
405
Magnus Damm2b7eda62010-02-05 11:14:58 +0000406static struct map_desc ap4evb_io_desc[] __initdata = {
407 /* create a 1:1 entity map for 0xe6xxxxxx
408 * used by CPGA, INTC and PFC.
409 */
410 {
411 .virtual = 0xe6000000,
412 .pfn = __phys_to_pfn(0xe6000000),
413 .length = 256 << 20,
414 .type = MT_DEVICE_NONSHARED
415 },
416};
417
418static void __init ap4evb_map_io(void)
419{
420 iotable_init(ap4evb_io_desc, ARRAY_SIZE(ap4evb_io_desc));
421
Magnus Damm495b3ce2010-05-12 14:21:34 +0000422 /* setup early devices and console here as well */
Magnus Damm2b7eda62010-02-05 11:14:58 +0000423 sh7372_add_early_devices();
Magnus Damm4ae04ac2010-02-08 11:02:54 +0000424 shmobile_setup_console();
Magnus Damm2b7eda62010-02-05 11:14:58 +0000425}
426
Guennadi Liakhovetski8eda2f22010-05-23 14:04:03 +0000427/* This function will disappear when we switch to (runtime) PM */
428static int __init ap4evb_init_display_clk(void)
429{
430 struct clk *lcdc_clk;
431 struct clk *dsitx_clk;
432 int ret;
433
434 lcdc_clk = clk_get(&lcdc_device.dev, "sh_mobile_lcdc_fb.0");
435 if (IS_ERR(lcdc_clk))
436 return PTR_ERR(lcdc_clk);
437
438 dsitx_clk = clk_get(&mipidsi0_device.dev, "sh-mipi-dsi.0");
439 if (IS_ERR(dsitx_clk)) {
440 ret = PTR_ERR(dsitx_clk);
441 goto eclkdsitxget;
442 }
443
444 ret = clk_enable(lcdc_clk);
445 if (ret < 0)
446 goto eclklcdcon;
447
448 ret = clk_enable(dsitx_clk);
449 if (ret < 0)
450 goto eclkdsitxon;
451
452 return 0;
453
454eclkdsitxon:
455 clk_disable(lcdc_clk);
456eclklcdcon:
457 clk_put(dsitx_clk);
458eclkdsitxget:
459 clk_put(lcdc_clk);
460
461 return ret;
462}
463
464device_initcall(ap4evb_init_display_clk);
465
Magnus Damm2b7eda62010-02-05 11:14:58 +0000466static void __init ap4evb_init(void)
467{
Kuninori Morimoto1b7e0672010-02-17 09:30:14 +0000468 sh7372_pinmux_init();
469
Kuninori Morimotob228b482010-02-18 16:44:41 +0900470 /* enable SCIFA0 */
471 gpio_request(GPIO_FN_SCIFA0_TXD, NULL);
472 gpio_request(GPIO_FN_SCIFA0_RXD, NULL);
473
Kuninori Morimoto1b7e0672010-02-17 09:30:14 +0000474 /* enable SMSC911X */
475 gpio_request(GPIO_FN_CS5A, NULL);
476 gpio_request(GPIO_FN_IRQ6_39, NULL);
477
Kuninori Morimoto50982802010-02-22 09:20:39 +0000478 /* enable LED 1 - 4 */
479 gpio_request(GPIO_PORT185, NULL);
480 gpio_request(GPIO_PORT186, NULL);
481 gpio_request(GPIO_PORT187, NULL);
482 gpio_request(GPIO_PORT188, NULL);
483 gpio_direction_output(GPIO_PORT185, 1);
484 gpio_direction_output(GPIO_PORT186, 1);
485 gpio_direction_output(GPIO_PORT187, 1);
486 gpio_direction_output(GPIO_PORT188, 1);
487 gpio_export(GPIO_PORT185, 0);
488 gpio_export(GPIO_PORT186, 0);
489 gpio_export(GPIO_PORT187, 0);
490 gpio_export(GPIO_PORT188, 0);
491
Kuninori Morimoto8cb3a2e2010-02-22 09:30:12 +0000492 /* enable Debug switch (S6) */
493 gpio_request(GPIO_PORT32, NULL);
494 gpio_request(GPIO_PORT33, NULL);
495 gpio_request(GPIO_PORT34, NULL);
496 gpio_request(GPIO_PORT35, NULL);
497 gpio_direction_input(GPIO_PORT32);
498 gpio_direction_input(GPIO_PORT33);
499 gpio_direction_input(GPIO_PORT34);
500 gpio_direction_input(GPIO_PORT35);
501 gpio_export(GPIO_PORT32, 0);
502 gpio_export(GPIO_PORT33, 0);
503 gpio_export(GPIO_PORT34, 0);
504 gpio_export(GPIO_PORT35, 0);
505
Kuninori Morimoto17ccb832010-02-23 07:07:01 +0000506 /* enable KEYSC */
507 gpio_request(GPIO_FN_KEYOUT0, NULL);
508 gpio_request(GPIO_FN_KEYOUT1, NULL);
509 gpio_request(GPIO_FN_KEYOUT2, NULL);
510 gpio_request(GPIO_FN_KEYOUT3, NULL);
511 gpio_request(GPIO_FN_KEYOUT4, NULL);
512 gpio_request(GPIO_FN_KEYIN0_136, NULL);
513 gpio_request(GPIO_FN_KEYIN1_135, NULL);
514 gpio_request(GPIO_FN_KEYIN2_134, NULL);
515 gpio_request(GPIO_FN_KEYIN3_133, NULL);
516 gpio_request(GPIO_FN_KEYIN4, NULL);
517
Magnus Damm3a14d032010-03-10 09:26:44 +0000518 /* SDHI0 */
519 gpio_request(GPIO_FN_SDHICD0, NULL);
520 gpio_request(GPIO_FN_SDHIWP0, NULL);
521 gpio_request(GPIO_FN_SDHICMD0, NULL);
522 gpio_request(GPIO_FN_SDHICLK0, NULL);
523 gpio_request(GPIO_FN_SDHID0_3, NULL);
524 gpio_request(GPIO_FN_SDHID0_2, NULL);
525 gpio_request(GPIO_FN_SDHID0_1, NULL);
526 gpio_request(GPIO_FN_SDHID0_0, NULL);
527
Kuninori Morimoto91cf5082010-03-11 10:42:52 +0000528 /* enable TouchScreen */
529 gpio_request(GPIO_FN_IRQ28_123, NULL);
530 set_irq_type(IRQ28, IRQ_TYPE_LEVEL_LOW);
531
532 i2c_register_board_info(1, i2c1_devices,
533 ARRAY_SIZE(i2c1_devices));
534
Kuninori Morimotofb54d262010-04-13 06:16:32 +0000535 /* USB enable */
536 gpio_request(GPIO_FN_VBUS0_1, NULL);
537 gpio_request(GPIO_FN_IDIN_1_18, NULL);
538 gpio_request(GPIO_FN_PWEN_1_115, NULL);
539 gpio_request(GPIO_FN_OVCN_1_114, NULL);
540 gpio_request(GPIO_FN_EXTLP_1, NULL);
541 gpio_request(GPIO_FN_OVCN2_1, NULL);
542
543 /* setup USB phy */
544 __raw_writew(0x8a0a, 0xE6058130); /* USBCR2 */
545
Magnus Damm2b7eda62010-02-05 11:14:58 +0000546 sh7372_add_standard_devices();
547
548 platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices));
549}
550
Magnus Damm495b3ce2010-05-12 14:21:34 +0000551static void __init ap4evb_timer_init(void)
552{
553 sh7372_clock_init();
554 shmobile_timer.init();
555}
556
557static struct sys_timer ap4evb_timer = {
558 .init = ap4evb_timer_init,
559};
560
Magnus Damm2b7eda62010-02-05 11:14:58 +0000561MACHINE_START(AP4EVB, "ap4evb")
562 .phys_io = 0xe6000000,
563 .io_pg_offst = ((0xe6000000) >> 18) & 0xfffc,
564 .map_io = ap4evb_map_io,
565 .init_irq = sh7372_init_irq,
566 .init_machine = ap4evb_init,
Magnus Damm495b3ce2010-05-12 14:21:34 +0000567 .timer = &ap4evb_timer,
Magnus Damm2b7eda62010-02-05 11:14:58 +0000568MACHINE_END