aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/amiga/platform.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-06-26 13:27:00 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-26 13:27:00 -0400
commitc67dda14389205f0a223c5089307495290939b3b (patch)
treefad0bb26b28703d02a22ebdd44d94eabac4a2ade /arch/m68k/amiga/platform.c
parent43bc2db47292a824152145253b1dd2847e7312a3 (diff)
parent7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff)
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'arch/m68k/amiga/platform.c')
-rw-r--r--arch/m68k/amiga/platform.c116
1 files changed, 115 insertions, 1 deletions
diff --git a/arch/m68k/amiga/platform.c b/arch/m68k/amiga/platform.c
index 38f18bf14737..7fd8b41723ea 100644
--- a/arch/m68k/amiga/platform.c
+++ b/arch/m68k/amiga/platform.c
@@ -11,6 +11,7 @@
11#include <linux/zorro.h> 11#include <linux/zorro.h>
12 12
13#include <asm/amigahw.h> 13#include <asm/amigahw.h>
14#include <asm/amigayle.h>
14 15
15 16
16#ifdef CONFIG_ZORRO 17#ifdef CONFIG_ZORRO
@@ -55,11 +56,77 @@ static int __init amiga_init_bus(void)
55 56
56subsys_initcall(amiga_init_bus); 57subsys_initcall(amiga_init_bus);
57 58
58#endif /* CONFIG_ZORRO */ 59
60static int z_dev_present(zorro_id id)
61{
62 unsigned int i;
63
64 for (i = 0; i < zorro_num_autocon; i++)
65 if (zorro_autocon[i].rom.er_Manufacturer == ZORRO_MANUF(id) &&
66 zorro_autocon[i].rom.er_Product == ZORRO_PROD(id))
67 return 1;
68
69 return 0;
70}
71
72#else /* !CONFIG_ZORRO */
73
74static inline int z_dev_present(zorro_id id) { return 0; }
75
76#endif /* !CONFIG_ZORRO */
77
78
79static const struct resource a3000_scsi_resource __initconst = {
80 .start = 0xdd0000,
81 .end = 0xdd00ff,
82 .flags = IORESOURCE_MEM,
83};
84
85
86static const struct resource a4000t_scsi_resource __initconst = {
87 .start = 0xdd0000,
88 .end = 0xdd0fff,
89 .flags = IORESOURCE_MEM,
90};
91
92
93static const struct resource a1200_ide_resource __initconst = {
94 .start = 0xda0000,
95 .end = 0xda1fff,
96 .flags = IORESOURCE_MEM,
97};
98
99static const struct gayle_ide_platform_data a1200_ide_pdata __initconst = {
100 .base = 0xda0000,
101 .irqport = 0xda9000,
102 .explicit_ack = 1,
103};
104
105
106static const struct resource a4000_ide_resource __initconst = {
107 .start = 0xdd2000,
108 .end = 0xdd3fff,
109 .flags = IORESOURCE_MEM,
110};
111
112static const struct gayle_ide_platform_data a4000_ide_pdata __initconst = {
113 .base = 0xdd2020,
114 .irqport = 0xdd3020,
115 .explicit_ack = 0,
116};
117
118
119static const struct resource amiga_rtc_resource __initconst = {
120 .start = 0x00dc0000,
121 .end = 0x00dcffff,
122 .flags = IORESOURCE_MEM,
123};
59 124
60 125
61static int __init amiga_init_devices(void) 126static int __init amiga_init_devices(void)
62{ 127{
128 struct platform_device *pdev;
129
63 if (!MACH_IS_AMIGA) 130 if (!MACH_IS_AMIGA)
64 return -ENODEV; 131 return -ENODEV;
65 132
@@ -77,6 +144,53 @@ static int __init amiga_init_devices(void)
77 if (AMIGAHW_PRESENT(AMI_FLOPPY)) 144 if (AMIGAHW_PRESENT(AMI_FLOPPY))
78 platform_device_register_simple("amiga-floppy", -1, NULL, 0); 145 platform_device_register_simple("amiga-floppy", -1, NULL, 0);
79 146
147 if (AMIGAHW_PRESENT(A3000_SCSI))
148 platform_device_register_simple("amiga-a3000-scsi", -1,
149 &a3000_scsi_resource, 1);
150
151 if (AMIGAHW_PRESENT(A4000_SCSI))
152 platform_device_register_simple("amiga-a4000t-scsi", -1,
153 &a4000t_scsi_resource, 1);
154
155 if (AMIGAHW_PRESENT(A1200_IDE) ||
156 z_dev_present(ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530_SCSI_IDE)) {
157 pdev = platform_device_register_simple("amiga-gayle-ide", -1,
158 &a1200_ide_resource, 1);
159 platform_device_add_data(pdev, &a1200_ide_pdata,
160 sizeof(a1200_ide_pdata));
161 }
162
163 if (AMIGAHW_PRESENT(A4000_IDE)) {
164 pdev = platform_device_register_simple("amiga-gayle-ide", -1,
165 &a4000_ide_resource, 1);
166 platform_device_add_data(pdev, &a4000_ide_pdata,
167 sizeof(a4000_ide_pdata));
168 }
169
170
171 /* other I/O hardware */
172 if (AMIGAHW_PRESENT(AMI_KEYBOARD))
173 platform_device_register_simple("amiga-keyboard", -1, NULL, 0);
174
175 if (AMIGAHW_PRESENT(AMI_MOUSE))
176 platform_device_register_simple("amiga-mouse", -1, NULL, 0);
177
178 if (AMIGAHW_PRESENT(AMI_SERIAL))
179 platform_device_register_simple("amiga-serial", -1, NULL, 0);
180
181 if (AMIGAHW_PRESENT(AMI_PARALLEL))
182 platform_device_register_simple("amiga-parallel", -1, NULL, 0);
183
184
185 /* real time clocks */
186 if (AMIGAHW_PRESENT(A2000_CLK))
187 platform_device_register_simple("rtc-msm6242", -1,
188 &amiga_rtc_resource, 1);
189
190 if (AMIGAHW_PRESENT(A3000_CLK))
191 platform_device_register_simple("rtc-rp5c01", -1,
192 &amiga_rtc_resource, 1);
193
80 return 0; 194 return 0;
81} 195}
82 196