[SCSI] qla1280: convert to use the data buffer accessors
[linux-2.6/verdex.git] / arch / arm / mach-ep93xx / micro9.c
blobf28c1294cae1cf228afb7ee8ac99bae41d742faf
1 /*
2 * linux/arch/arm/mach-ep93xx/micro9.c
4 * Copyright (C) 2006 Contec Steuerungstechnik & Automation GmbH
5 * Manfred Gruber <manfred.gruber@contec.at>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
12 #include <linux/init.h>
13 #include <linux/interrupt.h>
14 #include <linux/ioport.h>
15 #include <linux/kernel.h>
16 #include <linux/mm.h>
17 #include <linux/platform_device.h>
18 #include <linux/sched.h>
20 #include <linux/mtd/physmap.h>
22 #include <asm/io.h>
23 #include <asm/hardware.h>
25 #include <asm/mach/arch.h>
26 #include <asm/mach-types.h>
28 static struct ep93xx_eth_data micro9_eth_data = {
29 .phy_id = 0x1f,
32 static struct resource micro9_eth_resource[] = {
34 .start = EP93XX_ETHERNET_PHYS_BASE,
35 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
36 .flags = IORESOURCE_MEM,
37 }, {
38 .start = IRQ_EP93XX_ETHERNET,
39 .end = IRQ_EP93XX_ETHERNET,
40 .flags = IORESOURCE_IRQ,
44 static struct platform_device micro9_eth_device = {
45 .name = "ep93xx-eth",
46 .id = -1,
47 .dev = {
48 .platform_data = &micro9_eth_data,
50 .num_resources = ARRAY_SIZE(micro9_eth_resource),
51 .resource = micro9_eth_resource,
54 static void __init micro9_eth_init(void)
56 memcpy(micro9_eth_data.dev_addr,
57 (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
58 platform_device_register(&micro9_eth_device);
61 static void __init micro9_init(void)
63 micro9_eth_init();
67 * Micro9-H
69 #ifdef CONFIG_MACH_MICRO9H
70 static struct physmap_flash_data micro9h_flash_data = {
71 .width = 4,
74 static struct resource micro9h_flash_resource = {
75 .start = 0x10000000,
76 .end = 0x13ffffff,
77 .flags = IORESOURCE_MEM,
80 static struct platform_device micro9h_flash = {
81 .name = "physmap-flash",
82 .id = 0,
83 .dev = {
84 .platform_data = &micro9h_flash_data,
86 .num_resources = 1,
87 .resource = &micro9h_flash_resource,
90 static void __init micro9h_init(void)
92 platform_device_register(&micro9h_flash);
95 static void __init micro9h_init_machine(void)
97 ep93xx_init_devices();
98 micro9_init();
99 micro9h_init();
102 MACHINE_START(MICRO9, "Contec Hypercontrol Micro9-H")
103 /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
104 .phys_io = EP93XX_APB_PHYS_BASE,
105 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
106 .boot_params = 0x00000100,
107 .map_io = ep93xx_map_io,
108 .init_irq = ep93xx_init_irq,
109 .timer = &ep93xx_timer,
110 .init_machine = micro9h_init_machine,
111 MACHINE_END
112 #endif
115 * Micro9-M
117 #ifdef CONFIG_MACH_MICRO9M
118 static void __init micro9m_init_machine(void)
120 ep93xx_init_devices();
121 micro9_init();
124 MACHINE_START(MICRO9M, "Contec Hypercontrol Micro9-M")
125 /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
126 .phys_io = EP93XX_APB_PHYS_BASE,
127 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
128 .boot_params = 0x00000100,
129 .map_io = ep93xx_map_io,
130 .init_irq = ep93xx_init_irq,
131 .timer = &ep93xx_timer,
132 .init_machine = micro9m_init_machine,
133 MACHINE_END
134 #endif
137 * Micro9-L
139 #ifdef CONFIG_MACH_MICRO9L
140 static void __init micro9l_init_machine(void)
142 ep93xx_init_devices();
143 micro9_init();
146 MACHINE_START(MICRO9L, "Contec Hypercontrol Micro9-L")
147 /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
148 .phys_io = EP93XX_APB_PHYS_BASE,
149 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
150 .boot_params = 0x00000100,
151 .map_io = ep93xx_map_io,
152 .init_irq = ep93xx_init_irq,
153 .timer = &ep93xx_timer,
154 .init_machine = micro9l_init_machine,
155 MACHINE_END
156 #endif