File: mantis_uart.h

package info (click to toggle)
linux 3.2.73-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 692,996 kB
  • sloc: ansic: 9,719,677; asm: 244,034; xml: 40,377; makefile: 23,845; perl: 16,079; python: 4,929; sh: 4,425; cpp: 3,598; yacc: 2,979; lex: 1,726; awk: 708; pascal: 231; lisp: 218; sed: 30
file content (58 lines) | stat: -rw-r--r-- 1,638 bytes parent folder | download | duplicates (29)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
	Mantis PCI bridge driver

	Copyright (C) Manu Abraham (abraham.manu@gmail.com)

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#ifndef __MANTIS_UART_H
#define __MANTIS_UART_H

#define MANTIS_UART_CTL			0xe0
#define MANTIS_UART_RXINT		(1 << 4)
#define MANTIS_UART_RXFLUSH		(1 << 2)

#define MANTIS_UART_RXD			0xe8
#define MANTIS_UART_BAUD		0xec

#define MANTIS_UART_STAT		0xf0
#define MANTIS_UART_RXFIFO_DATA		(1 << 7)
#define MANTIS_UART_RXFIFO_EMPTY	(1 << 6)
#define MANTIS_UART_RXFIFO_FULL		(1 << 3)
#define MANTIS_UART_FRAME_ERR		(1 << 2)
#define MANTIS_UART_PARITY_ERR		(1 << 1)
#define MANTIS_UART_RXTHRESH_INT	(1 << 0)

enum mantis_baud {
	MANTIS_BAUD_9600	= 0,
	MANTIS_BAUD_19200,
	MANTIS_BAUD_38400,
	MANTIS_BAUD_57600,
	MANTIS_BAUD_115200
};

enum mantis_parity {
	MANTIS_PARITY_NONE	= 0,
	MANTIS_PARITY_EVEN,
	MANTIS_PARITY_ODD,
};

struct mantis_pci;

extern int mantis_uart_init(struct mantis_pci *mantis);
extern void mantis_uart_exit(struct mantis_pci *mantis);

#endif /* __MANTIS_UART_H */