summaryrefslogtreecommitdiffstats
path: root/include/linux/fs_uart_pd.h
diff options
context:
space:
mode:
authorVitaly Bordug <vbordug@ru.mvista.com>2006-09-21 22:38:05 +0400
committerVitaly Bordug <vbordug@ru.mvista.com>2006-09-21 22:38:05 +0400
commit611a15afcdaacec6efba984c7eb089b853564bdf (patch)
tree6d33fdbb9354d4548fa44e5115de7186f38ac8c0 /include/linux/fs_uart_pd.h
parentd3465c921f79cfef0a4a8ceeeef9a3721bbbb57d (diff)
downloadlinux-stable-611a15afcdaacec6efba984c7eb089b853564bdf.tar.gz
linux-stable-611a15afcdaacec6efba984c7eb089b853564bdf.tar.bz2
linux-stable-611a15afcdaacec6efba984c7eb089b853564bdf.zip
POWERPC: Bring the fs_no calculation to the relevant SoC enumeration
The fs_no mean used to be fs_enet driver driven, hence it was an enumeration across all the possible fs_enet "users" in the SoC. Now, with QE on the pipeline, and to make DTS descriptions more clear, fs_no features relevant SoC part number, with additional field to describe the SoC type. Another reason for that is now not only fs_enet is going to utilize those stuff. There might be UART, HLDC, and even USB, so to prevent confusion and be ready for upcoming OF_device transfer, fs_enet and cpm_uart drivers were updated in that concern, as well as the relevant DTS. Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
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 {
void(*init_ioports)(struct fs_uart_platform_info *);
/* device specific information */
int fs_no; /* controller index */
+ char fs_type[4]; /* controller type */
u32 uart_clk;
u8 tx_num_fifo;
u8 tx_buf_size;
@@ -59,4 +60,13 @@ struct fs_uart_platform_info {
u8 clk_tx;
};
+static inline int fs_uart_get_id(struct fs_uart_platform_info *fpi)
+{
+ if(strstr(fpi->fs_type, "SMC"))
+ return fs_uart_id_smc2fsid(fpi->fs_no);
+ if(strstr(fpi->fs_type, "SCC"))
+ return fs_uart_id_scc2fsid(fpi->fs_no);
+ return fpi->fs_no;
+}
+
#endif