aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2009-04-05 06:40:41 -0400
committerGeert Uytterhoeven <geert@linux-m68k.org>2010-05-17 15:37:42 -0400
commit0d305464aefff342c85b4db8b3d7a4345246e5a1 (patch)
treec3cd06f58d7cf126500258d0a8fc531bd3ed4da2 /arch/m68k
parentbf54a2b3c0dbf76136f00ff785bf6d8f6291311d (diff)
m68k: amiga - Zorro host bridge platform device conversion
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/amiga/Makefile2
-rw-r--r--arch/m68k/amiga/platform.c58
2 files changed, 59 insertions, 1 deletions
diff --git a/arch/m68k/amiga/Makefile b/arch/m68k/amiga/Makefile
index 6a0d7650f980..11dd30b16b3b 100644
--- a/arch/m68k/amiga/Makefile
+++ b/arch/m68k/amiga/Makefile
@@ -2,6 +2,6 @@
2# Makefile for Linux arch/m68k/amiga source directory 2# Makefile for Linux arch/m68k/amiga source directory
3# 3#
4 4
5obj-y := config.o amiints.o cia.o chipram.o amisound.o 5obj-y := config.o amiints.o cia.o chipram.o amisound.o platform.o
6 6
7obj-$(CONFIG_AMIGA_PCMCIA) += pcmcia.o 7obj-$(CONFIG_AMIGA_PCMCIA) += pcmcia.o
diff --git a/arch/m68k/amiga/platform.c b/arch/m68k/amiga/platform.c
new file mode 100644
index 000000000000..33a7669b4415
--- /dev/null
+++ b/arch/m68k/amiga/platform.c
@@ -0,0 +1,58 @@
1/*
2 * Copyright (C) 2007-2009 Geert Uytterhoeven
3 *
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
6 * for more details.
7 */
8
9#include <linux/init.h>
10#include <linux/platform_device.h>
11#include <linux/zorro.h>
12
13#include <asm/amigahw.h>
14
15
16#ifdef CONFIG_ZORRO
17
18static const struct resource zorro_resources[] __initconst = {
19 /* Zorro II regions (on Zorro II/III) */
20 {
21 .name = "Zorro II exp",
22 .start = 0x00e80000,
23 .end = 0x00efffff,
24 .flags = IORESOURCE_MEM,
25 }, {
26 .name = "Zorro II mem",
27 .start = 0x00200000,
28 .end = 0x009fffff,
29 .flags = IORESOURCE_MEM,
30 },
31 /* Zorro III regions (on Zorro III only) */
32 {
33 .name = "Zorro III exp",
34 .start = 0xff000000,
35 .end = 0xffffffff,
36 .flags = IORESOURCE_MEM,
37 }, {
38 .name = "Zorro III cfg",
39 .start = 0x40000000,
40 .end = 0x7fffffff,
41 .flags = IORESOURCE_MEM,
42 }
43};
44
45
46static int __init amiga_init_bus(void)
47{
48 if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(ZORRO))
49 return -ENODEV;
50
51 platform_device_register_simple("amiga-zorro", -1, zorro_resources,
52 AMIGAHW_PRESENT(ZORRO3) ? 4 : 2);
53 return 0;
54}
55
56subsys_initcall(amiga_init_bus);
57
58#endif /* CONFIG_ZORRO */