From ce3a673413541a48b2cafaeb1358f3936d021c0d Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Wed, 5 May 2021 03:23:25 +0900 Subject: [PATCH] uart: Move registers to uart_regs.h Signed-off-by: Hector Martin --- src/uart.c | 10 +--------- src/uart_regs.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 src/uart_regs.h diff --git a/src/uart.c b/src/uart.c index 104f2151..91b13289 100644 --- a/src/uart.c +++ b/src/uart.c @@ -5,6 +5,7 @@ #include "uart.h" #include "iodev.h" #include "types.h" +#include "uart_regs.h" #include "utils.h" #include "vsprintf.h" @@ -12,15 +13,6 @@ #define UART_BASE 0x235200000L -#define ULCON 0x000 -#define UCON 0x004 -#define UFCON 0x008 -#define UTRSTAT 0x010 -#define UTXH 0x020 -#define URXH 0x024 -#define UBRDIV 0x028 -#define UFRACVAL 0x02c - void *pxx = uart_init; void uart_init(void) diff --git a/src/uart_regs.h b/src/uart_regs.h new file mode 100644 index 00000000..1b244413 --- /dev/null +++ b/src/uart_regs.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: MIT */ + +#define ULCON 0x000 +#define UCON 0x004 +#define UFCON 0x008 +#define UTRSTAT 0x010 +#define UTXH 0x020 +#define URXH 0x024 +#define UBRDIV 0x028 +#define UFRACVAL 0x02c