aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/fs_pd.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-09-27 17:18:28 -0400
committerPaul Mackerras <paulus@samba.org>2006-09-27 17:18:28 -0400
commit4e6d816e51728d5006c53e78e079ac62b902f8aa (patch)
treed388c87dabc063c08c52d17610738d2f49b3855c /include/asm-powerpc/fs_pd.h
parentd86d9b8cab45adf64e2ea8fe975bec3282b5de81 (diff)
parent611a15afcdaacec6efba984c7eb089b853564bdf (diff)
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/vitb/linux-2.6-PQ
Diffstat (limited to 'include/asm-powerpc/fs_pd.h')
-rw-r--r--include/asm-powerpc/fs_pd.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/include/asm-powerpc/fs_pd.h b/include/asm-powerpc/fs_pd.h
new file mode 100644
index 000000000000..3d0e819d37f1
--- /dev/null
+++ b/include/asm-powerpc/fs_pd.h
@@ -0,0 +1,45 @@
1/*
2 * Platform information definitions.
3 *
4 * 2006 (c) MontaVista Software, Inc.
5 * Vitaly Bordug <vbordug@ru.mvista.com>
6 *
7 * This file is licensed under the terms of the GNU General Public License
8 * version 2. This program is licensed "as is" without any warranty of any
9 * kind, whether express or implied.
10 */
11
12#ifndef FS_PD_H
13#define FS_PD_H
14#include <asm/cpm2.h>
15#include <sysdev/fsl_soc.h>
16#include <asm/time.h>
17
18static inline int uart_baudrate(void)
19{
20 return get_baudrate();
21}
22
23static inline int uart_clock(void)
24{
25 return ppc_proc_freq;
26}
27
28#define cpm2_map(member) \
29({ \
30 u32 offset = offsetof(cpm2_map_t, member); \
31 void *addr = ioremap (CPM_MAP_ADDR + offset, \
32 sizeof( ((cpm2_map_t*)0)->member)); \
33 addr; \
34})
35
36#define cpm2_map_size(member, size) \
37({ \
38 u32 offset = offsetof(cpm2_map_t, member); \
39 void *addr = ioremap (CPM_MAP_ADDR + offset, size); \
40 addr; \
41})
42
43#define cpm2_unmap(addr) iounmap(addr)
44
45#endif