Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * Driver for CPM (SCC/SMC) serial ports |
Kumar Gala | 0d84406 | 2008-06-12 07:53:48 -0500 | [diff] [blame] | 3 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * definitions for cpm1 |
5 | * | ||||
6 | */ | ||||
7 | |||||
8 | #ifndef CPM_UART_CPM1_H | ||||
9 | #define CPM_UART_CPM1_H | ||||
10 | |||||
Jochen Friedrich | b5677d8 | 2008-01-25 15:31:42 +0100 | [diff] [blame] | 11 | #include <asm/cpm1.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | static inline void cpm_set_brg(int brg, int baud) |
14 | { | ||||
15 | cpm_setbrg(brg, baud); | ||||
16 | } | ||||
17 | |||||
Scott Wood | c1dcfd9 | 2007-07-24 15:53:07 -0500 | [diff] [blame] | 18 | static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | { |
Scott Wood | c1dcfd9 | 2007-07-24 15:53:07 -0500 | [diff] [blame] | 20 | out_8(&sup->scc_genscc.scc_rfcr, SMC_EB); |
21 | out_8(&sup->scc_genscc.scc_tfcr, SMC_EB); | ||||
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | } |
23 | |||||
Scott Wood | c1dcfd9 | 2007-07-24 15:53:07 -0500 | [diff] [blame] | 24 | static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | { |
Scott Wood | c1dcfd9 | 2007-07-24 15:53:07 -0500 | [diff] [blame] | 26 | out_8(&up->smc_rfcr, SMC_EB); |
27 | out_8(&up->smc_tfcr, SMC_EB); | ||||
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | } |
29 | |||||
Scott Wood | c1dcfd9 | 2007-07-24 15:53:07 -0500 | [diff] [blame] | 30 | #define DPRAM_BASE ((u8 __iomem __force *)cpm_dpram_addr(0)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | |
32 | #endif |