diff options
author | Jamie Iles <jamie@jamieiles.com> | 2011-12-12 15:21:39 -0500 |
---|---|---|
committer | Jamie Iles <jamie@jamieiles.com> | 2011-12-18 05:48:20 -0500 |
commit | 8f37a0b49656ed961598351da3ebdd89f2d2e5b4 (patch) | |
tree | 198dd1837c1141b09c2e2acecd713664e393f0a4 /arch | |
parent | 98e27a5c13badb5c56d9d1d6c8ec210753ac1195 (diff) |
ARM: picoxcell: move io mappings to common.c
Now that we have lost our machine specific ioremap() we just have one
mapping that covers all peripherals. Move this to common.c to simplify
things a little.
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-picoxcell/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-picoxcell/common.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-picoxcell/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-picoxcell/io.c | 32 |
4 files changed, 13 insertions, 34 deletions
diff --git a/arch/arm/mach-picoxcell/Makefile b/arch/arm/mach-picoxcell/Makefile index c550b6363488..e5ec4a8d9bcb 100644 --- a/arch/arm/mach-picoxcell/Makefile +++ b/arch/arm/mach-picoxcell/Makefile | |||
@@ -1,3 +1,2 @@ | |||
1 | obj-y := common.o | 1 | obj-y := common.o |
2 | obj-y += time.o | 2 | obj-y += time.o |
3 | obj-y += io.o | ||
diff --git a/arch/arm/mach-picoxcell/common.c b/arch/arm/mach-picoxcell/common.c index d34b3335801e..febee47bc116 100644 --- a/arch/arm/mach-picoxcell/common.c +++ b/arch/arm/mach-picoxcell/common.c | |||
@@ -16,12 +16,25 @@ | |||
16 | 16 | ||
17 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
18 | #include <asm/hardware/vic.h> | 18 | #include <asm/hardware/vic.h> |
19 | #include <asm/mach/map.h> | ||
19 | 20 | ||
20 | #include <mach/map.h> | 21 | #include <mach/map.h> |
21 | #include <mach/picoxcell_soc.h> | 22 | #include <mach/picoxcell_soc.h> |
22 | 23 | ||
23 | #include "common.h" | 24 | #include "common.h" |
24 | 25 | ||
26 | static struct map_desc io_map __initdata = { | ||
27 | .virtual = PHYS_TO_IO(PICOXCELL_PERIPH_BASE), | ||
28 | .pfn = __phys_to_pfn(PICOXCELL_PERIPH_BASE), | ||
29 | .length = PICOXCELL_PERIPH_LENGTH, | ||
30 | .type = MT_DEVICE, | ||
31 | }; | ||
32 | |||
33 | static void __init picoxcell_map_io(void) | ||
34 | { | ||
35 | iotable_init(&io_map, 1); | ||
36 | } | ||
37 | |||
25 | static void __init picoxcell_init_machine(void) | 38 | static void __init picoxcell_init_machine(void) |
26 | { | 39 | { |
27 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 40 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
diff --git a/arch/arm/mach-picoxcell/common.h b/arch/arm/mach-picoxcell/common.h index 5263f0fa095c..83d55ab956a4 100644 --- a/arch/arm/mach-picoxcell/common.h +++ b/arch/arm/mach-picoxcell/common.h | |||
@@ -13,6 +13,5 @@ | |||
13 | #include <asm/mach/time.h> | 13 | #include <asm/mach/time.h> |
14 | 14 | ||
15 | extern struct sys_timer picoxcell_timer; | 15 | extern struct sys_timer picoxcell_timer; |
16 | extern void picoxcell_map_io(void); | ||
17 | 16 | ||
18 | #endif /* __PICOXCELL_COMMON_H__ */ | 17 | #endif /* __PICOXCELL_COMMON_H__ */ |
diff --git a/arch/arm/mach-picoxcell/io.c b/arch/arm/mach-picoxcell/io.c deleted file mode 100644 index 39e9b9e8cc37..000000000000 --- a/arch/arm/mach-picoxcell/io.c +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011 Picochip Ltd., Jamie Iles | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * All enquiries to support@picochip.com | ||
9 | */ | ||
10 | #include <linux/io.h> | ||
11 | #include <linux/mm.h> | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/of.h> | ||
14 | |||
15 | #include <asm/mach/map.h> | ||
16 | |||
17 | #include <mach/map.h> | ||
18 | #include <mach/picoxcell_soc.h> | ||
19 | |||
20 | #include "common.h" | ||
21 | |||
22 | void __init picoxcell_map_io(void) | ||
23 | { | ||
24 | struct map_desc io_map = { | ||
25 | .virtual = PHYS_TO_IO(PICOXCELL_PERIPH_BASE), | ||
26 | .pfn = __phys_to_pfn(PICOXCELL_PERIPH_BASE), | ||
27 | .length = PICOXCELL_PERIPH_LENGTH, | ||
28 | .type = MT_DEVICE, | ||
29 | }; | ||
30 | |||
31 | iotable_init(&io_map, 1); | ||
32 | } | ||