2018-02-18 02:50:39 +00:00
|
|
|
#ifndef EXOSPHERE_PMC_H
|
|
|
|
#define EXOSPHERE_PMC_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2018-02-24 16:13:42 +00:00
|
|
|
#include "memory_map.h"
|
2018-02-18 02:50:39 +00:00
|
|
|
|
|
|
|
/* Exosphere register definitions for the Tegra X1 PMC. */
|
|
|
|
|
2018-02-26 21:09:35 +00:00
|
|
|
static inline uintptr_t get_pmc_base(void) {
|
|
|
|
return MMIO_GET_DEVICE_ADDRESS(MMIO_DEVID_RTC_PMC) + 0x400ull;
|
|
|
|
}
|
|
|
|
|
|
|
|
#define PMC_BASE (get_pmc_base())
|
2018-02-18 02:50:39 +00:00
|
|
|
|
2018-02-26 10:00:02 +00:00
|
|
|
#define APBDEV_PMC_DPD_ENABLE_0 (*((volatile uint32_t *)(PMC_BASE + 0x24)))
|
|
|
|
|
2018-02-23 01:50:19 +00:00
|
|
|
#define APBDEV_PMC_PWRGATE_TOGGLE_0 (*((volatile uint32_t *)(PMC_BASE + 0x30)))
|
|
|
|
#define APBDEV_PMC_PWRGATE_STATUS_0 (*((volatile uint32_t *)(PMC_BASE + 0x38)))
|
2018-02-18 02:50:39 +00:00
|
|
|
|
2018-02-26 10:00:02 +00:00
|
|
|
#define APBDEV_PMC_SCRATCH0_0 (*((volatile uint32_t *)(PMC_BASE + 0x50)))
|
|
|
|
|
|
|
|
#define APBDEV_PM_0 (*((volatile uint32_t *)(PMC_BASE + 0x14)))
|
|
|
|
#define APBDEV_PMC_WAKE2_STATUS_0 (*((volatile uint32_t *)(PMC_BASE + 0x168)))
|
|
|
|
#define APBDEV_PMC_CNTRL2_0 (*((volatile uint32_t *)(PMC_BASE + 0x440)))
|
|
|
|
|
2018-02-24 16:13:42 +00:00
|
|
|
#endif
|