Soren Brinkmann | f9a3119 | 2016-03-06 20:14:51 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Soren Brinkmann | f9a3119 | 2016-03-06 20:14:51 -0800 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __CADENCE_UART_H__ |
| 8 | #define __CADENCE_UART_H__ |
| 9 | |
| 10 | /* This is very minimalistic and will only work in QEMU. */ |
| 11 | |
| 12 | /* CADENCE Registers */ |
| 13 | #define R_UART_CR 0 |
| 14 | #define R_UART_CR_RXRST (1 << 0) /* RX logic reset */ |
| 15 | #define R_UART_CR_TXRST (1 << 1) /* TX logic reset */ |
| 16 | #define R_UART_CR_RX_EN (1 << 2) /* RX enabled */ |
| 17 | #define R_UART_CR_TX_EN (1 << 4) /* TX enabled */ |
| 18 | |
| 19 | #define R_UART_SR 0x2C |
| 20 | #define UART_SR_INTR_REMPTY_BIT 1 |
| 21 | #define UART_SR_INTR_TFUL_BIT 4 |
| 22 | |
| 23 | #define R_UART_TX 0x30 |
| 24 | #define R_UART_RX 0x30 |
| 25 | |
| 26 | #endif |