diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2006-09-18 18:12:53 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-09-25 05:25:37 -0400 |
commit | 7ae1f7ec525c32db441836ab0ab010b85cb819a2 (patch) | |
tree | 25d87bd43198bdc3868c20cf3e8d44e8e343f0e6 /arch/arm/mach-iop33x | |
parent | 3f7e5815f4b774270e6506962de37af85aa9c830 (diff) |
[ARM] 3818/1: iop3xx: introduce arch/arm/plat-iop for shared iop32x/iop33x code
Introduce the arch/arm/plat-iop directory, for code shared between the
iop32x and iop33x, and move the common memory map setup bits there.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-iop33x')
-rw-r--r-- | arch/arm/mach-iop33x/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/mach-iop33x/iq80331-mm.c | 35 | ||||
-rw-r--r-- | arch/arm/mach-iop33x/iq80332-mm.c | 35 | ||||
-rw-r--r-- | arch/arm/mach-iop33x/setup.c | 35 |
4 files changed, 5 insertions, 104 deletions
diff --git a/arch/arm/mach-iop33x/Makefile b/arch/arm/mach-iop33x/Makefile index 0f1a8fffe187..7865923b0a60 100644 --- a/arch/arm/mach-iop33x/Makefile +++ b/arch/arm/mach-iop33x/Makefile | |||
@@ -7,5 +7,5 @@ obj-m := | |||
7 | obj-n := | 7 | obj-n := |
8 | obj- := | 8 | obj- := |
9 | 9 | ||
10 | obj-$(CONFIG_ARCH_IQ80331) += iq80331-mm.o iq80331-pci.o | 10 | obj-$(CONFIG_ARCH_IQ80331) += iq80331-pci.o |
11 | obj-$(CONFIG_MACH_IQ80332) += iq80332-mm.o iq80332-pci.o | 11 | obj-$(CONFIG_MACH_IQ80332) += iq80332-pci.o |
diff --git a/arch/arm/mach-iop33x/iq80331-mm.c b/arch/arm/mach-iop33x/iq80331-mm.c deleted file mode 100644 index eb59445a0fca..000000000000 --- a/arch/arm/mach-iop33x/iq80331-mm.c +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-iop33x/iq80331-mm.c | ||
3 | * | ||
4 | * Low level memory initialization for iq80331 platform | ||
5 | * | ||
6 | * Author: Dave Jiang <dave.jiang@intel.com> | ||
7 | * Copyright (C) 2003 Intel Corp. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #include <linux/mm.h> | ||
17 | #include <linux/init.h> | ||
18 | |||
19 | #include <asm/io.h> | ||
20 | #include <asm/pgtable.h> | ||
21 | #include <asm/page.h> | ||
22 | |||
23 | #include <asm/mach/map.h> | ||
24 | |||
25 | |||
26 | /* | ||
27 | * IQ80331 specific IO mappings | ||
28 | * | ||
29 | * We use RedBoot's setup for the onboard devices. | ||
30 | */ | ||
31 | |||
32 | void __init iq80331_map_io(void) | ||
33 | { | ||
34 | iop331_map_io(); | ||
35 | } | ||
diff --git a/arch/arm/mach-iop33x/iq80332-mm.c b/arch/arm/mach-iop33x/iq80332-mm.c deleted file mode 100644 index f7bc73113ea8..000000000000 --- a/arch/arm/mach-iop33x/iq80332-mm.c +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-iop33x/iq80332-mm.c | ||
3 | * | ||
4 | * Low level memory initialization for iq80332 platform | ||
5 | * | ||
6 | * Author: Dave Jiang <dave.jiang@intel.com> | ||
7 | * Copyright (C) 2004 Intel Corp. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #include <linux/mm.h> | ||
17 | #include <linux/init.h> | ||
18 | |||
19 | #include <asm/io.h> | ||
20 | #include <asm/pgtable.h> | ||
21 | #include <asm/page.h> | ||
22 | |||
23 | #include <asm/mach/map.h> | ||
24 | |||
25 | |||
26 | /* | ||
27 | * IQ80332 specific IO mappings | ||
28 | * | ||
29 | * We use RedBoot's setup for the onboard devices. | ||
30 | */ | ||
31 | |||
32 | void __init iq80332_map_io(void) | ||
33 | { | ||
34 | iop331_map_io(); | ||
35 | } | ||
diff --git a/arch/arm/mach-iop33x/setup.c b/arch/arm/mach-iop33x/setup.c index c14c7da5ec4c..67cb21cb0ad9 100644 --- a/arch/arm/mach-iop33x/setup.c +++ b/arch/arm/mach-iop33x/setup.c | |||
@@ -28,26 +28,10 @@ | |||
28 | #include <asm/hardware.h> | 28 | #include <asm/hardware.h> |
29 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
31 | #include <asm/hardware/iop3xx.h> | ||
31 | 32 | ||
32 | #define IOP331_UART_XTAL 33334000 | 33 | #define IOP331_UART_XTAL 33334000 |
33 | 34 | ||
34 | /* | ||
35 | * Standard IO mapping for all IOP331 based systems | ||
36 | */ | ||
37 | static struct map_desc iop331_std_desc[] __initdata = { | ||
38 | { /* mem mapped registers */ | ||
39 | .virtual = IOP331_VIRT_MEM_BASE, | ||
40 | .pfn = __phys_to_pfn(IOP331_PHYS_MEM_BASE), | ||
41 | .length = 0x00002000, | ||
42 | .type = MT_DEVICE | ||
43 | }, { /* PCI IO space */ | ||
44 | .virtual = IOP331_PCI_LOWER_IO_VA, | ||
45 | .pfn = __phys_to_pfn(IOP331_PCI_LOWER_IO_PA), | ||
46 | .length = IOP331_PCI_IO_WINDOW_SIZE, | ||
47 | .type = MT_DEVICE | ||
48 | } | ||
49 | }; | ||
50 | |||
51 | static struct resource iop33x_uart0_resources[] = { | 35 | static struct resource iop33x_uart0_resources[] = { |
52 | [0] = { | 36 | [0] = { |
53 | .start = IOP331_UART0_PHYS, | 37 | .start = IOP331_UART0_PHYS, |
@@ -172,30 +156,17 @@ void __init iop33x_init(void) | |||
172 | } | 156 | } |
173 | } | 157 | } |
174 | 158 | ||
175 | void __init iop331_map_io(void) | ||
176 | { | ||
177 | iotable_init(iop331_std_desc, ARRAY_SIZE(iop331_std_desc)); | ||
178 | } | ||
179 | |||
180 | #ifdef CONFIG_ARCH_IOP33X | 159 | #ifdef CONFIG_ARCH_IOP33X |
181 | extern void iop331_init_irq(void); | 160 | extern void iop331_init_irq(void); |
182 | extern struct sys_timer iop331_timer; | 161 | extern struct sys_timer iop331_timer; |
183 | #endif | 162 | #endif |
184 | 163 | ||
185 | #ifdef CONFIG_ARCH_IQ80331 | ||
186 | extern void iq80331_map_io(void); | ||
187 | #endif | ||
188 | |||
189 | #ifdef CONFIG_MACH_IQ80332 | ||
190 | extern void iq80332_map_io(void); | ||
191 | #endif | ||
192 | |||
193 | #if defined(CONFIG_ARCH_IQ80331) | 164 | #if defined(CONFIG_ARCH_IQ80331) |
194 | MACHINE_START(IQ80331, "Intel IQ80331") | 165 | MACHINE_START(IQ80331, "Intel IQ80331") |
195 | /* Maintainer: Intel Corp. */ | 166 | /* Maintainer: Intel Corp. */ |
196 | .phys_io = 0xfefff000, | 167 | .phys_io = 0xfefff000, |
197 | .io_pg_offst = ((0xfffff000) >> 18) & 0xfffc, // virtual, physical | 168 | .io_pg_offst = ((0xfffff000) >> 18) & 0xfffc, // virtual, physical |
198 | .map_io = iq80331_map_io, | 169 | .map_io = iop3xx_map_io, |
199 | .init_irq = iop331_init_irq, | 170 | .init_irq = iop331_init_irq, |
200 | .timer = &iop331_timer, | 171 | .timer = &iop331_timer, |
201 | .boot_params = 0x0100, | 172 | .boot_params = 0x0100, |
@@ -207,7 +178,7 @@ MACHINE_START(IQ80332, "Intel IQ80332") | |||
207 | /* Maintainer: Intel Corp. */ | 178 | /* Maintainer: Intel Corp. */ |
208 | .phys_io = 0xfefff000, | 179 | .phys_io = 0xfefff000, |
209 | .io_pg_offst = ((0xfffff000) >> 18) & 0xfffc, // virtual, physical | 180 | .io_pg_offst = ((0xfffff000) >> 18) & 0xfffc, // virtual, physical |
210 | .map_io = iq80332_map_io, | 181 | .map_io = iop3xx_map_io, |
211 | .init_irq = iop331_init_irq, | 182 | .init_irq = iop331_init_irq, |
212 | .timer = &iop331_timer, | 183 | .timer = &iop331_timer, |
213 | .boot_params = 0x0100, | 184 | .boot_params = 0x0100, |