aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs_uart_pd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fs_uart_pd.h')
-rw-r--r--include/linux/fs_uart_pd.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/fs_uart_pd.h b/include/linux/fs_uart_pd.h
index a99a020f95c2..809bb9ffc788 100644
--- a/include/linux/fs_uart_pd.h
+++ b/include/linux/fs_uart_pd.h
@@ -49,6 +49,7 @@ struct fs_uart_platform_info {
49 void(*init_ioports)(struct fs_uart_platform_info *); 49 void(*init_ioports)(struct fs_uart_platform_info *);
50 /* device specific information */ 50 /* device specific information */
51 int fs_no; /* controller index */ 51 int fs_no; /* controller index */
52 char fs_type[4]; /* controller type */
52 u32 uart_clk; 53 u32 uart_clk;
53 u8 tx_num_fifo; 54 u8 tx_num_fifo;
54 u8 tx_buf_size; 55 u8 tx_buf_size;
@@ -59,4 +60,13 @@ struct fs_uart_platform_info {
59 u8 clk_tx; 60 u8 clk_tx;
60}; 61};
61 62
63static inline int fs_uart_get_id(struct fs_uart_platform_info *fpi)
64{
65 if(strstr(fpi->fs_type, "SMC"))
66 return fs_uart_id_smc2fsid(fpi->fs_no);
67 if(strstr(fpi->fs_type, "SCC"))
68 return fs_uart_id_scc2fsid(fpi->fs_no);
69 return fpi->fs_no;
70}
71
62#endif 72#endif