Switch all MMIO to the new access style

This commit is contained in:
Michael Scire 2018-02-22 17:50:19 -08:00
parent 5d97ac48f2
commit d1d8d3da34
8 changed files with 137 additions and 197 deletions

View file

@ -2,13 +2,13 @@
#define EXOSPHERE_TIMERS_H
#include <stdint.h>
#include "mmu.h"
/* Exosphere driver for the Tegra X1 Timers. */
void set_timer_address(void *timer_base);
void *get_timer_address(void); /* This is inlined in timers.c */
#define TIMERS_BASE (mmio_get_device_address(MMIO_DEVID_TMRs_WDTs))
#define TIMERUS_CNTR_1US_0 (*((volatile uint32_t *)(get_timer_address() + 0x10)))
#define TIMERUS_CNTR_1US_0 (*((volatile uint32_t *)(TIMERS_BASE + 0x10)))
void wait(uint32_t microseconds);