Commit | Line | Data |
---|---|---|
d941caa2 MG |
1 | /* |
2 | * linux/arch/arm/mach-ep93xx/micro9.c | |
3 | * | |
4 | * Copyright (C) 2006 Contec Steuerungstechnik & Automation GmbH | |
5 | * Manfred Gruber <manfred.gruber@contec.at> | |
6 | * | |
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. | |
10 | */ | |
11 | ||
d941caa2 | 12 | #include <linux/kernel.h> |
583ddafe | 13 | #include <linux/init.h> |
d941caa2 | 14 | #include <linux/platform_device.h> |
d941caa2 MG |
15 | #include <linux/mtd/physmap.h> |
16 | ||
a09e64fb | 17 | #include <mach/hardware.h> |
d941caa2 | 18 | |
d941caa2 | 19 | #include <asm/mach-types.h> |
583ddafe HS |
20 | #include <asm/mach/arch.h> |
21 | ||
d941caa2 MG |
22 | |
23 | static struct ep93xx_eth_data micro9_eth_data = { | |
e48f3fa3 | 24 | .phy_id = 0x1f, |
d941caa2 MG |
25 | }; |
26 | ||
d941caa2 MG |
27 | static void __init micro9_init(void) |
28 | { | |
a0a08fdc | 29 | ep93xx_register_eth(µ9_eth_data, 1); |
d941caa2 MG |
30 | } |
31 | ||
32 | /* | |
33 | * Micro9-H | |
34 | */ | |
35 | #ifdef CONFIG_MACH_MICRO9H | |
36 | static struct physmap_flash_data micro9h_flash_data = { | |
e48f3fa3 | 37 | .width = 4, |
d941caa2 MG |
38 | }; |
39 | ||
40 | static struct resource micro9h_flash_resource = { | |
e48f3fa3 HS |
41 | .start = EP93XX_CS1_PHYS_BASE, |
42 | .end = EP93XX_CS1_PHYS_BASE + SZ_64M - 1, | |
43 | .flags = IORESOURCE_MEM, | |
d941caa2 MG |
44 | }; |
45 | ||
46 | static struct platform_device micro9h_flash = { | |
e48f3fa3 HS |
47 | .name = "physmap-flash", |
48 | .id = 0, | |
49 | .dev = { | |
50 | .platform_data = µ9h_flash_data, | |
51 | }, | |
52 | .num_resources = 1, | |
53 | .resource = µ9h_flash_resource, | |
d941caa2 MG |
54 | }; |
55 | ||
56 | static void __init micro9h_init(void) | |
57 | { | |
e48f3fa3 | 58 | platform_device_register(µ9h_flash); |
d941caa2 MG |
59 | } |
60 | ||
61 | static void __init micro9h_init_machine(void) | |
62 | { | |
e48f3fa3 HS |
63 | ep93xx_init_devices(); |
64 | micro9_init(); | |
65 | micro9h_init(); | |
d941caa2 MG |
66 | } |
67 | ||
68 | MACHINE_START(MICRO9, "Contec Hypercontrol Micro9-H") | |
e48f3fa3 HS |
69 | /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */ |
70 | .phys_io = EP93XX_APB_PHYS_BASE, | |
71 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | |
72 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, | |
73 | .map_io = ep93xx_map_io, | |
74 | .init_irq = ep93xx_init_irq, | |
75 | .timer = &ep93xx_timer, | |
76 | .init_machine = micro9h_init_machine, | |
d941caa2 MG |
77 | MACHINE_END |
78 | #endif | |
79 | ||
80 | /* | |
81 | * Micro9-M | |
82 | */ | |
83 | #ifdef CONFIG_MACH_MICRO9M | |
84 | static void __init micro9m_init_machine(void) | |
85 | { | |
e48f3fa3 HS |
86 | ep93xx_init_devices(); |
87 | micro9_init(); | |
d941caa2 MG |
88 | } |
89 | ||
90 | MACHINE_START(MICRO9M, "Contec Hypercontrol Micro9-M") | |
e48f3fa3 HS |
91 | /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */ |
92 | .phys_io = EP93XX_APB_PHYS_BASE, | |
93 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | |
94 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, | |
95 | .map_io = ep93xx_map_io, | |
96 | .init_irq = ep93xx_init_irq, | |
97 | .timer = &ep93xx_timer, | |
98 | .init_machine = micro9m_init_machine, | |
d941caa2 MG |
99 | MACHINE_END |
100 | #endif | |
101 | ||
102 | /* | |
103 | * Micro9-L | |
104 | */ | |
105 | #ifdef CONFIG_MACH_MICRO9L | |
106 | static void __init micro9l_init_machine(void) | |
107 | { | |
e48f3fa3 HS |
108 | ep93xx_init_devices(); |
109 | micro9_init(); | |
d941caa2 MG |
110 | } |
111 | ||
112 | MACHINE_START(MICRO9L, "Contec Hypercontrol Micro9-L") | |
e48f3fa3 HS |
113 | /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */ |
114 | .phys_io = EP93XX_APB_PHYS_BASE, | |
115 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | |
116 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, | |
117 | .map_io = ep93xx_map_io, | |
118 | .init_irq = ep93xx_init_irq, | |
119 | .timer = &ep93xx_timer, | |
120 | .init_machine = micro9l_init_machine, | |
d941caa2 MG |
121 | MACHINE_END |
122 | #endif | |
123 |