2 * Platform information definitions for the CPM Uart driver.
4 * 2006 (c) MontaVista Software, Inc.
5 * Vitaly Bordug <vbordug@ru.mvista.com>
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.
15 #include <asm/types.h>
27 static inline int fs_uart_id_scc2fsid(int id
)
29 return fsid_scc1_uart
+ id
- 1;
32 static inline int fs_uart_id_fsid2scc(int id
)
34 return id
- fsid_scc1_uart
+ 1;
37 static inline int fs_uart_id_smc2fsid(int id
)
39 return fsid_smc1_uart
+ id
- 1;
42 static inline int fs_uart_id_fsid2smc(int id
)
44 return id
- fsid_smc1_uart
+ 1;
47 struct fs_uart_platform_info
{
48 void(*init_ioports
)(struct fs_uart_platform_info
*);
49 /* device specific information */
50 int fs_no
; /* controller index */
51 char fs_type
[4]; /* controller type */
62 static inline int fs_uart_get_id(struct fs_uart_platform_info
*fpi
)
64 if(strstr(fpi
->fs_type
, "SMC"))
65 return fs_uart_id_smc2fsid(fpi
->fs_no
);
66 if(strstr(fpi
->fs_type
, "SCC"))
67 return fs_uart_id_scc2fsid(fpi
->fs_no
);
This page took 0.031243 seconds and 5 git commands to generate.