[PATCH] powerpc: uninline of_iomap function
Christian Krafft
krafft at de.ibm.com
Wed Apr 25 01:32:02 EST 2007
From: Christian Krafft <krafft at de.ibm.com>
There is no big reason to have that function inlined.
Signed-off-by: Christian Krafft <krafft at de.ibm.com>
Index: linux-2.6.21-rc4/arch/powerpc/kernel/prom_parse.c
===================================================================
--- linux-2.6.21-rc4.orig/arch/powerpc/kernel/prom_parse.c
+++ linux-2.6.21-rc4/arch/powerpc/kernel/prom_parse.c
@@ -1042,3 +1042,15 @@ const void *of_get_mac_address(struct de
}
EXPORT_SYMBOL(of_get_mac_address);
+void __iomem *of_iomap(struct device_node *np, int index)
+{
+ struct resource res;
+
+ if (of_address_to_resource(np, index, &res))
+ return NULL;
+
+ return ioremap(res.start, 1 + res.end - res.start);
+}
+EXPORT_SYMBOL(of_iomap);
+
+
Index: linux-2.6.21-rc4/include/asm-powerpc/prom.h
===================================================================
--- linux-2.6.21-rc4.orig/include/asm-powerpc/prom.h
+++ linux-2.6.21-rc4/include/asm-powerpc/prom.h
@@ -19,7 +19,6 @@
#include <linux/proc_fs.h>
#include <linux/platform_device.h>
#include <asm/atomic.h>
-#include <asm/io.h>
/* Definitions used by the flattened device tree */
#define OF_DT_HEADER 0xd00dfeed /* marker */
@@ -352,16 +351,14 @@ static inline int of_irq_to_resource(str
return irq;
}
-static inline void __iomem *of_iomap(struct device_node *np, int index)
-{
- struct resource res;
-
- if (of_address_to_resource(np, index, &res))
- return NULL;
-
- return ioremap(res.start, 1 + res.end - res.start);
-}
-
+/**
+ * of_iomap - Maps the memory mapped IO for a given device_node
+ * @device: the device whose io range will be mapped
+ * @index: index of the io range
+ *
+ * Returns a pointer to the mapped memory
+ */
+extern void __iomem *of_iomap(struct device_node *device, int index);
#endif /* __KERNEL__ */
#endif /* _POWERPC_PROM_H */
--
Mit freundlichen Gruessen,
kind regards,
Christian Krafft
IBM Systems & Technology Group,
Linux Kernel Development
IT Specialist
Vorsitzender des Aufsichtsrats: Johann Weihen
Geschaeftsfuehrung: Herbert Kircher
Sitz der Gesellschaft: Boeblingen
Registriergericht: Amtsgericht Stuttgart, HRB 243294
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20070424/3ab85a79/attachment.pgp>
More information about the Linuxppc-dev
mailing list