blob: 1b3219f56c81513a07381d5fa54263930c112b26 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Uwe Zeisbergerf30c2262006-10-03 23:01:26 +02002 * linux/drivers/serial/cpm_uart/cpm_uart_cpm2.h
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 *
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 */
16#define SMC1_IRQ SIU_INT_SMC1
17#define SMC2_IRQ SIU_INT_SMC2
18#define SCC1_IRQ SIU_INT_SCC1
19#define SCC2_IRQ SIU_INT_SCC2
20#define SCC3_IRQ SIU_INT_SCC3
21#define SCC4_IRQ SIU_INT_SCC4
22
Linus Torvalds1da177e2005-04-16 15:20:36 -070023static inline void cpm_set_brg(int brg, int baud)
24{
25 cpm_setbrg(brg, baud);
26}
27
28static inline void cpm_set_scc_fcr(volatile scc_uart_t * sup)
29{
30 sup->scc_genscc.scc_rfcr = CPMFCR_GBL | CPMFCR_EB;
31 sup->scc_genscc.scc_tfcr = CPMFCR_GBL | CPMFCR_EB;
32}
33
34static inline void cpm_set_smc_fcr(volatile smc_uart_t * up)
35{
36 up->smc_rfcr = CPMFCR_GBL | CPMFCR_EB;
37 up->smc_tfcr = CPMFCR_GBL | CPMFCR_EB;
38}
39
Vitaly Bordugfc8e50e2006-09-21 22:37:58 +040040#define DPRAM_BASE ((unsigned char *)cpm_dpram_addr(0))
Linus Torvalds1da177e2005-04-16 15:20:36 -070041
42#endif