| 1 | /* UART model. |
| 2 | |
| 3 | Copyright (C) 1996-2020 Free Software Foundation, Inc. |
| 4 | Contributed by Cygnus Solutions and Mike Frysinger. |
| 5 | |
| 6 | This file is part of simulators. |
| 7 | |
| 8 | This program is free software; you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by |
| 10 | the Free Software Foundation; either version 3 of the License, or |
| 11 | (at your option) any later version. |
| 12 | |
| 13 | This program is distributed in the hope that it will be useful, |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. |
| 17 | |
| 18 | You should have received a copy of the GNU General Public License |
| 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 20 | |
| 21 | #ifndef DV_M32R_UART_H |
| 22 | #define DV_M32R_UART_H |
| 23 | |
| 24 | /* Should move these settings to a flag to the uart device, and the adresses to |
| 25 | the sim-model framework. */ |
| 26 | |
| 27 | /* Serial device addresses. */ |
| 28 | #ifdef M32R_EVA /* orig eva board, no longer supported */ |
| 29 | #define UART_BASE_ADDR 0xff102000 |
| 30 | #define UART_INCHAR_ADDR 0xff102013 |
| 31 | #define UART_OUTCHAR_ADDR 0xff10200f |
| 32 | #define UART_STATUS_ADDR 0xff102006 |
| 33 | /* Indicate ready bit is inverted. */ |
| 34 | #define UART_INPUT_READY0 |
| 35 | #else |
| 36 | /* These are the values for the MSA2000 board. |
| 37 | ??? Will eventually need to move this to a config file. */ |
| 38 | #define UART_BASE_ADDR 0xff004000 |
| 39 | #define UART_INCHAR_ADDR 0xff004009 |
| 40 | #define UART_OUTCHAR_ADDR 0xff004007 |
| 41 | #define UART_STATUS_ADDR 0xff004002 |
| 42 | #endif |
| 43 | |
| 44 | #define UART_INPUT_READY 0x4 |
| 45 | #define UART_OUTPUT_READY 0x1 |
| 46 | |
| 47 | #endif |