]> git.karo-electronics.de Git - mv-sheeva.git/blob - arch/arm/mach-shmobile/board-ag5evm.c
arm: fix compile failure in mach-shmobile/board-ag5evm.c
[mv-sheeva.git] / arch / arm / mach-shmobile / board-ag5evm.c
1 /*
2  * arch/arm/mach-shmobile/board-ag5evm.c
3  *
4  * Copyright (C) 2010  Takashi Yoshii <yoshii.takashi.zj@renesas.com>
5  * Copyright (C) 2009  Yoshihiro Shimoda <shimoda.yoshihiro@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/kernel.h>
23 #include <linux/init.h>
24 #include <linux/interrupt.h>
25 #include <linux/irq.h>
26 #include <linux/platform_device.h>
27 #include <linux/delay.h>
28 #include <linux/io.h>
29 #include <linux/dma-mapping.h>
30 #include <linux/serial_sci.h>
31 #include <linux/smsc911x.h>
32 #include <linux/gpio.h>
33 #include <linux/videodev2.h>
34 #include <linux/input.h>
35 #include <linux/input/sh_keysc.h>
36 #include <linux/mmc/host.h>
37 #include <linux/mmc/sh_mmcif.h>
38 #include <linux/mmc/sh_mobile_sdhi.h>
39 #include <linux/mfd/tmio.h>
40 #include <linux/sh_clk.h>
41 #include <linux/dma-mapping.h>
42 #include <video/sh_mobile_lcdc.h>
43 #include <video/sh_mipi_dsi.h>
44 #include <sound/sh_fsi.h>
45 #include <mach/hardware.h>
46 #include <mach/sh73a0.h>
47 #include <mach/common.h>
48 #include <asm/mach-types.h>
49 #include <asm/mach/arch.h>
50 #include <asm/mach/map.h>
51 #include <asm/mach/time.h>
52 #include <asm/hardware/gic.h>
53 #include <asm/hardware/cache-l2x0.h>
54 #include <asm/traps.h>
55
56 static struct resource smsc9220_resources[] = {
57         [0] = {
58                 .start          = 0x14000000,
59                 .end            = 0x14000000 + SZ_64K - 1,
60                 .flags          = IORESOURCE_MEM,
61         },
62         [1] = {
63                 .start          = SH73A0_PINT0_IRQ(2), /* PINTA2 */
64                 .flags          = IORESOURCE_IRQ,
65         },
66 };
67
68 static struct smsc911x_platform_config smsc9220_platdata = {
69         .flags          = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
70         .phy_interface  = PHY_INTERFACE_MODE_MII,
71         .irq_polarity   = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
72         .irq_type       = SMSC911X_IRQ_TYPE_PUSH_PULL,
73 };
74
75 static struct platform_device eth_device = {
76         .name           = "smsc911x",
77         .id             = 0,
78         .dev  = {
79                 .platform_data = &smsc9220_platdata,
80         },
81         .resource       = smsc9220_resources,
82         .num_resources  = ARRAY_SIZE(smsc9220_resources),
83 };
84
85 static struct sh_keysc_info keysc_platdata = {
86         .mode           = SH_KEYSC_MODE_6,
87         .scan_timing    = 3,
88         .delay          = 100,
89         .keycodes       = {
90                 KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, KEY_F, KEY_G,
91                 KEY_H, KEY_I, KEY_J, KEY_K, KEY_L, KEY_M, KEY_N,
92                 KEY_O, KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T, KEY_U,
93                 KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z, KEY_HOME, KEY_SLEEP,
94                 KEY_SPACE, KEY_9, KEY_6, KEY_3, KEY_WAKEUP, KEY_RIGHT, \
95                 KEY_COFFEE,
96                 KEY_0, KEY_8, KEY_5, KEY_2, KEY_DOWN, KEY_ENTER, KEY_UP,
97                 KEY_KPASTERISK, KEY_7, KEY_4, KEY_1, KEY_STOP, KEY_LEFT, \
98                 KEY_COMPUTER,
99         },
100 };
101
102 static struct resource keysc_resources[] = {
103         [0] = {
104                 .name   = "KEYSC",
105                 .start  = 0xe61b0000,
106                 .end    = 0xe61b0098 - 1,
107                 .flags  = IORESOURCE_MEM,
108         },
109         [1] = {
110                 .start  = gic_spi(71),
111                 .flags  = IORESOURCE_IRQ,
112         },
113 };
114
115 static struct platform_device keysc_device = {
116         .name           = "sh_keysc",
117         .id             = 0,
118         .num_resources  = ARRAY_SIZE(keysc_resources),
119         .resource       = keysc_resources,
120         .dev            = {
121                 .platform_data  = &keysc_platdata,
122         },
123 };
124
125 /* FSI A */
126 static struct resource fsi_resources[] = {
127         [0] = {
128                 .name   = "FSI",
129                 .start  = 0xEC230000,
130                 .end    = 0xEC230400 - 1,
131                 .flags  = IORESOURCE_MEM,
132         },
133         [1] = {
134                 .start  = gic_spi(146),
135                 .flags  = IORESOURCE_IRQ,
136         },
137 };
138
139 static struct platform_device fsi_device = {
140         .name           = "sh_fsi2",
141         .id             = -1,
142         .num_resources  = ARRAY_SIZE(fsi_resources),
143         .resource       = fsi_resources,
144 };
145
146 static struct resource sh_mmcif_resources[] = {
147         [0] = {
148                 .name   = "MMCIF",
149                 .start  = 0xe6bd0000,
150                 .end    = 0xe6bd00ff,
151                 .flags  = IORESOURCE_MEM,
152         },
153         [1] = {
154                 .start  = gic_spi(141),
155                 .flags  = IORESOURCE_IRQ,
156         },
157         [2] = {
158                 .start  = gic_spi(140),
159                 .flags  = IORESOURCE_IRQ,
160         },
161 };
162
163 static struct sh_mmcif_dma sh_mmcif_dma = {
164         .chan_priv_rx   = {
165                 .slave_id       = SHDMA_SLAVE_MMCIF_RX,
166         },
167         .chan_priv_tx   = {
168                 .slave_id       = SHDMA_SLAVE_MMCIF_TX,
169         },
170 };
171 static struct sh_mmcif_plat_data sh_mmcif_platdata = {
172         .sup_pclk       = 0,
173         .ocr            = MMC_VDD_165_195,
174         .caps           = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
175         .dma            = &sh_mmcif_dma,
176 };
177
178 static struct platform_device mmc_device = {
179         .name           = "sh_mmcif",
180         .id             = 0,
181         .dev            = {
182                 .dma_mask               = NULL,
183                 .coherent_dma_mask      = 0xffffffff,
184                 .platform_data          = &sh_mmcif_platdata,
185         },
186         .num_resources  = ARRAY_SIZE(sh_mmcif_resources),
187         .resource       = sh_mmcif_resources,
188 };
189
190 /* IrDA */
191 static struct resource irda_resources[] = {
192         [0] = {
193                 .start  = 0xE6D00000,
194                 .end    = 0xE6D01FD4 - 1,
195                 .flags  = IORESOURCE_MEM,
196         },
197         [1] = {
198                 .start  = gic_spi(95),
199                 .flags  = IORESOURCE_IRQ,
200         },
201 };
202
203 static struct platform_device irda_device = {
204         .name           = "sh_irda",
205         .id             = 0,
206         .resource       = irda_resources,
207         .num_resources  = ARRAY_SIZE(irda_resources),
208 };
209
210 static unsigned char lcd_backlight_seq[3][2] = {
211         { 0x04, 0x07 },
212         { 0x23, 0x80 },
213         { 0x03, 0x01 },
214 };
215
216 static void lcd_backlight_on(void)
217 {
218         struct i2c_adapter *a;
219         struct i2c_msg msg;
220         int k;
221
222         a = i2c_get_adapter(1);
223         for (k = 0; a && k < 3; k++) {
224                 msg.addr = 0x6d;
225                 msg.buf = &lcd_backlight_seq[k][0];
226                 msg.len = 2;
227                 msg.flags = 0;
228                 if (i2c_transfer(a, &msg, 1) != 1)
229                         break;
230         }
231 }
232
233 static void lcd_backlight_reset(void)
234 {
235         gpio_set_value(GPIO_PORT235, 0);
236         mdelay(24);
237         gpio_set_value(GPIO_PORT235, 1);
238 }
239
240 static void lcd_on(void *board_data, struct fb_info *info)
241 {
242         lcd_backlight_on();
243 }
244
245 static void lcd_off(void *board_data)
246 {
247         lcd_backlight_reset();
248 }
249
250 /* LCDC0 */
251 static const struct fb_videomode lcdc0_modes[] = {
252         {
253                 .name           = "R63302(QHD)",
254                 .xres           = 544,
255                 .yres           = 961,
256                 .left_margin    = 72,
257                 .right_margin   = 600,
258                 .hsync_len      = 16,
259                 .upper_margin   = 8,
260                 .lower_margin   = 8,
261                 .vsync_len      = 2,
262                 .sync           = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT,
263         },
264 };
265
266 static struct sh_mobile_lcdc_info lcdc0_info = {
267         .clock_source = LCDC_CLK_PERIPHERAL,
268         .ch[0] = {
269                 .chan = LCDC_CHAN_MAINLCD,
270                 .interface_type = RGB24,
271                 .clock_divider = 1,
272                 .flags = LCDC_FLAGS_DWPOL,
273                 .lcd_size_cfg.width = 44,
274                 .lcd_size_cfg.height = 79,
275                 .bpp = 16,
276                 .lcd_cfg = lcdc0_modes,
277                 .num_cfg = ARRAY_SIZE(lcdc0_modes),
278                 .board_cfg = {
279                         .display_on = lcd_on,
280                         .display_off = lcd_off,
281                 },
282         }
283 };
284
285 static struct resource lcdc0_resources[] = {
286         [0] = {
287                 .name   = "LCDC0",
288                 .start  = 0xfe940000, /* P4-only space */
289                 .end    = 0xfe943fff,
290                 .flags  = IORESOURCE_MEM,
291         },
292         [1] = {
293                 .start  = intcs_evt2irq(0x580),
294                 .flags  = IORESOURCE_IRQ,
295         },
296 };
297
298 static struct platform_device lcdc0_device = {
299         .name           = "sh_mobile_lcdc_fb",
300         .num_resources  = ARRAY_SIZE(lcdc0_resources),
301         .resource       = lcdc0_resources,
302         .id             = 0,
303         .dev    = {
304                 .platform_data  = &lcdc0_info,
305                 .coherent_dma_mask = ~0,
306         },
307 };
308
309 /* MIPI-DSI */
310 static struct resource mipidsi0_resources[] = {
311         [0] = {
312                 .name   = "DSI0",
313                 .start  = 0xfeab0000,
314                 .end    = 0xfeab3fff,
315                 .flags  = IORESOURCE_MEM,
316         },
317         [1] = {
318                 .name   = "DSI0",
319                 .start  = 0xfeab4000,
320                 .end    = 0xfeab7fff,
321                 .flags  = IORESOURCE_MEM,
322         },
323 };
324
325 static struct sh_mipi_dsi_info mipidsi0_info = {
326         .data_format    = MIPI_RGB888,
327         .lcd_chan       = &lcdc0_info.ch[0],
328         .vsynw_offset   = 20,
329         .clksrc         = 1,
330         .flags          = SH_MIPI_DSI_HSABM,
331 };
332
333 static struct platform_device mipidsi0_device = {
334         .name           = "sh-mipi-dsi",
335         .num_resources  = ARRAY_SIZE(mipidsi0_resources),
336         .resource       = mipidsi0_resources,
337         .id             = 0,
338         .dev    = {
339                 .platform_data  = &mipidsi0_info,
340         },
341 };
342
343 /* SDHI0 */
344 static irqreturn_t ag5evm_sdhi0_gpio_cd(int irq, void *arg)
345 {
346         struct device *dev = arg;
347         struct sh_mobile_sdhi_info *info = dev->platform_data;
348         struct tmio_mmc_data *pdata = info->pdata;
349
350         tmio_mmc_cd_wakeup(pdata);
351
352         return IRQ_HANDLED;
353 }
354
355 static struct sh_mobile_sdhi_info sdhi0_info = {
356         .dma_slave_tx   = SHDMA_SLAVE_SDHI0_TX,
357         .dma_slave_rx   = SHDMA_SLAVE_SDHI0_RX,
358         .tmio_flags     = TMIO_MMC_HAS_IDLE_WAIT,
359         .tmio_caps      = MMC_CAP_SD_HIGHSPEED,
360         .tmio_ocr_mask  = MMC_VDD_27_28 | MMC_VDD_28_29,
361 };
362
363 static struct resource sdhi0_resources[] = {
364         [0] = {
365                 .name   = "SDHI0",
366                 .start  = 0xee100000,
367                 .end    = 0xee1000ff,
368                 .flags  = IORESOURCE_MEM,
369         },
370         [1] = {
371                 .name   = SH_MOBILE_SDHI_IRQ_CARD_DETECT,
372                 .start  = gic_spi(83),
373                 .flags  = IORESOURCE_IRQ,
374         },
375         [2] = {
376                 .name   = SH_MOBILE_SDHI_IRQ_SDCARD,
377                 .start  = gic_spi(84),
378                 .flags  = IORESOURCE_IRQ,
379         },
380         [3] = {
381                 .name   = SH_MOBILE_SDHI_IRQ_SDIO,
382                 .start  = gic_spi(85),
383                 .flags  = IORESOURCE_IRQ,
384         },
385 };
386
387 static struct platform_device sdhi0_device = {
388         .name           = "sh_mobile_sdhi",
389         .id             = 0,
390         .num_resources  = ARRAY_SIZE(sdhi0_resources),
391         .resource       = sdhi0_resources,
392         .dev    = {
393                 .platform_data  = &sdhi0_info,
394         },
395 };
396
397 void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state)
398 {
399         gpio_set_value(GPIO_PORT114, state);
400 }
401
402 static struct sh_mobile_sdhi_info sh_sdhi1_info = {
403         .tmio_flags     = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT,
404         .tmio_caps      = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ,
405         .tmio_ocr_mask  = MMC_VDD_32_33 | MMC_VDD_33_34,
406         .set_pwr        = ag5evm_sdhi1_set_pwr,
407 };
408
409 static struct resource sdhi1_resources[] = {
410         [0] = {
411                 .name   = "SDHI1",
412                 .start  = 0xee120000,
413                 .end    = 0xee1200ff,
414                 .flags  = IORESOURCE_MEM,
415         },
416         [1] = {
417                 .name   = SH_MOBILE_SDHI_IRQ_CARD_DETECT,
418                 .start  = gic_spi(87),
419                 .flags  = IORESOURCE_IRQ,
420         },
421         [2] = {
422                 .name   = SH_MOBILE_SDHI_IRQ_SDCARD,
423                 .start  = gic_spi(88),
424                 .flags  = IORESOURCE_IRQ,
425         },
426         [3] = {
427                 .name   = SH_MOBILE_SDHI_IRQ_SDIO,
428                 .start  = gic_spi(89),
429                 .flags  = IORESOURCE_IRQ,
430         },
431 };
432
433 static struct platform_device sdhi1_device = {
434         .name           = "sh_mobile_sdhi",
435         .id             = 1,
436         .dev            = {
437                 .platform_data  = &sh_sdhi1_info,
438         },
439         .num_resources  = ARRAY_SIZE(sdhi1_resources),
440         .resource       = sdhi1_resources,
441 };
442
443 static struct platform_device *ag5evm_devices[] __initdata = {
444         &eth_device,
445         &keysc_device,
446         &fsi_device,
447         &mmc_device,
448         &irda_device,
449         &lcdc0_device,
450         &mipidsi0_device,
451         &sdhi0_device,
452         &sdhi1_device,
453 };
454
455 static struct map_desc ag5evm_io_desc[] __initdata = {
456         /* create a 1:1 entity map for 0xe6xxxxxx
457          * used by CPGA, INTC and PFC.
458          */
459         {
460                 .virtual        = 0xe6000000,
461                 .pfn            = __phys_to_pfn(0xe6000000),
462                 .length         = 256 << 20,
463                 .type           = MT_DEVICE_NONSHARED
464         },
465 };
466
467 static void __init ag5evm_map_io(void)
468 {
469         iotable_init(ag5evm_io_desc, ARRAY_SIZE(ag5evm_io_desc));
470
471         /* setup early devices and console here as well */
472         sh73a0_add_early_devices();
473         shmobile_setup_console();
474 }
475
476 #define DSI0PHYCR       0xe615006c
477
478 static void __init ag5evm_init(void)
479 {
480         sh73a0_pinmux_init();
481
482         /* enable SCIFA2 */
483         gpio_request(GPIO_FN_SCIFA2_TXD1, NULL);
484         gpio_request(GPIO_FN_SCIFA2_RXD1, NULL);
485         gpio_request(GPIO_FN_SCIFA2_RTS1_, NULL);
486         gpio_request(GPIO_FN_SCIFA2_CTS1_, NULL);
487
488         /* enable KEYSC */
489         gpio_request(GPIO_FN_KEYIN0_PU, NULL);
490         gpio_request(GPIO_FN_KEYIN1_PU, NULL);
491         gpio_request(GPIO_FN_KEYIN2_PU, NULL);
492         gpio_request(GPIO_FN_KEYIN3_PU, NULL);
493         gpio_request(GPIO_FN_KEYIN4_PU, NULL);
494         gpio_request(GPIO_FN_KEYIN5_PU, NULL);
495         gpio_request(GPIO_FN_KEYIN6_PU, NULL);
496         gpio_request(GPIO_FN_KEYIN7_PU, NULL);
497         gpio_request(GPIO_FN_KEYOUT0, NULL);
498         gpio_request(GPIO_FN_KEYOUT1, NULL);
499         gpio_request(GPIO_FN_KEYOUT2, NULL);
500         gpio_request(GPIO_FN_KEYOUT3, NULL);
501         gpio_request(GPIO_FN_KEYOUT4, NULL);
502         gpio_request(GPIO_FN_KEYOUT5, NULL);
503         gpio_request(GPIO_FN_PORT59_KEYOUT6, NULL);
504         gpio_request(GPIO_FN_PORT58_KEYOUT7, NULL);
505         gpio_request(GPIO_FN_KEYOUT8, NULL);
506         gpio_request(GPIO_FN_PORT149_KEYOUT9, NULL);
507
508         /* enable I2C channel 2 and 3 */
509         gpio_request(GPIO_FN_PORT236_I2C_SDA2, NULL);
510         gpio_request(GPIO_FN_PORT237_I2C_SCL2, NULL);
511         gpio_request(GPIO_FN_PORT248_I2C_SCL3, NULL);
512         gpio_request(GPIO_FN_PORT249_I2C_SDA3, NULL);
513
514         /* enable MMCIF */
515         gpio_request(GPIO_FN_MMCCLK0, NULL);
516         gpio_request(GPIO_FN_MMCCMD0_PU, NULL);
517         gpio_request(GPIO_FN_MMCD0_0_PU, NULL);
518         gpio_request(GPIO_FN_MMCD0_1_PU, NULL);
519         gpio_request(GPIO_FN_MMCD0_2_PU, NULL);
520         gpio_request(GPIO_FN_MMCD0_3_PU, NULL);
521         gpio_request(GPIO_FN_MMCD0_4_PU, NULL);
522         gpio_request(GPIO_FN_MMCD0_5_PU, NULL);
523         gpio_request(GPIO_FN_MMCD0_6_PU, NULL);
524         gpio_request(GPIO_FN_MMCD0_7_PU, NULL);
525         gpio_request(GPIO_PORT208, NULL); /* Reset */
526         gpio_direction_output(GPIO_PORT208, 1);
527
528         /* enable SMSC911X */
529         gpio_request(GPIO_PORT144, NULL); /* PINTA2 */
530         gpio_direction_input(GPIO_PORT144);
531         gpio_request(GPIO_PORT145, NULL); /* RESET */
532         gpio_direction_output(GPIO_PORT145, 1);
533
534         /* FSI A */
535         gpio_request(GPIO_FN_FSIACK, NULL);
536         gpio_request(GPIO_FN_FSIAILR, NULL);
537         gpio_request(GPIO_FN_FSIAIBT, NULL);
538         gpio_request(GPIO_FN_FSIAISLD, NULL);
539         gpio_request(GPIO_FN_FSIAOSLD, NULL);
540
541         /* IrDA */
542         gpio_request(GPIO_FN_PORT241_IRDA_OUT, NULL);
543         gpio_request(GPIO_FN_PORT242_IRDA_IN,  NULL);
544         gpio_request(GPIO_FN_PORT243_IRDA_FIRSEL, NULL);
545
546         /* LCD panel */
547         gpio_request(GPIO_PORT217, NULL); /* RESET */
548         gpio_direction_output(GPIO_PORT217, 0);
549         mdelay(1);
550         gpio_set_value(GPIO_PORT217, 1);
551         mdelay(100);
552
553         /* LCD backlight controller */
554         gpio_request(GPIO_PORT235, NULL); /* RESET */
555         gpio_direction_output(GPIO_PORT235, 0);
556         lcd_backlight_reset();
557
558         /* MIPI-DSI clock setup */
559         __raw_writel(0x2a809010, DSI0PHYCR);
560
561         /* enable SDHI0 on CN15 [SD I/F] */
562         gpio_request(GPIO_FN_SDHICD0, NULL);
563         gpio_request(GPIO_FN_SDHIWP0, NULL);
564         gpio_request(GPIO_FN_SDHICMD0, NULL);
565         gpio_request(GPIO_FN_SDHICLK0, NULL);
566         gpio_request(GPIO_FN_SDHID0_3, NULL);
567         gpio_request(GPIO_FN_SDHID0_2, NULL);
568         gpio_request(GPIO_FN_SDHID0_1, NULL);
569         gpio_request(GPIO_FN_SDHID0_0, NULL);
570
571         if (!request_irq(intcs_evt2irq(0x3c0), ag5evm_sdhi0_gpio_cd,
572                          IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
573                          "sdhi0 cd", &sdhi0_device.dev))
574                 sdhi0_info.tmio_flags |= TMIO_MMC_HAS_COLD_CD;
575         else
576                 pr_warn("Unable to setup SDHI0 GPIO IRQ\n");
577
578         /* enable SDHI1 on CN4 [WLAN I/F] */
579         gpio_request(GPIO_FN_SDHICLK1, NULL);
580         gpio_request(GPIO_FN_SDHICMD1_PU, NULL);
581         gpio_request(GPIO_FN_SDHID1_3_PU, NULL);
582         gpio_request(GPIO_FN_SDHID1_2_PU, NULL);
583         gpio_request(GPIO_FN_SDHID1_1_PU, NULL);
584         gpio_request(GPIO_FN_SDHID1_0_PU, NULL);
585         gpio_request(GPIO_PORT114, "sdhi1_power");
586         gpio_direction_output(GPIO_PORT114, 0);
587
588 #ifdef CONFIG_CACHE_L2X0
589         /* Shared attribute override enable, 64K*8way */
590         l2x0_init(__io(0xf0100000), 0x00460000, 0xc2000fff);
591 #endif
592         sh73a0_add_standard_devices();
593         platform_add_devices(ag5evm_devices, ARRAY_SIZE(ag5evm_devices));
594 }
595
596 static void __init ag5evm_timer_init(void)
597 {
598         sh73a0_clock_init();
599         shmobile_timer.init();
600         return;
601 }
602
603 struct sys_timer ag5evm_timer = {
604         .init   = ag5evm_timer_init,
605 };
606
607 MACHINE_START(AG5EVM, "ag5evm")
608         .map_io         = ag5evm_map_io,
609         .nr_irqs        = NR_IRQS_LEGACY,
610         .init_irq       = sh73a0_init_irq,
611         .handle_irq     = gic_handle_irq,
612         .init_machine   = ag5evm_init,
613         .timer          = &ag5evm_timer,
614 MACHINE_END