mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-27 21:24:11 -04:00
Switch all MMIO to the new access style
This commit is contained in:
parent
5d97ac48f2
commit
d1d8d3da34
8 changed files with 137 additions and 197 deletions
|
@ -2,17 +2,19 @@
|
|||
#define EXOSPHERE_UART_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "mmu.h"
|
||||
|
||||
/* Exosphere driver for the Tegra X1 UARTs. */
|
||||
|
||||
void set_uart_address(void *uart_base);
|
||||
void *get_uart_address(void); /* This is inlined in uart.c */
|
||||
/* TODO: Should we bother with support UARTB-D? */
|
||||
|
||||
#define UART_THR_DLAB_0_0 (*((volatile uint32_t *)(get_uart_address() + 0x0)))
|
||||
#define UART_IER_DLAB_0_0 (*((volatile uint32_t *)(get_uart_address() + 0x4)))
|
||||
#define UART_IIR_FCR_0 (*((volatile uint32_t *)(get_uart_address() + 0x8)))
|
||||
#define UART_LCR_0 (*((volatile uint32_t *)(get_uart_address() + 0xC)))
|
||||
#define UART_LSR_0 (*((volatile uint32_t *)(get_uart_address() + 0x14)))
|
||||
#define UARTA_BASE (mmio_get_device_address(MMIO_DEVID_UART_A))
|
||||
|
||||
#define UART_THR_DLAB_0_0 (*((volatile uint32_t *)(UARTA_BASE + 0x0)))
|
||||
#define UART_IER_DLAB_0_0 (*((volatile uint32_t *)(UARTA_BASE + 0x4)))
|
||||
#define UART_IIR_FCR_0 (*((volatile uint32_t *)(UARTA_BASE+ 0x8)))
|
||||
#define UART_LCR_0 (*((volatile uint32_t *)(UARTA_BASE + 0xC)))
|
||||
#define UART_LSR_0 (*((volatile uint32_t *)(UARTA_BASE + 0x14)))
|
||||
|
||||
void uart_initialize(uint16_t divider);
|
||||
void uart_transmit_char(char ch);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue