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