2 * linux/arch/arm/mach-omap/board-innovator.c
4 * Board specific inits for OMAP-1510 and OMAP-1610 Innovator
6 * Copyright (C) 2001 RidgeRun, Inc.
7 * Author: Greg Lonnon <glonnon@ridgerun.com>
9 * Copyright (C) 2002 MontaVista Software, Inc.
11 * Separated FPGA interrupts from innovator1510.c and cleaned up for 2.6
12 * Copyright (C) 2004 Nokia Corporation by Tony Lindrgen <tony@atomide.com>
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
19 #include <linux/kernel.h>
20 #include <linux/init.h>
21 #include <linux/device.h>
23 #include <asm/hardware.h>
24 #include <asm/mach/arch.h>
25 #include <asm/mach/map.h>
27 #include <asm/arch/clocks.h>
28 #include <asm/arch/gpio.h>
29 #include <asm/arch/fpga.h>
33 #ifdef CONFIG_ARCH_OMAP1510
35 extern int omap_gpio_init(void);
37 /* Only FPGA needs to be mapped here. All others are done with ioremap */
38 static struct map_desc innovator1510_io_desc[] __initdata = {
39 { OMAP1510P1_FPGA_BASE, OMAP1510P1_FPGA_START, OMAP1510P1_FPGA_SIZE,
43 static struct resource innovator1510_smc91x_resources[] = {
45 .start = OMAP1510P1_FPGA_ETHR_START, /* Physical */
46 .end = OMAP1510P1_FPGA_ETHR_START + 16,
47 .flags = IORESOURCE_MEM,
52 .flags = IORESOURCE_IRQ,
56 static struct platform_device innovator1510_smc91x_device = {
59 .num_resources = ARRAY_SIZE(innovator1510_smc91x_resources),
60 .resource = innovator1510_smc91x_resources,
63 static struct platform_device *innovator1510_devices[] __initdata = {
64 &innovator1510_smc91x_device,
67 #endif /* CONFIG_ARCH_OMAP1510 */
69 #ifdef CONFIG_ARCH_OMAP1610
71 static struct map_desc innovator1610_io_desc[] __initdata = {
72 { OMAP1610_ETHR_BASE, OMAP1610_ETHR_START, OMAP1610_ETHR_SIZE,MT_DEVICE },
73 { OMAP1610_NOR_FLASH_BASE, OMAP1610_NOR_FLASH_START, OMAP1610_NOR_FLASH_SIZE,
77 static struct resource innovator1610_smc91x_resources[] = {
79 .start = OMAP1610_ETHR_START, /* Physical */
80 .end = OMAP1610_ETHR_START + SZ_4K,
81 .flags = IORESOURCE_MEM,
84 .start = 0, /* Really GPIO 0 */
86 .flags = IORESOURCE_IRQ,
90 static struct platform_device innovator1610_smc91x_device = {
93 .num_resources = ARRAY_SIZE(innovator1610_smc91x_resources),
94 .resource = innovator1610_smc91x_resources,
97 static struct platform_device *innovator1610_devices[] __initdata = {
98 &innovator1610_smc91x_device,
101 #endif /* CONFIG_ARCH_OMAP1610 */
103 void innovator_init_irq(void)
106 #ifdef CONFIG_ARCH_OMAP1510
107 if (cpu_is_omap1510()) {
114 static void __init innovator_init(void)
116 #ifdef CONFIG_ARCH_OMAP1510
117 if (cpu_is_omap1510()) {
118 platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices));
121 #ifdef CONFIG_ARCH_OMAP1610
122 if (cpu_is_omap1610()) {
123 platform_add_devices(innovator1610_devices, ARRAY_SIZE(innovator1610_devices));
128 static void __init innovator_map_io(void)
132 #ifdef CONFIG_ARCH_OMAP1510
133 if (cpu_is_omap1510()) {
134 iotable_init(innovator1510_io_desc, ARRAY_SIZE(innovator1510_io_desc));
136 /* Dump the Innovator FPGA rev early - useful info for support. */
137 printk("Innovator FPGA Rev %d.%d Board Rev %d\n",
138 fpga_read(OMAP1510P1_FPGA_REV_HIGH),
139 fpga_read(OMAP1510P1_FPGA_REV_LOW),
140 fpga_read(OMAP1510P1_FPGA_BOARD_REV));
143 #ifdef CONFIG_ARCH_OMAP1610
144 if (cpu_is_omap1610()) {
145 iotable_init(innovator1610_io_desc, ARRAY_SIZE(innovator1610_io_desc));
150 MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
151 MAINTAINER("MontaVista Software, Inc.")
152 BOOT_MEM(0x10000000, 0xe0000000, 0xe0000000)
153 BOOT_PARAMS(0x10000100)
154 MAPIO(innovator_map_io)
155 INITIRQ(innovator_init_irq)
156 INIT_MACHINE(innovator_init)