blob: 264e2d236eb9dc2365bc05debc748e70288338ae [file] [log] [blame]
stroese771e05b2004-12-16 18:21:17 +00001/*
2 * (C) Copyright 2001
3 * Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
4 *
5 * modified for marvell db64360 eval board by
6 * Ingo Assmus <ingo.assmus@keymile.com>
7 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02008 * SPDX-License-Identifier: GPL-2.0+
stroese771e05b2004-12-16 18:21:17 +00009 */
10
11/* serial.h - mostly useful for DUART serial_init in serial.c */
12
13#ifndef __SERIAL_H__
14#define __SERIAL_H__
15
16#if 0
17
18#define B230400 1
19#define B115200 2
20#define B57600 4
21#define B38400 82
22#define B19200 163
23#define B9600 24
24#define B4800 651
25#define B2400 1302
26#define B1200 2604
27#define B600 5208
28#define B300 10417
29#define B150 20833
30#define B110 28409
31#define BDEFAULT B115200
32
33 /* this stuff is important to initialize
34 the DUART channels */
35
36#define Scale 0x01L /* distance between port addresses */
37#define COM1 0x000003f8 /* Keyboard */
38#define COM2 0x000002f8 /* Host */
39
40
41/* Port Definitions relative to base COM port addresses */
42#define DataIn (0x00*Scale) /* data input port */
43#define DataOut (0x00*Scale) /* data output port */
44#define BaudLsb (0x00*Scale) /* baud rate divisor least significant byte */
45#define BaudMsb (0x01*Scale) /* baud rate divisor most significant byte */
46#define Ier (0x01*Scale) /* interrupt enable register */
47#define Iir (0x02*Scale) /* interrupt identification register */
48#define Lcr (0x03*Scale) /* line control register */
49#define Mcr (0x04*Scale) /* modem control register */
50#define Lsr (0x05*Scale) /* line status register */
51#define Msr (0x06*Scale) /* modem status register */
52
53/* Bit Definitions for above ports */
54#define LcrDlab 0x80 /* b7: enable baud rate divisor registers */
55#define LcrDflt 0x03 /* b6-0: no parity, 1 stop, 8 data */
56
57#define McrRts 0x02 /* b1: request to send (I am ready to xmit) */
58#define McrDtr 0x01 /* b0: data terminal ready (I am alive ready to rcv) */
59#define McrDflt (McrRts|McrDtr)
60
61#define LsrTxD 0x6000 /* b5: transmit holding register empty (i.e. xmit OK!)*/
62 /* b6: transmitter empty */
63#define LsrRxD 0x0100 /* b0: received data ready (i.e. got a byte!) */
64
65#define MsrRi 0x0040 /* b6: ring indicator (other guy is ready to rcv) */
66#define MsrDsr 0x0020 /* b5: data set ready (other guy is alive ready to rcv */
67#define MsrCts 0x0010 /* b4: clear to send (other guy is ready to rcv) */
68
69#define IerRda 0xf /* b0: Enable received data available interrupt */
70
71#endif
72
73#endif /* __SERIAL_H__ */