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