]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: picoxcell: move io mappings to common.c
authorJamie Iles <jamie@jamieiles.com>
Mon, 12 Dec 2011 20:21:39 +0000 (20:21 +0000)
committerJamie Iles <jamie@jamieiles.com>
Sun, 18 Dec 2011 10:48:20 +0000 (10:48 +0000)
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>
arch/arm/mach-picoxcell/Makefile
arch/arm/mach-picoxcell/common.c
arch/arm/mach-picoxcell/common.h
arch/arm/mach-picoxcell/io.c [deleted file]

index c550b6363488267ba7cbc0cc52f8ad036d1f061b..e5ec4a8d9bcb39e370a26742e237d3896dc0a20d 100644 (file)
@@ -1,3 +1,2 @@
 obj-y  := common.o
 obj-y  += time.o
-obj-y  += io.o
index d34b3335801e5d9302b37c561b139a3eef780217..febee47bc116295ccbacbb173b1acabb5c1b07e2 100644 (file)
 
 #include <asm/mach/arch.h>
 #include <asm/hardware/vic.h>
+#include <asm/mach/map.h>
 
 #include <mach/map.h>
 #include <mach/picoxcell_soc.h>
 
 #include "common.h"
 
+static struct map_desc io_map __initdata = {
+       .virtual        = PHYS_TO_IO(PICOXCELL_PERIPH_BASE),
+       .pfn            = __phys_to_pfn(PICOXCELL_PERIPH_BASE),
+       .length         = PICOXCELL_PERIPH_LENGTH,
+       .type           = MT_DEVICE,
+};
+
+static void __init picoxcell_map_io(void)
+{
+       iotable_init(&io_map, 1);
+}
+
 static void __init picoxcell_init_machine(void)
 {
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
index 5263f0fa095c82903680d319cdc1c1362272516f..83d55ab956a49882979cd220507aa6327645c0e9 100644 (file)
@@ -13,6 +13,5 @@
 #include <asm/mach/time.h>
 
 extern struct sys_timer picoxcell_timer;
-extern void picoxcell_map_io(void);
 
 #endif /* __PICOXCELL_COMMON_H__ */
diff --git a/arch/arm/mach-picoxcell/io.c b/arch/arm/mach-picoxcell/io.c
deleted file mode 100644 (file)
index 39e9b9e..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2011 Picochip Ltd., Jamie Iles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * All enquiries to support@picochip.com
- */
-#include <linux/io.h>
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/of.h>
-
-#include <asm/mach/map.h>
-
-#include <mach/map.h>
-#include <mach/picoxcell_soc.h>
-
-#include "common.h"
-
-void __init picoxcell_map_io(void)
-{
-       struct map_desc io_map = {
-               .virtual        = PHYS_TO_IO(PICOXCELL_PERIPH_BASE),
-               .pfn            = __phys_to_pfn(PICOXCELL_PERIPH_BASE),
-               .length         = PICOXCELL_PERIPH_LENGTH,
-               .type           = MT_DEVICE,
-       };
-
-       iotable_init(&io_map, 1);
-}