blob: 69f523a442e0c0887e065a07a272cd81374bbf66 [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_cpm1.h
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 *
4 * Driver for CPM (SCC/SMC) serial ports
5 *
6 * definitions for cpm1
7 *
8 */
9
10#ifndef CPM_UART_CPM1_H
11#define CPM_UART_CPM1_H
12
13#include <asm/commproc.h>
14
15/* defines for IRQs */
Scott Wood7ae87032007-07-17 17:59:06 -050016#ifndef CONFIG_PPC_CPM_NEW_BINDING
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#define SMC1_IRQ (CPM_IRQ_OFFSET + CPMVEC_SMC1)
18#define SMC2_IRQ (CPM_IRQ_OFFSET + CPMVEC_SMC2)
19#define SCC1_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC1)
20#define SCC2_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC2)
21#define SCC3_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC3)
22#define SCC4_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC4)
Scott Wood7ae87032007-07-17 17:59:06 -050023#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070024
Linus Torvalds1da177e2005-04-16 15:20:36 -070025static inline void cpm_set_brg(int brg, int baud)
26{
27 cpm_setbrg(brg, baud);
28}
29
30static inline void cpm_set_scc_fcr(volatile scc_uart_t * sup)
31{
32 sup->scc_genscc.scc_rfcr = SMC_EB;
33 sup->scc_genscc.scc_tfcr = SMC_EB;
34}
35
36static inline void cpm_set_smc_fcr(volatile smc_uart_t * up)
37{
38 up->smc_rfcr = SMC_EB;
39 up->smc_tfcr = SMC_EB;
40}
41
Jochen Friedrichd2146022007-09-24 19:15:43 +020042#define DPRAM_BASE ((unsigned char *)cpm_dpram_addr(0))
Linus Torvalds1da177e2005-04-16 15:20:36 -070043
44#endif