aboutsummaryrefslogtreecommitdiff
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-04-24 11:46:09 +1000
committerPaul Mackerras <paulus@samba.org>2007-04-24 11:46:09 +1000
commitb142eb3a5aa4f4779597b7a913c002287fa6ee08 (patch)
treee4d911c1cace545c766c3429f67d2b39356dbff5 /include/asm-powerpc
parent13177c8b7eaf7ab238e79533c746153ae116f5f8 (diff)
parentc6d344819ea26c4df1cf2572232706667e1d99ea (diff)
Merge branch 'for-2.6.22' of master.kernel.org:/pub/scm/linux/kernel/git/arnd/cell-2.6 into for-2.6.22
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/cell-pmu.h5
-rw-r--r--include/asm-powerpc/prom.h11
2 files changed, 11 insertions, 5 deletions
diff --git a/include/asm-powerpc/cell-pmu.h b/include/asm-powerpc/cell-pmu.h
index 35b95773746..8066eede3a0 100644
--- a/include/asm-powerpc/cell-pmu.h
+++ b/include/asm-powerpc/cell-pmu.h
@@ -97,11 +97,6 @@ extern void cbe_disable_pm_interrupts(u32 cpu);
extern u32 cbe_get_and_clear_pm_interrupts(u32 cpu);
extern void cbe_sync_irq(int node);
-/* Utility functions, macros */
-extern u32 cbe_get_hw_thread_id(int cpu);
-
-#define cbe_cpu_to_node(cpu) ((cpu) >> 1)
-
#define CBE_COUNT_SUPERVISOR_MODE 0
#define CBE_COUNT_HYPERVISOR_MODE 1
#define CBE_COUNT_PROBLEM_MODE 2
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h
index e73a2b482a1..f31af713e6a 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -20,6 +20,7 @@
#include <linux/platform_device.h>
#include <asm/irq.h>
#include <asm/atomic.h>
+#include <asm/io.h>
/* Definitions used by the flattened device tree */
#define OF_DT_HEADER 0xd00dfeed /* marker */
@@ -355,6 +356,16 @@ static inline int of_irq_to_resource(struct device_node *dev, int index, struct
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);
+}
+
#endif /* __KERNEL__ */
#endif /* _POWERPC_PROM_H */