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_cpm2.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 cpm2 |
| 7 | * |
| 8 | */ |
| 9 | |
| 10 | #ifndef CPM_UART_CPM2_H |
| 11 | #define CPM_UART_CPM2_H |
| 12 | |
| 13 | #include <asm/cpm2.h> |
| 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, CPMFCR_GBL | CPMFCR_EB); |
| 23 | out_8(&sup->scc_genscc.scc_tfcr, CPMFCR_GBL | CPMFCR_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, CPMFCR_GBL | CPMFCR_EB); |
| 29 | out_8(&up->smc_tfcr, CPMFCR_GBL | CPMFCR_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 |