Manu Abraham | d4f4ae0 | 2009-12-04 04:59:44 -0300 | [diff] [blame] | 1 | /* |
| 2 | Mantis PCI bridge driver |
| 3 | |
Manu Abraham | 8825a09 | 2009-12-15 09:13:49 -0300 | [diff] [blame] | 4 | Copyright (C) Manu Abraham (abraham.manu@gmail.com) |
Manu Abraham | d4f4ae0 | 2009-12-04 04:59:44 -0300 | [diff] [blame] | 5 | |
| 6 | This program is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 2 of the License, or |
| 9 | (at your option) any later version. |
| 10 | |
| 11 | This program is distributed in the hope that it will be useful, |
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | GNU General Public License for more details. |
| 15 | |
| 16 | You should have received a copy of the GNU General Public License |
| 17 | along with this program; if not, write to the Free Software |
| 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 19 | */ |
| 20 | |
Manu Abraham | cb428c3 | 2009-12-04 04:59:05 -0300 | [diff] [blame] | 21 | #ifndef __MANTIS_UART_H |
| 22 | #define __MANTIS_UART_H |
| 23 | |
Manu Abraham | add2063 | 2009-12-04 05:39:57 -0300 | [diff] [blame] | 24 | #define MANTIS_UART_CTL 0xe0 |
| 25 | #define MANTIS_UART_RXINT (1 << 4) |
| 26 | #define MANTIS_UART_RXFLUSH (1 << 2) |
| 27 | |
| 28 | #define MANTIS_UART_RXD 0xe8 |
| 29 | #define MANTIS_UART_BAUD 0xec |
| 30 | |
| 31 | #define MANTIS_UART_STAT 0xf0 |
| 32 | #define MANTIS_UART_RXFIFO_DATA (1 << 7) |
| 33 | #define MANTIS_UART_RXFIFO_EMPTY (1 << 6) |
| 34 | #define MANTIS_UART_RXFIFO_FULL (1 << 3) |
| 35 | #define MANTIS_UART_FRAME_ERR (1 << 2) |
| 36 | #define MANTIS_UART_PARITY_ERR (1 << 1) |
| 37 | #define MANTIS_UART_RXTHRESH_INT (1 << 0) |
| 38 | |
Manu Abraham | cb428c3 | 2009-12-04 04:59:05 -0300 | [diff] [blame] | 39 | enum mantis_baud { |
| 40 | MANTIS_BAUD_9600 = 0, |
| 41 | MANTIS_BAUD_19200, |
| 42 | MANTIS_BAUD_38400, |
| 43 | MANTIS_BAUD_57600, |
| 44 | MANTIS_BAUD_115200 |
| 45 | }; |
| 46 | |
| 47 | enum mantis_parity { |
Manu Abraham | a149735 | 2009-12-11 20:41:07 -0300 | [diff] [blame] | 48 | MANTIS_PARITY_NONE = 0, |
Manu Abraham | cb428c3 | 2009-12-04 04:59:05 -0300 | [diff] [blame] | 49 | MANTIS_PARITY_EVEN, |
Manu Abraham | add2063 | 2009-12-04 05:39:57 -0300 | [diff] [blame] | 50 | MANTIS_PARITY_ODD, |
Manu Abraham | cb428c3 | 2009-12-04 04:59:05 -0300 | [diff] [blame] | 51 | }; |
| 52 | |
Manu Abraham | add2063 | 2009-12-04 05:39:57 -0300 | [diff] [blame] | 53 | struct mantis_pci; |
| 54 | |
| 55 | extern int mantis_uart_init(struct mantis_pci *mantis); |
| 56 | extern void mantis_uart_exit(struct mantis_pci *mantis); |
| 57 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 58 | #endif /* __MANTIS_UART_H */ |