xref: /openbmc/linux/drivers/tty/serial/timbuart.h (revision ead5d1f4d877e92c051e1a1ade623d0d30e71619)
1*4f5f5887SNishad Kamdar /* SPDX-License-Identifier: GPL-2.0 */
2ab4382d2SGreg Kroah-Hartman /*
3ab4382d2SGreg Kroah-Hartman  * timbuart.c timberdale FPGA GPIO driver
4ab4382d2SGreg Kroah-Hartman  * Copyright (c) 2009 Intel Corporation
5ab4382d2SGreg Kroah-Hartman  */
6ab4382d2SGreg Kroah-Hartman 
7ab4382d2SGreg Kroah-Hartman /* Supports:
8ab4382d2SGreg Kroah-Hartman  * Timberdale FPGA UART
9ab4382d2SGreg Kroah-Hartman  */
10ab4382d2SGreg Kroah-Hartman 
11ab4382d2SGreg Kroah-Hartman #ifndef _TIMBUART_H
12ab4382d2SGreg Kroah-Hartman #define _TIMBUART_H
13ab4382d2SGreg Kroah-Hartman 
14ab4382d2SGreg Kroah-Hartman #define TIMBUART_FIFO_SIZE	2048
15ab4382d2SGreg Kroah-Hartman 
16ab4382d2SGreg Kroah-Hartman #define TIMBUART_RXFIFO		0x08
17ab4382d2SGreg Kroah-Hartman #define TIMBUART_TXFIFO		0x0c
18ab4382d2SGreg Kroah-Hartman #define TIMBUART_IER		0x10
19ab4382d2SGreg Kroah-Hartman #define TIMBUART_IPR		0x14
20ab4382d2SGreg Kroah-Hartman #define TIMBUART_ISR		0x18
21ab4382d2SGreg Kroah-Hartman #define TIMBUART_CTRL		0x1c
22ab4382d2SGreg Kroah-Hartman #define TIMBUART_BAUDRATE	0x20
23ab4382d2SGreg Kroah-Hartman 
24ab4382d2SGreg Kroah-Hartman #define TIMBUART_CTRL_RTS	0x01
25ab4382d2SGreg Kroah-Hartman #define TIMBUART_CTRL_CTS	0x02
26ab4382d2SGreg Kroah-Hartman #define TIMBUART_CTRL_FLSHTX	0x40
27ab4382d2SGreg Kroah-Hartman #define TIMBUART_CTRL_FLSHRX	0x80
28ab4382d2SGreg Kroah-Hartman 
29ab4382d2SGreg Kroah-Hartman #define TXBF		0x01
30ab4382d2SGreg Kroah-Hartman #define TXBAE		0x02
31ab4382d2SGreg Kroah-Hartman #define CTS_DELTA	0x04
32ab4382d2SGreg Kroah-Hartman #define RXDP		0x08
33ab4382d2SGreg Kroah-Hartman #define RXBAF		0x10
34ab4382d2SGreg Kroah-Hartman #define RXBF		0x20
35ab4382d2SGreg Kroah-Hartman #define RXTT		0x40
36ab4382d2SGreg Kroah-Hartman #define RXBNAE		0x80
37ab4382d2SGreg Kroah-Hartman #define TXBE		0x100
38ab4382d2SGreg Kroah-Hartman 
39ab4382d2SGreg Kroah-Hartman #define RXFLAGS (RXDP | RXBAF | RXBF | RXTT | RXBNAE)
40ab4382d2SGreg Kroah-Hartman #define TXFLAGS (TXBF | TXBAE)
41ab4382d2SGreg Kroah-Hartman 
42ab4382d2SGreg Kroah-Hartman #define TIMBUART_MAJOR 204
43ab4382d2SGreg Kroah-Hartman #define TIMBUART_MINOR 192
44ab4382d2SGreg Kroah-Hartman 
45ab4382d2SGreg Kroah-Hartman #endif /* _TIMBUART_H */
46ab4382d2SGreg Kroah-Hartman 
47