This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / arch / arm / mach-omap / innovator1610.c
1 /*
2  * linux/arch/arm/mach-omap/innovator1610.c
3  *
4  * This file contains Innovator-specific code.
5  *
6  * Copyright (C) 2002 MontaVista Software, Inc.
7  *
8  * Copyright (C) 2001 RidgeRun, Inc.
9  * Author: Greg Lonnon <glonnon@ridgerun.com>
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 version 2 as
13  * published by the Free Software Foundation.
14  */
15
16 #include <linux/config.h>
17 #include <linux/types.h>
18 #include <linux/init.h>
19 #include <linux/major.h>
20 #include <linux/kernel.h>
21 #include <linux/device.h>
22 #include <linux/errno.h>
23
24 #include <asm/setup.h>
25 #include <asm/page.h>
26 #include <asm/hardware.h>
27 #include <asm/mach/arch.h>
28 #include <asm/mach/map.h>
29 #include <asm/arch/irqs.h>
30
31 #include "common.h"
32
33 void
34 innovator_init_irq(void)
35 {
36         omap_init_irq();
37 }
38
39 static struct resource smc91x_resources[] = {
40         [0] = {
41                 .start  = OMAP1610_ETHR_START,          /* Physical */
42                 .end    = OMAP1610_ETHR_START + SZ_4K,
43                 .flags  = IORESOURCE_MEM,
44         },
45         [1] = {
46                 .start  = 0,                            /* Really GPIO 0 */
47                 .end    = 0,
48                 .flags  = IORESOURCE_IRQ,
49         },
50 };
51
52 static struct platform_device smc91x_device = {
53         .name           = "smc91x",
54         .id             = 0,
55         .num_resources  = ARRAY_SIZE(smc91x_resources),
56         .resource       = smc91x_resources,
57 };
58
59 static struct platform_device *devices[] __initdata = {
60         &smc91x_device,
61 };
62
63 static void __init innovator_init(void)
64 {
65         if (!machine_is_innovator())
66                 return;
67
68         (void) platform_add_devices(devices, ARRAY_SIZE(devices));
69 }
70
71 static struct map_desc innovator_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,
74         MT_DEVICE },
75 };
76
77 static void __init innovator_map_io(void)
78 {
79         omap_map_io();
80         iotable_init(innovator_io_desc, ARRAY_SIZE(innovator_io_desc));
81 }
82
83 MACHINE_START(INNOVATOR, "TI-Innovator/OMAP1610")
84         MAINTAINER("MontaVista Software, Inc.")
85         BOOT_MEM(0x10000000, 0xe0000000, 0xe0000000)
86         BOOT_PARAMS(0x10000100)
87         MAPIO(innovator_map_io)
88         INITIRQ(innovator_init_irq)
89         INIT_MACHINE(innovator_init)
90 MACHINE_END
91