blob: 6fc516855a8cec0bc93b6cda648da65c2d001fe2 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Tony Lindgrendbdf9ced2005-07-10 19:58:11 +01002 * linux/arch/arm/mach-omap1/board-h3.c
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 *
4 * This file contains OMAP1710 H3 specific code.
5 *
6 * Copyright (C) 2004 Texas Instruments, Inc.
7 * Copyright (C) 2002 MontaVista Software, Inc.
8 * Copyright (C) 2001 RidgeRun, Inc.
9 * Author: RidgeRun, Inc.
10 * Greg Lonnon (glonnon@ridgerun.com) or info@ridgerun.com
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#include <linux/types.h>
18#include <linux/init.h>
19#include <linux/major.h>
20#include <linux/kernel.h>
Russell Kingd052d1b2005-10-29 19:07:23 +010021#include <linux/platform_device.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070022#include <linux/errno.h>
Tony Lindgren9b6553c2006-04-02 17:46:30 +010023#include <linux/workqueue.h>
David Brownell8056c6c2007-10-13 23:56:30 +020024#include <linux/i2c.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070025#include <linux/mtd/mtd.h>
Tony Lindgren9b6553c2006-04-02 17:46:30 +010026#include <linux/mtd/nand.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070027#include <linux/mtd/partitions.h>
Tony Lindgren9b6553c2006-04-02 17:46:30 +010028#include <linux/input.h>
David Brownell6d16bfb2008-01-27 18:14:49 +010029#include <linux/i2c/tps65010.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070030
31#include <asm/setup.h>
32#include <asm/page.h>
33#include <asm/hardware.h>
David Brownell8056c6c2007-10-13 23:56:30 +020034#include <asm/gpio.h>
35
Linus Torvalds1da177e2005-04-16 15:20:36 -070036#include <asm/mach-types.h>
37#include <asm/mach/arch.h>
38#include <asm/mach/flash.h>
39#include <asm/mach/map.h>
40
Tony Lindgren9b6553c2006-04-02 17:46:30 +010041#include <asm/arch/gpioexpander.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070042#include <asm/arch/irqs.h>
43#include <asm/arch/mux.h>
44#include <asm/arch/tc.h>
Tony Lindgren78be6322007-12-11 13:50:17 -080045#include <asm/arch/nand.h>
Tony Lindgren9b6553c2006-04-02 17:46:30 +010046#include <asm/arch/irda.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070047#include <asm/arch/usb.h>
Tony Lindgren9b6553c2006-04-02 17:46:30 +010048#include <asm/arch/keypad.h>
49#include <asm/arch/dma.h>
Tony Lindgrend48af152005-07-10 19:58:17 +010050#include <asm/arch/common.h>
Tony Lindgrena5246262006-12-07 13:58:17 -080051#include <asm/arch/mcbsp.h>
52#include <asm/arch/omap-alsa.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070053
Tony Lindgren9b6553c2006-04-02 17:46:30 +010054static int h3_keymap[] = {
55 KEY(0, 0, KEY_LEFT),
56 KEY(0, 1, KEY_RIGHT),
57 KEY(0, 2, KEY_3),
58 KEY(0, 3, KEY_F10),
59 KEY(0, 4, KEY_F5),
60 KEY(0, 5, KEY_9),
61 KEY(1, 0, KEY_DOWN),
62 KEY(1, 1, KEY_UP),
63 KEY(1, 2, KEY_2),
64 KEY(1, 3, KEY_F9),
65 KEY(1, 4, KEY_F7),
66 KEY(1, 5, KEY_0),
67 KEY(2, 0, KEY_ENTER),
68 KEY(2, 1, KEY_6),
69 KEY(2, 2, KEY_1),
70 KEY(2, 3, KEY_F2),
71 KEY(2, 4, KEY_F6),
72 KEY(2, 5, KEY_HOME),
73 KEY(3, 0, KEY_8),
74 KEY(3, 1, KEY_5),
75 KEY(3, 2, KEY_F12),
76 KEY(3, 3, KEY_F3),
77 KEY(3, 4, KEY_F8),
78 KEY(3, 5, KEY_END),
79 KEY(4, 0, KEY_7),
80 KEY(4, 1, KEY_4),
81 KEY(4, 2, KEY_F11),
82 KEY(4, 3, KEY_F1),
83 KEY(4, 4, KEY_F4),
84 KEY(4, 5, KEY_ESC),
85 KEY(5, 0, KEY_F13),
86 KEY(5, 1, KEY_F14),
87 KEY(5, 2, KEY_F15),
88 KEY(5, 3, KEY_F16),
89 KEY(5, 4, KEY_SLEEP),
90 0
91};
92
93
94static struct mtd_partition nor_partitions[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -070095 /* bootloader (U-Boot, etc) in first sector */
96 {
97 .name = "bootloader",
98 .offset = 0,
99 .size = SZ_128K,
100 .mask_flags = MTD_WRITEABLE, /* force read-only */
101 },
102 /* bootloader params in the next sector */
103 {
104 .name = "params",
105 .offset = MTDPART_OFS_APPEND,
106 .size = SZ_128K,
107 .mask_flags = 0,
108 },
109 /* kernel */
110 {
111 .name = "kernel",
112 .offset = MTDPART_OFS_APPEND,
113 .size = SZ_2M,
114 .mask_flags = 0
115 },
116 /* file system */
117 {
118 .name = "filesystem",
119 .offset = MTDPART_OFS_APPEND,
120 .size = MTDPART_SIZ_FULL,
121 .mask_flags = 0
122 }
123};
124
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100125static struct flash_platform_data nor_data = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700126 .map_name = "cfi_probe",
127 .width = 2,
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100128 .parts = nor_partitions,
129 .nr_parts = ARRAY_SIZE(nor_partitions),
Linus Torvalds1da177e2005-04-16 15:20:36 -0700130};
131
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100132static struct resource nor_resource = {
Tony Lindgren7c38cf02005-09-08 23:07:38 +0100133 /* This is on CS3, wherever it's mapped */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700134 .flags = IORESOURCE_MEM,
135};
136
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100137static struct platform_device nor_device = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700138 .name = "omapflash",
139 .id = 0,
140 .dev = {
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100141 .platform_data = &nor_data,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700142 },
143 .num_resources = 1,
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100144 .resource = &nor_resource,
145};
146
147static struct mtd_partition nand_partitions[] = {
148#if 0
149 /* REVISIT: enable these partitions if you make NAND BOOT work */
150 {
151 .name = "xloader",
152 .offset = 0,
153 .size = 64 * 1024,
154 .mask_flags = MTD_WRITEABLE, /* force read-only */
155 },
156 {
157 .name = "bootloader",
158 .offset = MTDPART_OFS_APPEND,
159 .size = 256 * 1024,
160 .mask_flags = MTD_WRITEABLE, /* force read-only */
161 },
162 {
163 .name = "params",
164 .offset = MTDPART_OFS_APPEND,
165 .size = 192 * 1024,
166 },
167 {
168 .name = "kernel",
169 .offset = MTDPART_OFS_APPEND,
170 .size = 2 * SZ_1M,
171 },
172#endif
173 {
174 .name = "filesystem",
175 .size = MTDPART_SIZ_FULL,
176 .offset = MTDPART_OFS_APPEND,
177 },
178};
179
180/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */
Tony Lindgren78be6322007-12-11 13:50:17 -0800181static struct omap_nand_platform_data nand_data = {
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100182 .options = NAND_SAMSUNG_LP_OPTIONS,
183 .parts = nand_partitions,
184 .nr_parts = ARRAY_SIZE(nand_partitions),
185};
186
187static struct resource nand_resource = {
188 .flags = IORESOURCE_MEM,
189};
190
191static struct platform_device nand_device = {
192 .name = "omapnand",
193 .id = 0,
194 .dev = {
195 .platform_data = &nand_data,
196 },
197 .num_resources = 1,
198 .resource = &nand_resource,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700199};
200
201static struct resource smc91x_resources[] = {
202 [0] = {
203 .start = OMAP1710_ETHR_START, /* Physical */
204 .end = OMAP1710_ETHR_START + 0xf,
205 .flags = IORESOURCE_MEM,
206 },
207 [1] = {
208 .start = OMAP_GPIO_IRQ(40),
209 .end = OMAP_GPIO_IRQ(40),
Russell Kinge7b3dc72008-01-14 22:30:10 +0000210 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700211 },
212};
213
214static struct platform_device smc91x_device = {
215 .name = "smc91x",
216 .id = 0,
217 .num_resources = ARRAY_SIZE(smc91x_resources),
218 .resource = smc91x_resources,
219};
220
221#define GPTIMER_BASE 0xFFFB1400
222#define GPTIMER_REGS(x) (0xFFFB1400 + (x * 0x800))
223#define GPTIMER_REGS_SIZE 0x46
224
225static struct resource intlat_resources[] = {
226 [0] = {
227 .start = GPTIMER_REGS(0), /* Physical */
228 .end = GPTIMER_REGS(0) + GPTIMER_REGS_SIZE,
229 .flags = IORESOURCE_MEM,
230 },
231 [1] = {
232 .start = INT_1610_GPTIMER1,
233 .end = INT_1610_GPTIMER1,
234 .flags = IORESOURCE_IRQ,
235 },
236};
237
238static struct platform_device intlat_device = {
239 .name = "omap_intlat",
240 .id = 0,
241 .num_resources = ARRAY_SIZE(intlat_resources),
242 .resource = intlat_resources,
243};
244
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100245static struct resource h3_kp_resources[] = {
246 [0] = {
247 .start = INT_KEYBOARD,
248 .end = INT_KEYBOARD,
249 .flags = IORESOURCE_IRQ,
250 },
251};
252
253static struct omap_kp_platform_data h3_kp_data = {
Komal Shah4d246072006-09-29 01:59:20 -0700254 .rows = 8,
255 .cols = 8,
256 .keymap = h3_keymap,
257 .keymapsize = ARRAY_SIZE(h3_keymap),
258 .rep = 1,
259 .delay = 9,
260 .dbounce = 1,
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100261};
262
263static struct platform_device h3_kp_device = {
264 .name = "omap-keypad",
265 .id = -1,
266 .dev = {
267 .platform_data = &h3_kp_data,
268 },
269 .num_resources = ARRAY_SIZE(h3_kp_resources),
270 .resource = h3_kp_resources,
271};
272
273
274/* Select between the IrDA and aGPS module
275 */
276static int h3_select_irda(struct device *dev, int state)
277{
278 unsigned char expa;
279 int err = 0;
280
281 if ((err = read_gpio_expa(&expa, 0x26))) {
282 printk(KERN_ERR "Error reading from I/O EXPANDER \n");
283 return err;
284 }
285
286 /* 'P6' enable/disable IRDA_TX and IRDA_RX */
287 if (state & IR_SEL) { /* IrDA */
288 if ((err = write_gpio_expa(expa | 0x40, 0x26))) {
289 printk(KERN_ERR "Error writing to I/O EXPANDER \n");
290 return err;
291 }
292 } else {
293 if ((err = write_gpio_expa(expa & ~0x40, 0x26))) {
294 printk(KERN_ERR "Error writing to I/O EXPANDER \n");
295 return err;
296 }
297 }
298 return err;
299}
300
Dirk Behme666cd172007-01-25 16:26:46 -0800301static void set_trans_mode(struct work_struct *work)
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100302{
Dirk Behme666cd172007-01-25 16:26:46 -0800303 struct omap_irda_config *irda_config =
304 container_of(work, struct omap_irda_config, gpio_expa.work);
305 int mode = irda_config->mode;
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100306 unsigned char expa;
307 int err = 0;
308
309 if ((err = read_gpio_expa(&expa, 0x27)) != 0) {
310 printk(KERN_ERR "Error reading from I/O expander\n");
311 }
312
313 expa &= ~0x03;
314
Dirk Behme666cd172007-01-25 16:26:46 -0800315 if (mode & IR_SIRMODE) {
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100316 expa |= 0x01;
317 } else { /* MIR/FIR */
318 expa |= 0x03;
319 }
320
321 if ((err = write_gpio_expa(expa, 0x27)) != 0) {
322 printk(KERN_ERR "Error writing to I/O expander\n");
323 }
324}
325
326static int h3_transceiver_mode(struct device *dev, int mode)
327{
328 struct omap_irda_config *irda_config = dev->platform_data;
329
Dirk Behme666cd172007-01-25 16:26:46 -0800330 irda_config->mode = mode;
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100331 cancel_delayed_work(&irda_config->gpio_expa);
Dirk Behme666cd172007-01-25 16:26:46 -0800332 PREPARE_DELAYED_WORK(&irda_config->gpio_expa, set_trans_mode);
David Howells6d5aefb2006-12-05 19:36:26 +0000333 schedule_delayed_work(&irda_config->gpio_expa, 0);
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100334
335 return 0;
336}
337
338static struct omap_irda_config h3_irda_data = {
339 .transceiver_cap = IR_SIRMODE | IR_MIRMODE | IR_FIRMODE,
340 .transceiver_mode = h3_transceiver_mode,
341 .select_irda = h3_select_irda,
342 .rx_channel = OMAP_DMA_UART3_RX,
343 .tx_channel = OMAP_DMA_UART3_TX,
344 .dest_start = UART3_THR,
345 .src_start = UART3_RHR,
346 .tx_trigger = 0,
347 .rx_trigger = 0,
348};
349
350static struct resource h3_irda_resources[] = {
351 [0] = {
352 .start = INT_UART3,
353 .end = INT_UART3,
354 .flags = IORESOURCE_IRQ,
355 },
356};
357
Tony Lindgrena5246262006-12-07 13:58:17 -0800358static u64 irda_dmamask = 0xffffffff;
359
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100360static struct platform_device h3_irda_device = {
361 .name = "omapirda",
362 .id = 0,
363 .dev = {
364 .platform_data = &h3_irda_data,
Tony Lindgrena5246262006-12-07 13:58:17 -0800365 .dma_mask = &irda_dmamask,
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100366 },
367 .num_resources = ARRAY_SIZE(h3_irda_resources),
368 .resource = h3_irda_resources,
369};
370
371static struct platform_device h3_lcd_device = {
372 .name = "lcd_h3",
373 .id = -1,
374};
375
Tony Lindgrena5246262006-12-07 13:58:17 -0800376static struct omap_mcbsp_reg_cfg mcbsp_regs = {
377 .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
378 .spcr1 = RINTM(3) | RRST,
379 .rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
380 RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(1),
381 .rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
382 .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
383 XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(1) | XFIG,
384 .xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
385 .srgr1 = FWID(15),
386 .srgr2 = GSYNC | CLKSP | FSGM | FPER(31),
387
388 .pcr0 = CLKRM | SCLKME | FSXP | FSRP | CLKXP | CLKRP,
David Cohen6e2d4102007-12-13 22:27:15 -0400389 /*.pcr0 = CLKXP | CLKRP,*/ /* mcbsp: slave */
Tony Lindgrena5246262006-12-07 13:58:17 -0800390};
391
392static struct omap_alsa_codec_config alsa_config = {
393 .name = "H3 TSC2101",
394 .mcbsp_regs_alsa = &mcbsp_regs,
David Cohen6e2d4102007-12-13 22:27:15 -0400395 .codec_configure_dev = NULL, /* tsc2101_configure, */
396 .codec_set_samplerate = NULL, /* tsc2101_set_samplerate, */
397 .codec_clock_setup = NULL, /* tsc2101_clock_setup, */
398 .codec_clock_on = NULL, /* tsc2101_clock_on, */
399 .codec_clock_off = NULL, /* tsc2101_clock_off, */
400 .get_default_samplerate = NULL, /* tsc2101_get_default_samplerate, */
Tony Lindgrena5246262006-12-07 13:58:17 -0800401};
402
403static struct platform_device h3_mcbsp1_device = {
404 .name = "omap_alsa_mcbsp",
405 .id = 1,
406 .dev = {
407 .platform_data = &alsa_config,
408 },
409};
410
Linus Torvalds1da177e2005-04-16 15:20:36 -0700411static struct platform_device *devices[] __initdata = {
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100412 &nor_device,
413 &nand_device,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700414 &smc91x_device,
415 &intlat_device,
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100416 &h3_irda_device,
417 &h3_kp_device,
418 &h3_lcd_device,
Tony Lindgrena5246262006-12-07 13:58:17 -0800419 &h3_mcbsp1_device,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700420};
421
422static struct omap_usb_config h3_usb_config __initdata = {
423 /* usb1 has a Mini-AB port and external isp1301 transceiver */
424 .otg = 2,
425
426#ifdef CONFIG_USB_GADGET_OMAP
427 .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */
428#elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
429 /* NONSTANDARD CABLE NEEDED (B-to-Mini-B) */
430 .hmc_mode = 20, /* 1:dev|otg(off) 1:host 2:disabled */
431#endif
432
433 .pins[1] = 3,
434};
435
Tony Lindgren7c38cf02005-09-08 23:07:38 +0100436static struct omap_mmc_config h3_mmc_config __initdata = {
437 .mmc[0] = {
Felipe Balbi138ab9f2007-11-27 00:01:45 -0400438 .enabled = 1,
439 .wire4 = 1,
440 },
Tony Lindgren7c38cf02005-09-08 23:07:38 +0100441};
442
Felipe Balbi138ab9f2007-11-27 00:01:45 -0400443extern struct omap_mmc_platform_data h3_mmc_data;
444
Tony Lindgren3179a012005-11-10 14:26:48 +0000445static struct omap_uart_config h3_uart_config __initdata = {
446 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
447};
448
449static struct omap_lcd_config h3_lcd_config __initdata = {
Tony Lindgren3179a012005-11-10 14:26:48 +0000450 .ctrl_name = "internal",
451};
452
Tony Lindgrene27a93a2007-12-18 20:58:32 -0800453static struct omap_board_config_kernel h3_config[] __initdata = {
Tony Lindgren3179a012005-11-10 14:26:48 +0000454 { OMAP_TAG_USB, &h3_usb_config },
455 { OMAP_TAG_MMC, &h3_mmc_config },
456 { OMAP_TAG_UART, &h3_uart_config },
457 { OMAP_TAG_LCD, &h3_lcd_config },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700458};
459
Felipe Balbi138ab9f2007-11-27 00:01:45 -0400460static struct omap_gpio_switch h3_gpio_switches[] __initdata = {
461 {
462 .name = "mmc_slot",
463 .gpio = OMAP_MPUIO(1),
464 .type = OMAP_GPIO_SWITCH_TYPE_COVER,
465 .debounce_rising = 100,
466 .debounce_falling = 0,
467 .notify = h3_mmc_slot_cover_handler,
468 .notify_data = NULL,
469 },
470};
471
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100472#define H3_NAND_RB_GPIO_PIN 10
473
Tony Lindgren78be6322007-12-11 13:50:17 -0800474static int nand_dev_ready(struct omap_nand_platform_data *data)
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100475{
476 return omap_get_gpio_datain(H3_NAND_RB_GPIO_PIN);
477}
478
Linus Torvalds1da177e2005-04-16 15:20:36 -0700479static void __init h3_init(void)
480{
Tony Lindgren9b6553c2006-04-02 17:46:30 +0100481 /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped
482 * to address 0 by a dip switch), NAND on CS2B. The NAND driver will
483 * notice whether a NAND chip is enabled at probe time.
484 *
485 * H3 support NAND-boot, with a dip switch to put NOR on CS2B and NAND
486 * (which on H2 may be 16bit) on CS3. Try detecting that in code here,
487 * to avoid probing every possible flash configuration...
488 */
489 nor_resource.end = nor_resource.start = omap_cs3_phys();
490 nor_resource.end += SZ_32M - 1;
491
492 nand_resource.end = nand_resource.start = OMAP_CS2B_PHYS;
493 nand_resource.end += SZ_4K - 1;
494 if (!(omap_request_gpio(H3_NAND_RB_GPIO_PIN)))
495 nand_data.dev_ready = nand_dev_ready;
496
497 /* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */
498 /* GPIO10 pullup/down register, Enable pullup on GPIO10 */
499 omap_cfg_reg(V2_1710_GPIO10);
500
501 platform_add_devices(devices, ARRAY_SIZE(devices));
Tony Lindgrene27a93a2007-12-18 20:58:32 -0800502 spi_register_board_info(h3_spi_board_info,
503 ARRAY_SIZE(h3_spi_board_info));
Tony Lindgren7c38cf02005-09-08 23:07:38 +0100504 omap_board_config = h3_config;
505 omap_board_config_size = ARRAY_SIZE(h3_config);
Tony Lindgren3179a012005-11-10 14:26:48 +0000506 omap_serial_init();
Jarkko Nikula1ed16a82007-11-07 06:54:32 +0200507 omap_register_i2c_bus(1, 100, h3_i2c_board_info,
508 ARRAY_SIZE(h3_i2c_board_info));
Felipe Balbi138ab9f2007-11-27 00:01:45 -0400509 h3_mmc_init();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700510}
511
512static void __init h3_init_smc91x(void)
513{
514 omap_cfg_reg(W15_1710_GPIO40);
515 if (omap_request_gpio(40) < 0) {
516 printk("Error requesting gpio 40 for smc91x irq\n");
517 return;
518 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700519}
520
David Brownell277d58e2006-12-06 17:13:59 -0800521static void __init h3_init_irq(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700522{
Tony Lindgren87bd63f2006-02-08 22:06:46 +0000523 omap1_init_common_hw();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700524 omap_init_irq();
525 omap_gpio_init();
526 h3_init_smc91x();
527}
528
529static void __init h3_map_io(void)
530{
Tony Lindgren87bd63f2006-02-08 22:06:46 +0000531 omap1_map_common_io();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700532}
533
534MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
Russell Kinge9dea0c2005-07-03 17:38:58 +0100535 /* Maintainer: Texas Instruments, Inc. */
Russell Kinge9dea0c2005-07-03 17:38:58 +0100536 .phys_io = 0xfff00000,
537 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
538 .boot_params = 0x10000100,
539 .map_io = h3_map_io,
540 .init_irq = h3_init_irq,
541 .init_machine = h3_init,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700542 .timer = &omap_timer,
543MACHINE_END