Go to the documentation of this file. 1 #ifndef __PMAC_ZILOG_H__
2 #define __PMAC_ZILOG_H__
18 #ifdef CONFIG_PPC_PMAC
22 struct macio_dev *
dev;
36 #define PMACZILOG_FLAG_IS_CONS 0x00000001
37 #define PMACZILOG_FLAG_IS_KGDB 0x00000002
38 #define PMACZILOG_FLAG_MODEM_STATUS 0x00000004
39 #define PMACZILOG_FLAG_IS_CHANNEL_A 0x00000008
40 #define PMACZILOG_FLAG_REGS_HELD 0x00000010
41 #define PMACZILOG_FLAG_TX_STOPPED 0x00000020
42 #define PMACZILOG_FLAG_TX_ACTIVE 0x00000040
43 #define PMACZILOG_FLAG_IS_IRDA 0x00000100
44 #define PMACZILOG_FLAG_IS_INTMODEM 0x00000200
45 #define PMACZILOG_FLAG_HAS_DMA 0x00000400
46 #define PMACZILOG_FLAG_RSRC_REQUESTED 0x00000800
47 #define PMACZILOG_FLAG_IS_OPEN 0x00002000
48 #define PMACZILOG_FLAG_IS_EXTCLK 0x00008000
49 #define PMACZILOG_FLAG_BREAK 0x00010000
57 #ifdef CONFIG_PPC_PMAC
58 unsigned int tx_dma_irq;
59 unsigned int rx_dma_irq;
60 volatile struct dbdma_regs
__iomem *tx_dma_regs;
61 volatile struct dbdma_regs
__iomem *rx_dma_regs;
69 #define to_pmz(p) ((struct uart_pmac_port *)(p))
116 #define BRG_TO_BPS(brg, freq) ((freq) / 2 / ((brg) + 2))
117 #define BPS_TO_BRG(bps, freq) ((((freq) + (bps)) / (2 * (bps))) - 2)
119 #define ZS_CLOCK 3686400
145 #define POINT_HIGH 0x8
146 #define RES_EXT_INT 0x10
147 #define SEND_ABORT 0x18
148 #define RES_RxINT_FC 0x20
149 #define RES_Tx_P 0x28
151 #define RES_H_IUS 0x38
153 #define RES_Rx_CRC 0x40
154 #define RES_Tx_CRC 0x80
155 #define RES_EOM_L 0xC0
159 #define EXT_INT_ENAB 0x1
160 #define TxINT_ENAB 0x2
163 #define RxINT_DISAB 0
164 #define RxINT_FCERR 0x8
165 #define INT_ALL_Rx 0x10
166 #define INT_ERR_Rx 0x18
167 #define RxINT_MASK 0x18
169 #define WT_RDY_RT 0x20
170 #define WT_FN_RDYFN 0x40
171 #define WT_RDY_ENAB 0x80
178 #define SYNC_L_INH 0x2
180 #define RxCRC_ENAB 0x8
182 #define AUTO_ENAB 0x20
187 #define RxN_MASK 0xc0
209 #define XCLK_MASK 0xC0
213 #define TxCRC_ENAB 0x1
222 #define TxN_MASK 0x60
230 #define ENEXREAD 0x40
305 #define Tx_BUF_EMP 0x4
307 #define SYNC_HUNT 0x10
310 #define BRK_ABRT 0x80
330 #define CHB_Tx_EMPTY 0x00
331 #define CHB_EXT_STAT 0x02
332 #define CHB_Rx_AVAIL 0x04
333 #define CHB_SPECIAL 0x06
334 #define CHA_Tx_EMPTY 0x08
335 #define CHA_EXT_STAT 0x0a
336 #define CHA_Rx_AVAIL 0x0c
337 #define CHA_SPECIAL 0x0e
338 #define STATUS_MASK 0x06
352 #define LOOPSEND 0x10
363 #define ZS_CLEARERR(port) (write_zsreg(port, 0, ERR_RES))
364 #define ZS_CLEARFIFO(port) do { volatile unsigned char garbage; \
365 garbage = read_zsdata(port); \
366 garbage = read_zsdata(port); \
367 garbage = read_zsdata(port); \
370 #define ZS_IS_CONS(UP) ((UP)->flags & PMACZILOG_FLAG_IS_CONS)
371 #define ZS_IS_KGDB(UP) ((UP)->flags & PMACZILOG_FLAG_IS_KGDB)
372 #define ZS_IS_CHANNEL_A(UP) ((UP)->flags & PMACZILOG_FLAG_IS_CHANNEL_A)
373 #define ZS_REGS_HELD(UP) ((UP)->flags & PMACZILOG_FLAG_REGS_HELD)
374 #define ZS_TX_STOPPED(UP) ((UP)->flags & PMACZILOG_FLAG_TX_STOPPED)
375 #define ZS_TX_ACTIVE(UP) ((UP)->flags & PMACZILOG_FLAG_TX_ACTIVE)
376 #define ZS_WANTS_MODEM_STATUS(UP) ((UP)->flags & PMACZILOG_FLAG_MODEM_STATUS)
377 #define ZS_IS_IRDA(UP) ((UP)->flags & PMACZILOG_FLAG_IS_IRDA)
378 #define ZS_IS_INTMODEM(UP) ((UP)->flags & PMACZILOG_FLAG_IS_INTMODEM)
379 #define ZS_HAS_DMA(UP) ((UP)->flags & PMACZILOG_FLAG_HAS_DMA)
380 #define ZS_IS_OPEN(UP) ((UP)->flags & PMACZILOG_FLAG_IS_OPEN)
381 #define ZS_IS_EXTCLK(UP) ((UP)->flags & PMACZILOG_FLAG_IS_EXTCLK)