change(esp_hw_support): always do hardware clock enable in modem module enabling

This commit is contained in:
wuzhenghui
2025-07-08 15:32:45 +08:00
parent c6d13ec757
commit ee7ba66736

View File

@@ -193,16 +193,13 @@ esp_err_t modem_clock_domain_clk_gate_disable(modem_clock_domain_t domain, pmu_h
static void IRAM_ATTR modem_clock_device_enable(modem_clock_context_t *ctx, uint32_t dev_map)
{
int16_t refs = 0;
portENTER_CRITICAL_SAFE(&ctx->lock);
for (int i = 0; dev_map; dev_map >>= 1, i++) {
if (dev_map & BIT(0)) {
refs = ctx->dev[i].refs++;
if (refs == 0) {
ctx->dev[i].refs++;
(*ctx->dev[i].configure)(ctx, true);
}
}
}
portEXIT_CRITICAL_SAFE(&ctx->lock);
}