2009-12-04 15:59:44 +08:00
|
|
|
/*
|
|
|
|
Mantis PCI bridge driver
|
|
|
|
|
2009-12-15 20:13:49 +08:00
|
|
|
Copyright (C) Manu Abraham (abraham.manu@gmail.com)
|
2009-12-04 15:59:44 +08:00
|
|
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
|
2009-12-04 15:59:05 +08:00
|
|
|
#ifndef __MANTIS_UART_H
|
|
|
|
#define __MANTIS_UART_H
|
|
|
|
|
2009-12-04 16:39:57 +08:00
|
|
|
#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)
|
|
|
|
|
2009-12-04 15:59:05 +08:00
|
|
|
enum mantis_baud {
|
|
|
|
MANTIS_BAUD_9600 = 0,
|
|
|
|
MANTIS_BAUD_19200,
|
|
|
|
MANTIS_BAUD_38400,
|
|
|
|
MANTIS_BAUD_57600,
|
|
|
|
MANTIS_BAUD_115200
|
|
|
|
};
|
|
|
|
|
|
|
|
enum mantis_parity {
|
2009-12-12 07:41:07 +08:00
|
|
|
MANTIS_PARITY_NONE = 0,
|
2009-12-04 15:59:05 +08:00
|
|
|
MANTIS_PARITY_EVEN,
|
2009-12-04 16:39:57 +08:00
|
|
|
MANTIS_PARITY_ODD,
|
2009-12-04 15:59:05 +08:00
|
|
|
};
|
|
|
|
|
2009-12-04 16:39:57 +08:00
|
|
|
struct mantis_pci;
|
|
|
|
|
|
|
|
extern int mantis_uart_init(struct mantis_pci *mantis);
|
|
|
|
extern void mantis_uart_exit(struct mantis_pci *mantis);
|
|
|
|
|
2009-12-04 16:41:11 +08:00
|
|
|
#endif /* __MANTIS_UART_H */
|