diff options
Diffstat (limited to 'include/asm-powerpc/fs_pd.h')
-rw-r--r-- | include/asm-powerpc/fs_pd.h | 49 |
1 files changed, 40 insertions, 9 deletions
diff --git a/include/asm-powerpc/fs_pd.h b/include/asm-powerpc/fs_pd.h index 3d0e819d37f1..c624915b757e 100644 --- a/include/asm-powerpc/fs_pd.h +++ b/include/asm-powerpc/fs_pd.h | |||
@@ -11,19 +11,17 @@ | |||
11 | 11 | ||
12 | #ifndef FS_PD_H | 12 | #ifndef FS_PD_H |
13 | #define FS_PD_H | 13 | #define FS_PD_H |
14 | #include <asm/cpm2.h> | ||
15 | #include <sysdev/fsl_soc.h> | 14 | #include <sysdev/fsl_soc.h> |
16 | #include <asm/time.h> | 15 | #include <asm/time.h> |
17 | 16 | ||
18 | static inline int uart_baudrate(void) | 17 | #ifdef CONFIG_CPM2 |
19 | { | 18 | #include <asm/cpm2.h> |
20 | return get_baudrate(); | ||
21 | } | ||
22 | 19 | ||
23 | static inline int uart_clock(void) | 20 | #if defined(CONFIG_8260) |
24 | { | 21 | #include <asm/mpc8260.h> |
25 | return ppc_proc_freq; | 22 | #elif defined(CONFIG_85xx) |
26 | } | 23 | #include <asm/mpc85xx.h> |
24 | #endif | ||
27 | 25 | ||
28 | #define cpm2_map(member) \ | 26 | #define cpm2_map(member) \ |
29 | ({ \ | 27 | ({ \ |
@@ -41,5 +39,38 @@ static inline int uart_clock(void) | |||
41 | }) | 39 | }) |
42 | 40 | ||
43 | #define cpm2_unmap(addr) iounmap(addr) | 41 | #define cpm2_unmap(addr) iounmap(addr) |
42 | #endif | ||
43 | |||
44 | #ifdef CONFIG_8xx | ||
45 | #include <asm/8xx_immap.h> | ||
46 | #include <asm/mpc8xx.h> | ||
47 | |||
48 | #define immr_map(member) \ | ||
49 | ({ \ | ||
50 | u32 offset = offsetof(immap_t, member); \ | ||
51 | void *addr = ioremap (IMAP_ADDR + offset, \ | ||
52 | sizeof( ((immap_t*)0)->member)); \ | ||
53 | addr; \ | ||
54 | }) | ||
55 | |||
56 | #define immr_map_size(member, size) \ | ||
57 | ({ \ | ||
58 | u32 offset = offsetof(immap_t, member); \ | ||
59 | void *addr = ioremap (IMAP_ADDR + offset, size); \ | ||
60 | addr; \ | ||
61 | }) | ||
62 | |||
63 | #define immr_unmap(addr) iounmap(addr) | ||
64 | #endif | ||
65 | |||
66 | static inline int uart_baudrate(void) | ||
67 | { | ||
68 | return get_baudrate(); | ||
69 | } | ||
70 | |||
71 | static inline int uart_clock(void) | ||
72 | { | ||
73 | return ppc_proc_freq; | ||
74 | } | ||
44 | 75 | ||
45 | #endif | 76 | #endif |