boot: refactor i2c driver into namespace

This commit is contained in:
Michael Scire 2019-06-21 20:25:27 -07:00
parent e62754ed56
commit c87be7cd69
42 changed files with 1918 additions and 1836 deletions

View file

@ -28,11 +28,7 @@ static constexpr u32 ExpectedUtmipVal = (ExpectedUtmipDivN | ExpectedUtmipDivM)
static constexpr u32 ExpectedUtmipMask = 0xFFFF00;
static bool IsUsbClockValid() {
u64 _vaddr;
if (R_FAILED(svcQueryIoMapping(&_vaddr, 0x60006000ul, 0x1000))) {
std::abort();
}
volatile u32 *car_regs = reinterpret_cast<volatile u32 *>(_vaddr);
volatile u32 *car_regs = reinterpret_cast<volatile u32 *>(GetIoMapping(0x60006000ul, 0x1000));
const u32 pllu = car_regs[0xC0 >> 2];
const u32 utmip = car_regs[0x480 >> 2];