summaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/fs_pd.h
diff options
context:
space:
mode:
authorVitaly Bordug <vbordug@ru.mvista.com>2007-01-24 22:41:24 +0300
committerPaul Mackerras <paulus@samba.org>2007-02-07 14:03:17 +1100
commitf2a0bd3753dad7ea4605ebd5435716b39e9f92bb (patch)
treef14b6a7b9e3588a388be0f2b6602284c49c026e4 /include/asm-powerpc/fs_pd.h
parent88bdc6f061cfb4579d2327fd457d4b7807525a0e (diff)
downloadlinux-f2a0bd3753dad7ea4605ebd5435716b39e9f92bb.tar.gz
linux-f2a0bd3753dad7ea4605ebd5435716b39e9f92bb.tar.bz2
linux-f2a0bd3753dad7ea4605ebd5435716b39e9f92bb.zip
[POWERPC] 8xx: powerpc port of core CPM PIC
This covers common CPM access functions, CPM interrupt controller code, micropatch and a few compatibility things to kee the same driver base working with arch/ppc. This version is refined with all the comments (mostly PIC-related) addressed. Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/fs_pd.h')
-rw-r--r--include/asm-powerpc/fs_pd.h45
1 files changed, 35 insertions, 10 deletions
diff --git a/include/asm-powerpc/fs_pd.h b/include/asm-powerpc/fs_pd.h
index 3d0e819d37f1..1e2962fc4fa8 100644
--- a/include/asm-powerpc/fs_pd.h
+++ b/include/asm-powerpc/fs_pd.h
@@ -11,19 +11,11 @@
#ifndef FS_PD_H
#define FS_PD_H
-#include <asm/cpm2.h>
#include <sysdev/fsl_soc.h>
#include <asm/time.h>
-static inline int uart_baudrate(void)
-{
- return get_baudrate();
-}
-
-static inline int uart_clock(void)
-{
- return ppc_proc_freq;
-}
+#ifdef CONFIG_CPM2
+#include <asm/cpm2.h>
#define cpm2_map(member) \
({ \
@@ -41,5 +33,38 @@ static inline int uart_clock(void)
})
#define cpm2_unmap(addr) iounmap(addr)
+#endif
+
+#ifdef CONFIG_8xx
+#include <asm/8xx_immap.h>
+#include <asm/mpc8xx.h>
+
+#define immr_map(member) \
+({ \
+ u32 offset = offsetof(immap_t, member); \
+ void *addr = ioremap (IMAP_ADDR + offset, \
+ sizeof( ((immap_t*)0)->member)); \
+ addr; \
+})
+
+#define immr_map_size(member, size) \
+({ \
+ u32 offset = offsetof(immap_t, member); \
+ void *addr = ioremap (IMAP_ADDR + offset, size); \
+ addr; \
+})
+
+#define immr_unmap(addr) iounmap(addr)
+#endif
+
+static inline int uart_baudrate(void)
+{
+ return get_baudrate();
+}
+
+static inline int uart_clock(void)
+{
+ return ppc_proc_freq;
+}
#endif