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 |
| 5 | * |
| 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 | |
| 15 | /* defines for IRQs */ |
Scott Wood | 7ae8703 | 2007-07-17 17:59:06 -0500 | [diff] [blame^] | 16 | #ifndef CONFIG_PPC_CPM_NEW_BINDING |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | #define SMC1_IRQ SIU_INT_SMC1 |
| 18 | #define SMC2_IRQ SIU_INT_SMC2 |
| 19 | #define SCC1_IRQ SIU_INT_SCC1 |
| 20 | #define SCC2_IRQ SIU_INT_SCC2 |
| 21 | #define SCC3_IRQ SIU_INT_SCC3 |
| 22 | #define SCC4_IRQ SIU_INT_SCC4 |
Scott Wood | 7ae8703 | 2007-07-17 17:59:06 -0500 | [diff] [blame^] | 23 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | static inline void cpm_set_brg(int brg, int baud) |
| 26 | { |
| 27 | cpm_setbrg(brg, baud); |
| 28 | } |
| 29 | |
| 30 | static inline void cpm_set_scc_fcr(volatile scc_uart_t * sup) |
| 31 | { |
| 32 | sup->scc_genscc.scc_rfcr = CPMFCR_GBL | CPMFCR_EB; |
| 33 | sup->scc_genscc.scc_tfcr = CPMFCR_GBL | CPMFCR_EB; |
| 34 | } |
| 35 | |
| 36 | static inline void cpm_set_smc_fcr(volatile smc_uart_t * up) |
| 37 | { |
| 38 | up->smc_rfcr = CPMFCR_GBL | CPMFCR_EB; |
| 39 | up->smc_tfcr = CPMFCR_GBL | CPMFCR_EB; |
| 40 | } |
| 41 | |
Vitaly Bordug | fc8e50e | 2006-09-21 22:37:58 +0400 | [diff] [blame] | 42 | #define DPRAM_BASE ((unsigned char *)cpm_dpram_addr(0)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | |
| 44 | #endif |