return vlv_punit_rw(IOSF_PORT_PUNIT, PUNIT_OPCODE_REG_READ, addr, val);
}
-int intel_punit_write(uint8_t addr, uint32_t val)
+static int intel_punit_write(uint8_t addr, uint32_t val) __attribute__ ((unused));
+static int intel_punit_write(uint8_t addr, uint32_t val)
{
return vlv_punit_rw(IOSF_PORT_PUNIT, PUNIT_OPCODE_REG_WRITE, addr, &val);
}
return vlv_punit_rw(IOSF_PORT_NC, PUNIT_OPCODE_REG_READ, addr, val);
}
-int intel_nc_write(uint8_t addr, uint32_t val)
+static int intel_nc_write(uint8_t addr, uint32_t val) __attribute__ ((unused));
+static int intel_nc_write(uint8_t addr, uint32_t val)
{
return vlv_punit_rw(IOSF_PORT_NC, PUNIT_OPCODE_REG_WRITE, addr, &val);
}
mmio_data.inited++;
return 0;
}
+static int
+intel_register_access_needs_wake(void)
+{
+ return mmio_data.key != FAKEKEY;
+}
void
intel_register_access_fini(void)
{
- if (mmio_data.key && mmio_data.key != FAKEKEY)
+ if (mmio_data.key && intel_register_access_needs_wake())
release_forcewake_lock(mmio_data.key);
mmio_data.inited--;
}
-int
-intel_register_access_needs_wake(void)
-{
- return mmio_data.key == FAKEKEY;
-}
-
uint32_t
intel_register_read(uint32_t reg)
{