Fix fuse_get_hardware_type for 4.x

This commit is contained in:
TuxSH
2018-03-07 23:24:38 +01:00
parent d5bb96c0f8
commit a409016a88
2 changed files with 4 additions and 3 deletions

View File

@@ -185,7 +185,8 @@ uint32_t fuse_get_hardware_type(void) {
if (mkey_get_revision() >= MASTERKEY_REVISION_400_CURRENT) {
static const uint32_t types[] = {0,1,4,3};
hardware_type |= ((FUSE_CHIP_REGS->FUSE_RESERVED_ODM[4] >> 14) & 0x3C) - 1;
hardware_type |= (FUSE_CHIP_REGS->FUSE_RESERVED_ODM[4] >> 14) & 0x3C;
hardware_type--;
return hardware_type > 3 ? 4 : types[hardware_type];
} else {
if (hardware_type >= 1) {