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