blob: 3e30a5250414bc3fea77664d21354d7999ebbd53 [file] [log] [blame]
Kuninori Morimoto920adc72010-11-29 02:21:21 +00001/*
2 * mackerel board support
3 *
4 * Copyright (C) 2010 Renesas Solutions Corp.
5 * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
6 *
7 * based on ap4evb
8 * Copyright (C) 2010 Magnus Damm
9 * Copyright (C) 2008 Yoshihiro Shimoda
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; version 2 of the License.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 */
24#include <linux/kernel.h>
25#include <linux/init.h>
26#include <linux/interrupt.h>
27#include <linux/irq.h>
28#include <linux/platform_device.h>
29#include <linux/gpio.h>
30#include <linux/input.h>
31#include <linux/io.h>
Kuninori Morimoto1a44d722010-12-01 00:31:46 +000032#include <linux/i2c.h>
Kuninori Morimotod44deb32010-11-30 06:52:18 +000033#include <linux/leds.h>
Kuninori Morimoto920adc72010-11-29 02:21:21 +000034#include <linux/mtd/mtd.h>
35#include <linux/mtd/partitions.h>
36#include <linux/mtd/physmap.h>
Kuninori Morimoto2264c152010-11-29 02:21:37 +000037#include <linux/smsc911x.h>
Kuninori Morimoto1a44d722010-12-01 00:31:46 +000038#include <linux/sh_intc.h>
Tony SIMcd8ab002010-12-09 01:55:55 +000039#include <linux/tca6416_keypad.h>
Kuninori Morimoto25338f22010-11-30 04:37:33 +000040#include <linux/usb/r8a66597.h>
Kuninori Morimoto920adc72010-11-29 02:21:21 +000041
Kuninori Morimoto11fee462010-11-29 02:21:43 +000042#include <video/sh_mobile_lcdc.h>
43
Kuninori Morimoto1a44d722010-12-01 00:31:46 +000044#include <sound/sh_fsi.h>
45
Kuninori Morimoto920adc72010-11-29 02:21:21 +000046#include <mach/common.h>
47#include <mach/sh7372.h>
48
49#include <asm/mach/arch.h>
50#include <asm/mach/time.h>
51#include <asm/mach/map.h>
52#include <asm/mach-types.h>
53
54/*
55 * Address Interface BusWidth note
56 * ------------------------------------------------------------------
57 * 0x0000_0000 NOR Flash ROM (MCP) 16bit SW7 : bit1 = ON
58 * 0x0800_0000 user area -
59 * 0x1000_0000 NOR Flash ROM (MCP) 16bit SW7 : bit1 = OFF
60 * 0x1400_0000 Ether (LAN9220) 16bit
61 * 0x1600_0000 user area - cannot use with NAND
62 * 0x1800_0000 user area -
63 * 0x1A00_0000 -
64 * 0x4000_0000 LPDDR2-SDRAM (POP) 32bit
65 */
66
Kuninori Morimoto4b82b682010-11-29 02:21:48 +000067/*
68 * CPU mode
69 *
70 * SW4 | Boot Area| Master | Remarks
71 * 1 | 2 | 3 | 4 | 5 | 6 | 8 | | Processor|
72 * ----+-----+-----+-----+-----+-----+-----+----------+----------+--------------
73 * ON | ON | OFF | ON | ON | OFF | OFF | External | System | External ROM
74 * ON | ON | ON | ON | ON | OFF | OFF | External | System | ROM Debug
75 * ON | ON | X | ON | OFF | OFF | OFF | Built-in | System | ROM Debug
76 * X | OFF | X | X | X | X | OFF | Built-in | System | MaskROM
77 * OFF | X | X | X | X | X | OFF | Built-in | System | MaskROM
78 * X | X | X | OFF | X | X | OFF | Built-in | System | MaskROM
79 * OFF | ON | OFF | X | X | OFF | ON | External | System | Standalone
80 * ON | OFF | OFF | X | X | OFF | ON | External | Realtime | Standalone
81*/
82
83/*
84 * NOR Flash ROM
85 *
86 * SW1 | SW2 | SW7 | NOR Flash ROM
87 * bit1 | bit1 bit2 | bit1 | Memory allocation
88 * ------+------------+------+------------------
89 * OFF | ON OFF | ON | Area 0
90 * OFF | ON OFF | OFF | Area 4
91 */
92
93/*
94 * SMSC 9220
95 *
96 * SW1 SMSC 9220
97 * -----------------------
98 * ON access disable
99 * OFF access enable
100 */
101
102/*
103 * NAND Flash ROM
104 *
105 * SW1 | SW2 | SW7 | NAND Flash ROM
106 * bit1 | bit1 bit2 | bit2 | Memory allocation
107 * ------+------------+------+------------------
108 * OFF | ON OFF | ON | FCE 0
109 * OFF | ON OFF | OFF | FCE 1
110 */
111
112/*
113 * External interrupt pin settings
114 *
115 * IRQX | pin setting | device | level
116 * ------+--------------------+--------------------+-------
117 * IRQ0 | ICR1A.IRQ0SA=0010 | SDHI2 card detect | Low
118 * IRQ6 | ICR1A.IRQ6SA=0011 | Ether(LAN9220) | High
119 * IRQ7 | ICR1A.IRQ7SA=0010 | LCD Tuch Panel | Low
120 * IRQ8 | ICR2A.IRQ8SA=0010 | MMC/SD card detect | Low
121 * IRQ9 | ICR2A.IRQ9SA=0010 | KEY(TCA6408) | Low
122 * IRQ21 | ICR4A.IRQ21SA=0011 | Sensor(ADXL345) | High
123 * IRQ22 | ICR4A.IRQ22SA=0011 | Sensor(AK8975) | High
Kuninori Morimoto25338f22010-11-30 04:37:33 +0000124 */
Kuninori Morimoto4b82b682010-11-29 02:21:48 +0000125
Kuninori Morimoto25338f22010-11-30 04:37:33 +0000126/*
127 * USB
128 *
129 * USB0 : CN22 : Function
130 * USB1 : CN31 : Function/Host *1
131 *
132 * J30 (for CN31) *1
133 * ----------+---------------+-------------
134 * 1-2 short | VBUS 5V | Host
135 * open | external VBUS | Function
136 *
137 * *1
138 * CN31 is used as Host in Linux.
139 */
Kuninori Morimoto4b82b682010-11-29 02:21:48 +0000140
Kuninori Morimoto1a44d722010-12-01 00:31:46 +0000141/*
142 * FIXME !!
143 *
144 * gpio_no_direction
145 * are quick_hack.
146 *
147 * current gpio frame work doesn't have
148 * the method to control only pull up/down/free.
149 * this function should be replaced by correct gpio function
150 */
151static void __init gpio_no_direction(u32 addr)
152{
153 __raw_writeb(0x00, addr);
154}
155
Kuninori Morimoto920adc72010-11-29 02:21:21 +0000156/* MTD */
157static struct mtd_partition nor_flash_partitions[] = {
158 {
159 .name = "loader",
160 .offset = 0x00000000,
161 .size = 512 * 1024,
162 .mask_flags = MTD_WRITEABLE,
163 },
164 {
165 .name = "bootenv",
166 .offset = MTDPART_OFS_APPEND,
167 .size = 512 * 1024,
168 .mask_flags = MTD_WRITEABLE,
169 },
170 {
171 .name = "kernel_ro",
172 .offset = MTDPART_OFS_APPEND,
173 .size = 8 * 1024 * 1024,
174 .mask_flags = MTD_WRITEABLE,
175 },
176 {
177 .name = "kernel",
178 .offset = MTDPART_OFS_APPEND,
179 .size = 8 * 1024 * 1024,
180 },
181 {
182 .name = "data",
183 .offset = MTDPART_OFS_APPEND,
184 .size = MTDPART_SIZ_FULL,
185 },
186};
187
188static struct physmap_flash_data nor_flash_data = {
189 .width = 2,
190 .parts = nor_flash_partitions,
191 .nr_parts = ARRAY_SIZE(nor_flash_partitions),
192};
193
194static struct resource nor_flash_resources[] = {
195 [0] = {
196 .start = 0x00000000,
197 .end = 0x08000000 - 1,
198 .flags = IORESOURCE_MEM,
199 }
200};
201
202static struct platform_device nor_flash_device = {
203 .name = "physmap-flash",
204 .dev = {
205 .platform_data = &nor_flash_data,
206 },
207 .num_resources = ARRAY_SIZE(nor_flash_resources),
208 .resource = nor_flash_resources,
209};
210
Kuninori Morimoto2264c152010-11-29 02:21:37 +0000211/* SMSC */
212static struct resource smc911x_resources[] = {
213 {
214 .start = 0x14000000,
215 .end = 0x16000000 - 1,
216 .flags = IORESOURCE_MEM,
217 }, {
218 .start = evt2irq(0x02c0) /* IRQ6A */,
219 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
220 },
221};
222
223static struct smsc911x_platform_config smsc911x_info = {
224 .flags = SMSC911X_USE_16BIT | SMSC911X_SAVE_MAC_ADDRESS,
225 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
226 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
227};
228
229static struct platform_device smc911x_device = {
230 .name = "smsc911x",
231 .id = -1,
232 .num_resources = ARRAY_SIZE(smc911x_resources),
233 .resource = smc911x_resources,
234 .dev = {
235 .platform_data = &smsc911x_info,
236 },
237};
238
Kuninori Morimoto11fee462010-11-29 02:21:43 +0000239/* LCDC */
240static struct fb_videomode mackerel_lcdc_modes[] = {
241 {
242 .name = "WVGA Panel",
243 .xres = 800,
244 .yres = 480,
245 .left_margin = 220,
246 .right_margin = 110,
247 .hsync_len = 70,
248 .upper_margin = 20,
249 .lower_margin = 5,
250 .vsync_len = 5,
251 .sync = 0,
252 },
253};
254
255static struct sh_mobile_lcdc_info lcdc_info = {
256 .clock_source = LCDC_CLK_BUS,
257 .ch[0] = {
258 .chan = LCDC_CHAN_MAINLCD,
259 .bpp = 16,
260 .lcd_cfg = mackerel_lcdc_modes,
261 .num_cfg = ARRAY_SIZE(mackerel_lcdc_modes),
262 .interface_type = RGB24,
263 .clock_divider = 2,
264 .flags = 0,
265 .lcd_size_cfg.width = 152,
266 .lcd_size_cfg.height = 91,
267 }
268};
269
270static struct resource lcdc_resources[] = {
271 [0] = {
272 .name = "LCDC",
273 .start = 0xfe940000,
274 .end = 0xfe943fff,
275 .flags = IORESOURCE_MEM,
276 },
277 [1] = {
278 .start = intcs_evt2irq(0x580),
279 .flags = IORESOURCE_IRQ,
280 },
281};
282
283static struct platform_device lcdc_device = {
284 .name = "sh_mobile_lcdc_fb",
285 .num_resources = ARRAY_SIZE(lcdc_resources),
286 .resource = lcdc_resources,
287 .dev = {
288 .platform_data = &lcdc_info,
289 .coherent_dma_mask = ~0,
290 },
291};
292
Kuninori Morimoto25338f22010-11-30 04:37:33 +0000293/* USB1 (Host) */
294static void usb1_host_port_power(int port, int power)
295{
296 if (!power) /* only power-on is supported for now */
297 return;
298
299 /* set VBOUT/PWEN and EXTLP1 in DVSTCTR */
300 __raw_writew(__raw_readw(0xE68B0008) | 0x600, 0xE68B0008);
301}
302
303static struct r8a66597_platdata usb1_host_data = {
304 .on_chip = 1,
305 .port_power = usb1_host_port_power,
306};
307
308static struct resource usb1_host_resources[] = {
309 [0] = {
310 .name = "USBHS",
311 .start = 0xE68B0000,
312 .end = 0xE68B00E6 - 1,
313 .flags = IORESOURCE_MEM,
314 },
315 [1] = {
316 .start = evt2irq(0x1ce0) /* USB1_USB1I0 */,
317 .flags = IORESOURCE_IRQ,
318 },
319};
320
321static struct platform_device usb1_host_device = {
322 .name = "r8a66597_hcd",
323 .id = 1,
324 .dev = {
325 .dma_mask = NULL, /* not use dma */
326 .coherent_dma_mask = 0xffffffff,
327 .platform_data = &usb1_host_data,
328 },
329 .num_resources = ARRAY_SIZE(usb1_host_resources),
330 .resource = usb1_host_resources,
331};
332
Kuninori Morimotod44deb32010-11-30 06:52:18 +0000333/* LED */
334static struct gpio_led mackerel_leds[] = {
335 {
336 .name = "led0",
337 .gpio = GPIO_PORT0,
338 .default_state = LEDS_GPIO_DEFSTATE_ON,
339 },
340 {
341 .name = "led1",
342 .gpio = GPIO_PORT1,
343 .default_state = LEDS_GPIO_DEFSTATE_ON,
344 },
345 {
346 .name = "led2",
347 .gpio = GPIO_PORT2,
348 .default_state = LEDS_GPIO_DEFSTATE_ON,
349 },
350 {
351 .name = "led3",
352 .gpio = GPIO_PORT159,
353 .default_state = LEDS_GPIO_DEFSTATE_ON,
354 }
355};
356
357static struct gpio_led_platform_data mackerel_leds_pdata = {
358 .leds = mackerel_leds,
359 .num_leds = ARRAY_SIZE(mackerel_leds),
360};
361
362static struct platform_device leds_device = {
363 .name = "leds-gpio",
364 .id = 0,
365 .dev = {
366 .platform_data = &mackerel_leds_pdata,
367 },
368};
369
Kuninori Morimoto1a44d722010-12-01 00:31:46 +0000370/* FSI */
371#define IRQ_FSI evt2irq(0x1840)
372static struct sh_fsi_platform_info fsi_info = {
373 .porta_flags = SH_FSI_BRS_INV |
374 SH_FSI_OUT_SLAVE_MODE |
375 SH_FSI_IN_SLAVE_MODE |
376 SH_FSI_OFMT(PCM) |
377 SH_FSI_IFMT(PCM),
378};
379
380static struct resource fsi_resources[] = {
381 [0] = {
382 .name = "FSI",
383 .start = 0xFE3C0000,
384 .end = 0xFE3C0400 - 1,
385 .flags = IORESOURCE_MEM,
386 },
387 [1] = {
388 .start = IRQ_FSI,
389 .flags = IORESOURCE_IRQ,
390 },
391};
392
393static struct platform_device fsi_device = {
394 .name = "sh_fsi2",
395 .id = -1,
396 .num_resources = ARRAY_SIZE(fsi_resources),
397 .resource = fsi_resources,
398 .dev = {
399 .platform_data = &fsi_info,
400 },
401};
402
403static struct platform_device fsi_ak4643_device = {
404 .name = "sh_fsi2_a_ak4643",
405};
Kuninori Morimotod44deb32010-11-30 06:52:18 +0000406
Kuninori Morimoto920adc72010-11-29 02:21:21 +0000407static struct platform_device *mackerel_devices[] __initdata = {
408 &nor_flash_device,
Kuninori Morimoto2264c152010-11-29 02:21:37 +0000409 &smc911x_device,
Kuninori Morimoto11fee462010-11-29 02:21:43 +0000410 &lcdc_device,
Kuninori Morimoto25338f22010-11-30 04:37:33 +0000411 &usb1_host_device,
Kuninori Morimotod44deb32010-11-30 06:52:18 +0000412 &leds_device,
Kuninori Morimoto1a44d722010-12-01 00:31:46 +0000413 &fsi_device,
414 &fsi_ak4643_device,
415};
416
Tony SIMcd8ab002010-12-09 01:55:55 +0000417/* Keypad Initialization */
418#define KEYPAD_BUTTON(ev_type, ev_code, act_low) \
419{ \
420 .type = ev_type, \
421 .code = ev_code, \
422 .active_low = act_low, \
423}
424
425#define KEYPAD_BUTTON_LOW(event_code) KEYPAD_BUTTON(EV_KEY, event_code, 1)
426
427static struct tca6416_button mackerel_gpio_keys[] = {
428 KEYPAD_BUTTON_LOW(KEY_HOME),
429 KEYPAD_BUTTON_LOW(KEY_MENU),
430 KEYPAD_BUTTON_LOW(KEY_BACK),
431 KEYPAD_BUTTON_LOW(KEY_POWER),
432};
433
434static struct tca6416_keys_platform_data mackerel_tca6416_keys_info = {
435 .buttons = mackerel_gpio_keys,
436 .nbuttons = ARRAY_SIZE(mackerel_gpio_keys),
437 .rep = 1,
438 .use_polling = 0,
439 .pinmask = 0x000F,
440};
441
Kuninori Morimoto1a44d722010-12-01 00:31:46 +0000442/* I2C */
Tony SIMcd8ab002010-12-09 01:55:55 +0000443#define IRQ9 evt2irq(0x0320)
444
Kuninori Morimoto1a44d722010-12-01 00:31:46 +0000445static struct i2c_board_info i2c0_devices[] = {
446 {
447 I2C_BOARD_INFO("ak4643", 0x13),
448 },
Tony SIMcd8ab002010-12-09 01:55:55 +0000449 /* Keypad */
450 {
451 I2C_BOARD_INFO("tca6408-keys", 0x20),
452 .platform_data = &mackerel_tca6416_keys_info,
453 .irq = IRQ9,
454 },
Kuninori Morimoto920adc72010-11-29 02:21:21 +0000455};
456
Tony SIM80f1dc72010-12-07 09:12:14 +0000457#define IRQ21 evt2irq(0x32a0)
458
459static struct i2c_board_info i2c1_devices[] = {
460 /* Accelerometer */
461 {
462 I2C_BOARD_INFO("adxl34x", 0x53),
463 .irq = IRQ21,
464 },
465};
466
Kuninori Morimoto920adc72010-11-29 02:21:21 +0000467static struct map_desc mackerel_io_desc[] __initdata = {
468 /* create a 1:1 entity map for 0xe6xxxxxx
469 * used by CPGA, INTC and PFC.
470 */
471 {
472 .virtual = 0xe6000000,
473 .pfn = __phys_to_pfn(0xe6000000),
474 .length = 256 << 20,
475 .type = MT_DEVICE_NONSHARED
476 },
477};
478
479static void __init mackerel_map_io(void)
480{
481 iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc));
482
483 /* setup early devices and console here as well */
484 sh7372_add_early_devices();
485 shmobile_setup_console();
486}
487
Kuninori Morimoto1a44d722010-12-01 00:31:46 +0000488#define GPIO_PORT9CR 0xE6051009
489#define GPIO_PORT10CR 0xE605100A
Kuninori Morimoto920adc72010-11-29 02:21:21 +0000490static void __init mackerel_init(void)
491{
492 sh7372_pinmux_init();
493
494 /* enable SCIFA0 */
495 gpio_request(GPIO_FN_SCIFA0_TXD, NULL);
496 gpio_request(GPIO_FN_SCIFA0_RXD, NULL);
497
Kuninori Morimoto2264c152010-11-29 02:21:37 +0000498 /* enable SMSC911X */
499 gpio_request(GPIO_FN_CS5A, NULL);
500 gpio_request(GPIO_FN_IRQ6_39, NULL);
501
Kuninori Morimoto11fee462010-11-29 02:21:43 +0000502 /* LCDC */
Kuninori Morimotoeb87e672010-11-29 06:19:52 +0000503 gpio_request(GPIO_FN_LCDD23, NULL);
504 gpio_request(GPIO_FN_LCDD22, NULL);
505 gpio_request(GPIO_FN_LCDD21, NULL);
506 gpio_request(GPIO_FN_LCDD20, NULL);
507 gpio_request(GPIO_FN_LCDD19, NULL);
508 gpio_request(GPIO_FN_LCDD18, NULL);
Kuninori Morimoto11fee462010-11-29 02:21:43 +0000509 gpio_request(GPIO_FN_LCDD17, NULL);
510 gpio_request(GPIO_FN_LCDD16, NULL);
511 gpio_request(GPIO_FN_LCDD15, NULL);
512 gpio_request(GPIO_FN_LCDD14, NULL);
513 gpio_request(GPIO_FN_LCDD13, NULL);
514 gpio_request(GPIO_FN_LCDD12, NULL);
515 gpio_request(GPIO_FN_LCDD11, NULL);
516 gpio_request(GPIO_FN_LCDD10, NULL);
517 gpio_request(GPIO_FN_LCDD9, NULL);
518 gpio_request(GPIO_FN_LCDD8, NULL);
519 gpio_request(GPIO_FN_LCDD7, NULL);
520 gpio_request(GPIO_FN_LCDD6, NULL);
521 gpio_request(GPIO_FN_LCDD5, NULL);
522 gpio_request(GPIO_FN_LCDD4, NULL);
523 gpio_request(GPIO_FN_LCDD3, NULL);
524 gpio_request(GPIO_FN_LCDD2, NULL);
525 gpio_request(GPIO_FN_LCDD1, NULL);
526 gpio_request(GPIO_FN_LCDD0, NULL);
527 gpio_request(GPIO_FN_LCDDISP, NULL);
528 gpio_request(GPIO_FN_LCDDCK, NULL);
529
530 gpio_request(GPIO_PORT31, NULL); /* backlight */
531 gpio_direction_output(GPIO_PORT31, 1);
532
533 gpio_request(GPIO_PORT151, NULL); /* LCDDON */
534 gpio_direction_output(GPIO_PORT151, 1);
535
Kuninori Morimoto25338f22010-11-30 04:37:33 +0000536 /* USB enable */
537 gpio_request(GPIO_FN_VBUS0_1, NULL);
538 gpio_request(GPIO_FN_IDIN_1_18, NULL);
539 gpio_request(GPIO_FN_PWEN_1_115, NULL);
540 gpio_request(GPIO_FN_OVCN_1_114, NULL);
541 gpio_request(GPIO_FN_EXTLP_1, NULL);
542 gpio_request(GPIO_FN_OVCN2_1, NULL);
543
544 /* setup USB phy */
545 __raw_writew(0x8a0a, 0xE6058130); /* USBCR2 */
546
Kuninori Morimoto1a44d722010-12-01 00:31:46 +0000547 /* enable FSI2 port A (ak4643) */
548 gpio_request(GPIO_FN_FSIAIBT, NULL);
549 gpio_request(GPIO_FN_FSIAILR, NULL);
550 gpio_request(GPIO_FN_FSIAISLD, NULL);
551 gpio_request(GPIO_FN_FSIAOSLD, NULL);
552 gpio_request(GPIO_PORT161, NULL);
553 gpio_direction_output(GPIO_PORT161, 0); /* slave */
554
555 gpio_request(GPIO_PORT9, NULL);
556 gpio_request(GPIO_PORT10, NULL);
557 gpio_no_direction(GPIO_PORT9CR); /* FSIAOBT needs no direction */
558 gpio_no_direction(GPIO_PORT10CR); /* FSIAOLR needs no direction */
559
560 intc_set_priority(IRQ_FSI, 3); /* irq priority FSI(3) > SMSC911X(2) */
561
Tony SIMcd8ab002010-12-09 01:55:55 +0000562 /* enable Keypad */
563 gpio_request(GPIO_FN_IRQ9_42, NULL);
564 set_irq_type(IRQ9, IRQ_TYPE_LEVEL_HIGH);
565
Tony SIM80f1dc72010-12-07 09:12:14 +0000566 /* enable Accelerometer */
567 gpio_request(GPIO_FN_IRQ21, NULL);
568 set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);
Kuninori Morimoto1a44d722010-12-01 00:31:46 +0000569
570 i2c_register_board_info(0, i2c0_devices,
571 ARRAY_SIZE(i2c0_devices));
Tony SIM80f1dc72010-12-07 09:12:14 +0000572 i2c_register_board_info(1, i2c1_devices,
573 ARRAY_SIZE(i2c1_devices));
Kuninori Morimoto11fee462010-11-29 02:21:43 +0000574
Kuninori Morimoto920adc72010-11-29 02:21:21 +0000575 sh7372_add_standard_devices();
576
577 platform_add_devices(mackerel_devices, ARRAY_SIZE(mackerel_devices));
578}
579
580static void __init mackerel_timer_init(void)
581{
582 sh7372_clock_init();
583 shmobile_timer.init();
584}
585
586static struct sys_timer mackerel_timer = {
587 .init = mackerel_timer_init,
588};
589
590MACHINE_START(MACKEREL, "mackerel")
591 .map_io = mackerel_map_io,
592 .init_irq = sh7372_init_irq,
593 .init_machine = mackerel_init,
594 .timer = &mackerel_timer,
595MACHINE_END