2 * Copyright (C) 2007-2009 Geert Uytterhoeven
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file COPYING in the main directory of this archive
9 #include <linux/init.h>
10 #include <linux/platform_device.h>
11 #include <linux/zorro.h>
13 #include <asm/amigahw.h>
18 static const struct resource zorro_resources[] __initconst = {
19 /* Zorro II regions (on Zorro II/III) */
21 .name = "Zorro II exp",
24 .flags = IORESOURCE_MEM,
26 .name = "Zorro II mem",
29 .flags = IORESOURCE_MEM,
31 /* Zorro III regions (on Zorro III only) */
33 .name = "Zorro III exp",
36 .flags = IORESOURCE_MEM,
38 .name = "Zorro III cfg",
41 .flags = IORESOURCE_MEM,
46 static int __init amiga_init_bus(void)
48 if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(ZORRO))
51 platform_device_register_simple("amiga-zorro", -1, zorro_resources,
52 AMIGAHW_PRESENT(ZORRO3) ? 4 : 2);
56 subsys_initcall(amiga_init_bus);
58 #endif /* CONFIG_ZORRO */
61 static int __init amiga_init_devices(void)
67 if (AMIGAHW_PRESENT(AMI_VIDEO))
68 platform_device_register_simple("amiga-video", -1, NULL, 0);
72 if (AMIGAHW_PRESENT(AMI_AUDIO))
73 platform_device_register_simple("amiga-audio", -1, NULL, 0);
76 /* storage interfaces */
77 if (AMIGAHW_PRESENT(AMI_FLOPPY))
78 platform_device_register_simple("amiga-floppy", -1, NULL, 0);
83 device_initcall(amiga_init_devices);