356 lines
17 KiB
C++
356 lines
17 KiB
C++
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include <cassert>
|
|
|
|
#include "util.hh"
|
|
#include "mmio.hh"
|
|
#include "omap35x_prcm.hh"
|
|
|
|
static const unsigned cpu_opp_freq[] = {0, 125, 250, 500, 550, 600, 720};
|
|
static const unsigned iva2_opp_freq[] = {0, 45, 90, 180, 200, 215, 260};
|
|
|
|
class OMAP35x_prcm_impl {
|
|
public:
|
|
OMAP35x_prcm_impl(uintptr_t cm_base, uintptr_t pm_base)
|
|
: cm_base_{cm_base, 28}, pm_base_{pm_base, 42}, cpu_opp_{2}, enable_iva2_{false} {
|
|
// Setup IVA2 domain (unused, disable)
|
|
r_clkstctrl_iva2() = 0x3;
|
|
r_wkdep_iva2() = 0;
|
|
r_pwstctrl_iva2() &= ~0x3;
|
|
|
|
// Setup MPU domain (enable)
|
|
r_clkstctrl_mpu() = 0x3;
|
|
|
|
// Setup CORE domain (enable)
|
|
r_clkstctrl_core() = 0xf; // Autosleep L3&L4
|
|
r_iva2grpsel1_core() = 0x80000008;
|
|
r_iva2grpsel3_core() = 0x00000000;
|
|
|
|
// Setup PER domain (enable)
|
|
r_sleepdep_per() |= (1<<1); // Enable PER-MPU sleep dep.
|
|
r_clkstctrl_per() |= 0x3; // Enable autosleep
|
|
r_iva2grpsel_per() = 0x00000000;
|
|
|
|
// Setup SGX domain (unused, disable)
|
|
r_clkstctrl_sgx() = 0x3;
|
|
r_wkdep_sgx() = 0;
|
|
r_pwstctrl_sgx() &= ~0x3;
|
|
|
|
// Setup DSS domain (unused, disable)
|
|
r_fclken_dss() = 0;
|
|
r_iclken_dss() = 0;
|
|
r_clkstctrl_dss() = 0x3;
|
|
r_wkdep_dss() = 0;
|
|
r_pwstctrl_dss() &= ~0x3;
|
|
|
|
// Setup CAM comain (unused, disable)
|
|
r_clkstctrl_cam() = 0x3;
|
|
r_wkdep_cam() = 0;
|
|
r_pwstctrl_cam() &= ~0x3;
|
|
|
|
// Setup NEON domain
|
|
r_clkstctrl_neon() = 0x3;
|
|
|
|
// Setup USBHOST domain (unused, disable)
|
|
r_clkstctrl_usbhost() = 0x3;
|
|
r_wkdep_usbhost() = 0;
|
|
r_pwstctrl_usbhost() &= ~0x3;
|
|
}
|
|
|
|
void enable_peripherals() {
|
|
// Prepare GPTIMER2
|
|
r_fclken_per() |= (1<<3); // Enable GPT2 fclk
|
|
r_iclken_per() |= (1<<3); // Enable GPT2 iclk
|
|
r_autoidle_per() |= (1<<3); // Enable GPT2 iclk autoidle
|
|
r_clksel_per() &= ~(1<<0); // GPT2 fclk = 32.768kHz
|
|
r_mpugrpsel_per() |= (1<<3); // GPT2 wakes up MPU
|
|
r_wken_per() |= (1<<3); // GPT2 wake up enable
|
|
|
|
// Prepare GPTIMER3
|
|
r_fclken_per() |= (1<<4); // Enable GPT3 fclk
|
|
r_iclken_per() |= (1<<4); // Enable GPT3 iclk
|
|
r_autoidle_per() |= (1<<4); // Enable GPT3 iclk autoidle
|
|
r_clksel_per() |= (1<<1); // GPT3 fclk = SYS_CLK
|
|
r_mpugrpsel_per() &= ~(1<<4); // GPT3 does not wake up MPU
|
|
r_wken_per() &= ~(1<<4); // GPT3 wake up disable
|
|
|
|
// Prepare UART3
|
|
r_autoidle_per() |= (1<<11); // Enable UART3 iclk autoidle
|
|
r_mpugrpsel_per() |= (1<<11); // UART3 wakes up MPU
|
|
r_wken_per() |= (1<<11); // UART3 wake up enable
|
|
|
|
// Prepare I2C1
|
|
r_fclken1_core() |= (1<<15);
|
|
r_iclken1_core() |= (1<<15);
|
|
r_autoidle1_core() |= (1<<15);
|
|
r_wken1_core() &= ~(1<15);
|
|
|
|
// Prepare MMC1
|
|
r_fclken1_core() |= (1<<24);
|
|
r_iclken1_core() |= (1<<24);
|
|
r_autoidle1_core() |= (1<<24);
|
|
r_wken1_core() |= (1<<24);
|
|
r_mpugrpsel1_core() |= (1<<24);
|
|
}
|
|
|
|
void clear_wake_per(int n) {
|
|
assert(n >= 0 && n <= 31);
|
|
r_wkst_per() = (1<<n);
|
|
}
|
|
|
|
void clear_wake_core(int n) {
|
|
assert(n >= 0 && n <= 63);
|
|
if(n&32)
|
|
r_wkst3_core() = (1<<(n&0x1f));
|
|
else
|
|
r_wkst1_core() = (1<<n);
|
|
}
|
|
|
|
void set_cpu_opp(int opp) {
|
|
assert(opp >= 1 && opp <= 6);
|
|
|
|
r_clken_pll_mpu() = 0x75;
|
|
|
|
uint32_t clksel = 0x01000000;
|
|
if(opp == 1)
|
|
clksel = 0x02000000; // Bypass must be /4 for OPP1
|
|
|
|
clksel |= 12;
|
|
clksel |= cpu_opp_freq[opp]<<8;
|
|
|
|
r_clksel1_pll_mpu() = clksel;
|
|
|
|
r_clken_pll_mpu() = 0x77;
|
|
|
|
if(enable_iva2_) {
|
|
r_clken_pll_iva2() = 0x75;
|
|
|
|
clksel = 0x01000000;
|
|
clksel |= 12;
|
|
clksel |= iva2_opp_freq[opp]<<8;
|
|
|
|
r_clksel1_pll_iva2() = clksel;
|
|
|
|
r_clken_pll_iva2() = 0x77;
|
|
}
|
|
|
|
cpu_opp_ = opp;
|
|
}
|
|
|
|
void set_core_opp(int opp, int config) {
|
|
}
|
|
|
|
private:
|
|
MMIO_alloc cm_base_, pm_base_;
|
|
//uintptr_t cm_base_, pm_base_;
|
|
int cpu_opp_;
|
|
bool enable_iva2_;
|
|
|
|
// CM registers
|
|
uint32_t volatile& r_fclken_iva2() { return _reg32(cm_base_.get_virt(), 0x0); }
|
|
uint32_t volatile& r_clken_pll_iva2() { return _reg32(cm_base_.get_virt(), 0x4); }
|
|
uint32_t volatile& r_idlest_iva2() { return _reg32(cm_base_.get_virt(), 0x20); }
|
|
uint32_t volatile& r_idlest_pll_iva2() { return _reg32(cm_base_.get_virt(), 0x24); }
|
|
uint32_t volatile& r_autoidle_pll_iva2() { return _reg32(cm_base_.get_virt(), 0x34); }
|
|
uint32_t volatile& r_clksel1_pll_iva2() { return _reg32(cm_base_.get_virt(), 0x40); }
|
|
uint32_t volatile& r_clksel2_pll_iva2() { return _reg32(cm_base_.get_virt(), 0x44); }
|
|
uint32_t volatile& r_clkstctrl_iva2() { return _reg32(cm_base_.get_virt(), 0x48); }
|
|
uint32_t volatile& r_clkstst_iva2() { return _reg32(cm_base_.get_virt(), 0x4c); }
|
|
|
|
uint32_t volatile& r_clken_pll_mpu() { return _reg32(cm_base_.get_virt(), 0x904); }
|
|
uint32_t volatile& r_idlest_mpu() { return _reg32(cm_base_.get_virt(), 0x920); }
|
|
uint32_t volatile& r_idlest_pll_mpu() { return _reg32(cm_base_.get_virt(), 0x924); }
|
|
uint32_t volatile& r_autoidle_pll_mpu() { return _reg32(cm_base_.get_virt(), 0x934); }
|
|
uint32_t volatile& r_clksel1_pll_mpu() { return _reg32(cm_base_.get_virt(), 0x940); }
|
|
uint32_t volatile& r_clksel2_pll_mpu() { return _reg32(cm_base_.get_virt(), 0x944); }
|
|
uint32_t volatile& r_clkstctrl_mpu() { return _reg32(cm_base_.get_virt(), 0x948); }
|
|
uint32_t volatile& r_clkstst_mpu() { return _reg32(cm_base_.get_virt(), 0x94c); }
|
|
|
|
uint32_t volatile& r_fclken1_core() { return _reg32(cm_base_.get_virt(), 0xa00); }
|
|
uint32_t volatile& r_fclken3_core() { return _reg32(cm_base_.get_virt(), 0xa08); }
|
|
uint32_t volatile& r_iclken1_core() { return _reg32(cm_base_.get_virt(), 0xa10); }
|
|
uint32_t volatile& r_iclken3_core() { return _reg32(cm_base_.get_virt(), 0xa18); }
|
|
uint32_t volatile& r_idlest1_core() { return _reg32(cm_base_.get_virt(), 0xa20); }
|
|
uint32_t volatile& r_idlest3_core() { return _reg32(cm_base_.get_virt(), 0xa28); }
|
|
uint32_t volatile& r_autoidle1_core() { return _reg32(cm_base_.get_virt(), 0xa30); }
|
|
uint32_t volatile& r_autoidle3_core() { return _reg32(cm_base_.get_virt(), 0xa38); }
|
|
uint32_t volatile& r_clksel_core() { return _reg32(cm_base_.get_virt(), 0xa40); }
|
|
uint32_t volatile& r_clkstctrl_core() { return _reg32(cm_base_.get_virt(), 0xa48); }
|
|
uint32_t volatile& r_clkstst_core() { return _reg32(cm_base_.get_virt(), 0xa4c); }
|
|
|
|
uint32_t volatile& r_fclken_sgx() { return _reg32(cm_base_.get_virt(), 0xb00); }
|
|
uint32_t volatile& r_iclken_sgx() { return _reg32(cm_base_.get_virt(), 0xb10); }
|
|
uint32_t volatile& r_idlest_sgx() { return _reg32(cm_base_.get_virt(), 0xb20); }
|
|
uint32_t volatile& r_clksel_sgx() { return _reg32(cm_base_.get_virt(), 0xb40); }
|
|
uint32_t volatile& r_sleepdep_sgx() { return _reg32(cm_base_.get_virt(), 0xb44); }
|
|
uint32_t volatile& r_clkstctrl_sgx() { return _reg32(cm_base_.get_virt(), 0xb48); }
|
|
uint32_t volatile& r_clkstst_sgx() { return _reg32(cm_base_.get_virt(), 0xb4c); }
|
|
|
|
uint32_t volatile& r_fclken_wkup() { return _reg32(cm_base_.get_virt(), 0xc00); }
|
|
uint32_t volatile& r_iclken_wkup() { return _reg32(cm_base_.get_virt(), 0xc10); }
|
|
uint32_t volatile& r_idlest_wkup() { return _reg32(cm_base_.get_virt(), 0xc20); }
|
|
uint32_t volatile& r_autoidle_wkup() { return _reg32(cm_base_.get_virt(), 0xc30); }
|
|
uint32_t volatile& r_clksel_wkup() { return _reg32(cm_base_.get_virt(), 0xc40); }
|
|
|
|
uint32_t volatile& r_clken1_pll() { return _reg32(cm_base_.get_virt(), 0xd00); }
|
|
uint32_t volatile& r_clken2_pll() { return _reg32(cm_base_.get_virt(), 0xd04); }
|
|
uint32_t volatile& r_idlest1_pll() { return _reg32(cm_base_.get_virt(), 0xd20); }
|
|
uint32_t volatile& r_idlest2_pll() { return _reg32(cm_base_.get_virt(), 0xd24); }
|
|
uint32_t volatile& r_autoidle_pll() { return _reg32(cm_base_.get_virt(), 0xd30); }
|
|
uint32_t volatile& r_autoidle2_pll() { return _reg32(cm_base_.get_virt(), 0xd34); }
|
|
uint32_t volatile& r_clksel1_pll() { return _reg32(cm_base_.get_virt(), 0xd40); }
|
|
uint32_t volatile& r_clksel2_pll() { return _reg32(cm_base_.get_virt(), 0xd44); }
|
|
uint32_t volatile& r_clksel3_pll() { return _reg32(cm_base_.get_virt(), 0xd48); }
|
|
uint32_t volatile& r_clksel4_pll() { return _reg32(cm_base_.get_virt(), 0xd4c); }
|
|
uint32_t volatile& r_clksel5_pll() { return _reg32(cm_base_.get_virt(), 0xd50); }
|
|
uint32_t volatile& r_clkout_ctrl() { return _reg32(cm_base_.get_virt(), 0xd70); }
|
|
|
|
uint32_t volatile& r_fclken_dss() { return _reg32(cm_base_.get_virt(), 0xe00); }
|
|
uint32_t volatile& r_iclken_dss() { return _reg32(cm_base_.get_virt(), 0xe10); }
|
|
uint32_t volatile& r_idlest_dss() { return _reg32(cm_base_.get_virt(), 0xe20); }
|
|
uint32_t volatile& r_autoidle_dss() { return _reg32(cm_base_.get_virt(), 0xe30); }
|
|
uint32_t volatile& r_clksel_dss() { return _reg32(cm_base_.get_virt(), 0xe40); }
|
|
uint32_t volatile& r_sleepdep_dss() { return _reg32(cm_base_.get_virt(), 0xe44); }
|
|
uint32_t volatile& r_clkstctrl_dss() { return _reg32(cm_base_.get_virt(), 0xe48); }
|
|
uint32_t volatile& r_clkstst_dss() { return _reg32(cm_base_.get_virt(), 0xe4c); }
|
|
|
|
uint32_t volatile& r_fclken_cam() { return _reg32(cm_base_.get_virt(), 0xf00); }
|
|
uint32_t volatile& r_iclken_cam() { return _reg32(cm_base_.get_virt(), 0xf10); }
|
|
uint32_t volatile& r_idlest_cam() { return _reg32(cm_base_.get_virt(), 0xf20); }
|
|
uint32_t volatile& r_autoidle_cam() { return _reg32(cm_base_.get_virt(), 0xf30); }
|
|
uint32_t volatile& r_clksel_cam() { return _reg32(cm_base_.get_virt(), 0xf40); }
|
|
uint32_t volatile& r_sleepdep_cam() { return _reg32(cm_base_.get_virt(), 0xf44); }
|
|
uint32_t volatile& r_clkstctrl_cam() { return _reg32(cm_base_.get_virt(), 0xf48); }
|
|
uint32_t volatile& r_clkstst_cam() { return _reg32(cm_base_.get_virt(), 0xf4c); }
|
|
|
|
uint32_t volatile& r_fclken_per() { return _reg32(cm_base_.get_virt(), 0x1000); }
|
|
uint32_t volatile& r_iclken_per() { return _reg32(cm_base_.get_virt(), 0x1010); }
|
|
uint32_t volatile& r_idlest_per() { return _reg32(cm_base_.get_virt(), 0x1020); }
|
|
uint32_t volatile& r_autoidle_per() { return _reg32(cm_base_.get_virt(), 0x1030); }
|
|
uint32_t volatile& r_clksel_per() { return _reg32(cm_base_.get_virt(), 0x1040); }
|
|
uint32_t volatile& r_sleepdep_per() { return _reg32(cm_base_.get_virt(), 0x1044); }
|
|
uint32_t volatile& r_clkstctrl_per() { return _reg32(cm_base_.get_virt(), 0x1048); }
|
|
uint32_t volatile& r_clkstst_per() { return _reg32(cm_base_.get_virt(), 0x104c); }
|
|
|
|
uint32_t volatile& r_idlest_neon() { return _reg32(cm_base_.get_virt(), 0x1320); }
|
|
uint32_t volatile& r_clkstctrl_neon() { return _reg32(cm_base_.get_virt(), 0x1348); }
|
|
|
|
uint32_t volatile& r_fclken_usbhost() { return _reg32(cm_base_.get_virt(), 0x1400); }
|
|
uint32_t volatile& r_iclken_usbhost() { return _reg32(cm_base_.get_virt(), 0x1410); }
|
|
uint32_t volatile& r_idlest_usbhost() { return _reg32(cm_base_.get_virt(), 0x1420); }
|
|
uint32_t volatile& r_autoidle_usbhost() { return _reg32(cm_base_.get_virt(), 0x1430); }
|
|
uint32_t volatile& r_clksel_usbhost() { return _reg32(cm_base_.get_virt(), 0x1440); }
|
|
uint32_t volatile& r_sleepdep_usbhost() { return _reg32(cm_base_.get_virt(), 0x1444); }
|
|
uint32_t volatile& r_clkstctrl_usbhost() { return _reg32(cm_base_.get_virt(), 0x1448); }
|
|
uint32_t volatile& r_clkstst_usbhost() { return _reg32(cm_base_.get_virt(), 0x144c); }
|
|
|
|
// PM registers
|
|
uint32_t volatile& r_rstctrl_iva2() {return _reg32(pm_base_.get_virt(), 0x50); }
|
|
uint32_t volatile& r_rstst_iva2() {return _reg32(pm_base_.get_virt(), 0x58); }
|
|
uint32_t volatile& r_wkdep_iva2() {return _reg32(pm_base_.get_virt(), 0xc8); }
|
|
uint32_t volatile& r_pwstctrl_iva2() {return _reg32(pm_base_.get_virt(), 0xe0); }
|
|
uint32_t volatile& r_pwstst_iva2() {return _reg32(pm_base_.get_virt(), 0xe4); }
|
|
uint32_t volatile& r_prepwstst_iva2() {return _reg32(pm_base_.get_virt(), 0xe8); }
|
|
uint32_t volatile& r_irqstatus_iva2() {return _reg32(pm_base_.get_virt(), 0xf8); }
|
|
uint32_t volatile& r_irqenable_iva2() {return _reg32(pm_base_.get_virt(), 0xfc); }
|
|
|
|
uint32_t volatile& r_rstst_mpu() {return _reg32(pm_base_.get_virt(), 0x958); }
|
|
uint32_t volatile& r_wkdep_mpu() {return _reg32(pm_base_.get_virt(), 0x9c8); }
|
|
uint32_t volatile& r_evgenctrl_mpu() {return _reg32(pm_base_.get_virt(), 0x9d4); }
|
|
uint32_t volatile& r_evgenontim_mpu() {return _reg32(pm_base_.get_virt(), 0x9d8); }
|
|
uint32_t volatile& r_evgenofftim_mpu() {return _reg32(pm_base_.get_virt(), 0x9dc); }
|
|
uint32_t volatile& r_pwstctrl_mpu() {return _reg32(pm_base_.get_virt(), 0x9e0); }
|
|
uint32_t volatile& r_pwstst_mpu() {return _reg32(pm_base_.get_virt(), 0x9e4); }
|
|
uint32_t volatile& r_prepwstst_mpu() {return _reg32(pm_base_.get_virt(), 0x9e8); }
|
|
|
|
uint32_t volatile& r_rstst_core() {return _reg32(pm_base_.get_virt(), 0xa58); }
|
|
uint32_t volatile& r_wken1_core() {return _reg32(pm_base_.get_virt(), 0xaa0); }
|
|
uint32_t volatile& r_mpugrpsel1_core() {return _reg32(pm_base_.get_virt(), 0xaa4); }
|
|
uint32_t volatile& r_iva2grpsel1_core() {return _reg32(pm_base_.get_virt(), 0xaa8); }
|
|
uint32_t volatile& r_wkst1_core() {return _reg32(pm_base_.get_virt(), 0xab0); }
|
|
uint32_t volatile& r_wkst3_core() {return _reg32(pm_base_.get_virt(), 0xab8); }
|
|
uint32_t volatile& r_pwstctrl_core() {return _reg32(pm_base_.get_virt(), 0xae0); }
|
|
uint32_t volatile& r_pwstst_core() {return _reg32(pm_base_.get_virt(), 0xae4); }
|
|
uint32_t volatile& r_prepwstst_core() {return _reg32(pm_base_.get_virt(), 0xae8); }
|
|
uint32_t volatile& r_wken3_core() {return _reg32(pm_base_.get_virt(), 0xaf0); }
|
|
uint32_t volatile& r_iva2grpsel3_core() {return _reg32(pm_base_.get_virt(), 0xaf4); }
|
|
uint32_t volatile& r_mpugrpsel3_core() {return _reg32(pm_base_.get_virt(), 0xaf8); }
|
|
|
|
uint32_t volatile& r_rstst_sgx() {return _reg32(pm_base_.get_virt(), 0xb58); }
|
|
uint32_t volatile& r_wkdep_sgx() {return _reg32(pm_base_.get_virt(), 0xbc8); }
|
|
uint32_t volatile& r_pwstctrl_sgx() {return _reg32(pm_base_.get_virt(), 0xbe0); }
|
|
uint32_t volatile& r_pwstst_sgx() {return _reg32(pm_base_.get_virt(), 0xbe4); }
|
|
uint32_t volatile& r_prepwstst_sgx() {return _reg32(pm_base_.get_virt(), 0xbe8); }
|
|
|
|
uint32_t volatile& r_wken_wkup() {return _reg32(pm_base_.get_virt(), 0xca0); }
|
|
uint32_t volatile& r_mpugrpsel_wkup() {return _reg32(pm_base_.get_virt(), 0xca4); }
|
|
uint32_t volatile& r_iva2grpsel_wkup() {return _reg32(pm_base_.get_virt(), 0xca8); }
|
|
uint32_t volatile& r_wkst_wkup() {return _reg32(pm_base_.get_virt(), 0xcb0); }
|
|
|
|
uint32_t volatile& r_rstst_dss() {return _reg32(pm_base_.get_virt(), 0xe58); }
|
|
uint32_t volatile& r_wken_dss() {return _reg32(pm_base_.get_virt(), 0xec8); }
|
|
uint32_t volatile& r_wkdep_dss() {return _reg32(pm_base_.get_virt(), 0xec8); }
|
|
uint32_t volatile& r_pwstctrl_dss() {return _reg32(pm_base_.get_virt(), 0xee0); }
|
|
uint32_t volatile& r_pwstst_dss() {return _reg32(pm_base_.get_virt(), 0xee4); }
|
|
uint32_t volatile& r_prepwstst_dss() {return _reg32(pm_base_.get_virt(), 0xee8); }
|
|
|
|
uint32_t volatile& r_rstst_cam() {return _reg32(pm_base_.get_virt(), 0xf58); }
|
|
uint32_t volatile& r_wkdep_cam() {return _reg32(pm_base_.get_virt(), 0xfc8); }
|
|
uint32_t volatile& r_pwstctrl_cam() {return _reg32(pm_base_.get_virt(), 0xfe0); }
|
|
uint32_t volatile& r_pwstst_cam() {return _reg32(pm_base_.get_virt(), 0xfe4); }
|
|
uint32_t volatile& r_prepwstst_cam() {return _reg32(pm_base_.get_virt(), 0xfe8); }
|
|
|
|
uint32_t volatile& r_rstst_per() {return _reg32(pm_base_.get_virt(), 0x1058); }
|
|
uint32_t volatile& r_wken_per() {return _reg32(pm_base_.get_virt(), 0x10a0); }
|
|
uint32_t volatile& r_mpugrpsel_per() {return _reg32(pm_base_.get_virt(), 0x10a4); }
|
|
uint32_t volatile& r_iva2grpsel_per() {return _reg32(pm_base_.get_virt(), 0x10a8); }
|
|
uint32_t volatile& r_wkst_per() {return _reg32(pm_base_.get_virt(), 0x10b0); }
|
|
uint32_t volatile& r_wkdep_per() {return _reg32(pm_base_.get_virt(), 0x10c8); }
|
|
uint32_t volatile& r_pwstctrl_per() {return _reg32(pm_base_.get_virt(), 0x10e0); }
|
|
uint32_t volatile& r_pwstst_per() {return _reg32(pm_base_.get_virt(), 0x10e4); }
|
|
uint32_t volatile& r_prepwstst_per() {return _reg32(pm_base_.get_virt(), 0x10e8); }
|
|
|
|
uint32_t volatile& r_rstst_neon() {return _reg32(pm_base_.get_virt(), 0x1358); }
|
|
uint32_t volatile& r_wkdep_neon() {return _reg32(pm_base_.get_virt(), 0x13c8); }
|
|
uint32_t volatile& r_pwstctrl_neon() {return _reg32(pm_base_.get_virt(), 0x13e0); }
|
|
uint32_t volatile& r_pwstst_neon() {return _reg32(pm_base_.get_virt(), 0x13e4); }
|
|
uint32_t volatile& r_prepwstst_neon() {return _reg32(pm_base_.get_virt(), 0x13e8); }
|
|
|
|
uint32_t volatile& r_rstst_usbhost() {return _reg32(pm_base_.get_virt(), 0x1458); }
|
|
uint32_t volatile& r_wken_usbhost() {return _reg32(pm_base_.get_virt(), 0x14a0); }
|
|
uint32_t volatile& r_mpugrpsel_usbhost() {return _reg32(pm_base_.get_virt(), 0x14a4); }
|
|
uint32_t volatile& r_iva2grpsel_usbhost() {return _reg32(pm_base_.get_virt(), 0x14a8); }
|
|
uint32_t volatile& r_wkst_usbhost() {return _reg32(pm_base_.get_virt(), 0x14b0); }
|
|
uint32_t volatile& r_wkdep_usbhost() {return _reg32(pm_base_.get_virt(), 0x14c8); }
|
|
uint32_t volatile& r_pwstctrl_usbhost() {return _reg32(pm_base_.get_virt(), 0x14e0); }
|
|
uint32_t volatile& r_pwstst_usbhost() {return _reg32(pm_base_.get_virt(), 0x14e4); }
|
|
uint32_t volatile& r_prepwstst_usbhost() {return _reg32(pm_base_.get_virt(), 0x14e8); }
|
|
};
|
|
|
|
|
|
OMAP35x_prcm::OMAP35x_prcm(uintptr_t cm_base, uintptr_t pm_base) : impl_(new OMAP35x_prcm_impl(cm_base, pm_base)) {
|
|
}
|
|
|
|
OMAP35x_prcm::~OMAP35x_prcm() {
|
|
}
|
|
|
|
void OMAP35x_prcm::enable_peripherals() {
|
|
impl_->enable_peripherals();
|
|
}
|
|
|
|
void OMAP35x_prcm::clear_wake_per(int n) {
|
|
impl_->clear_wake_per(n);
|
|
}
|
|
|
|
void OMAP35x_prcm::clear_wake_core(int n) {
|
|
impl_->clear_wake_core(n);
|
|
}
|
|
|
|
void OMAP35x_prcm::set_cpu_opp(int opp) {
|
|
impl_->set_cpu_opp(opp);
|
|
}
|
|
|
|
void OMAP35x_prcm::set_core_opp(int opp, int config) {
|
|
impl_->set_core_opp(opp, config);
|
|
}
|