mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 10:40:47 +03:00
Merge branch 'fix/fix_i2c_modem_clock_ref_count_mismatch_v6.0' into 'release/v6.0'
feat(esp_hw_support): add reference count control & clock enable checking for modem clock devices (v6.0) See merge request espressif/esp-idf!45533
This commit is contained in:
@@ -25,6 +25,12 @@ static inline void modem_lpcon_ll_enable_test_clk(modem_lpcon_dev_t *hw, bool en
|
||||
hw->test_conf.clk_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_lpcon_ll_test_clk_is_enabled(modem_lpcon_dev_t *hw)
|
||||
{
|
||||
return hw->test_conf.clk_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_lpcon_ll_enable_coex_lpclk_slow_osc(modem_lpcon_dev_t *hw, bool en)
|
||||
{
|
||||
@@ -67,12 +73,24 @@ static inline void modem_lpcon_ll_enable_coex_clock(modem_lpcon_dev_t *hw, bool
|
||||
hw->clk_conf.clk_coex_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_lpcon_ll_coex_clock_is_enabled(modem_lpcon_dev_t *hw)
|
||||
{
|
||||
return hw->clk_conf.clk_coex_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_lpcon_ll_enable_fe_mem_clock(modem_lpcon_dev_t *hw, bool en)
|
||||
{
|
||||
hw->clk_conf.clk_fe_mem_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_lpcon_ll_fe_mem_clock_is_enabled(modem_lpcon_dev_t *hw)
|
||||
{
|
||||
return hw->clk_conf.clk_fe_mem_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_lpcon_ll_enable_coex_force_clock(modem_lpcon_dev_t *hw, bool en)
|
||||
{
|
||||
|
||||
@@ -25,6 +25,12 @@ static inline void modem_syscon_ll_enable_test_clk(modem_syscon_dev_t *hw, bool
|
||||
hw->test_conf.clk_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_test_clk_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return hw->test_conf.clk_en;
|
||||
}
|
||||
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_syscon_ll_enable_data_dump_mux_clock(modem_syscon_dev_t *hw, bool en)
|
||||
@@ -32,24 +38,48 @@ static inline void modem_syscon_ll_enable_data_dump_mux_clock(modem_syscon_dev_t
|
||||
// ESP32H2 Not Support
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_data_dump_mux_clock_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_syscon_ll_enable_etm_clock(modem_syscon_dev_t *hw, bool en)
|
||||
{
|
||||
hw->clk_conf.clk_etm_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_etm_clock_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return hw->clk_conf.clk_etm_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_syscon_ll_enable_ieee802154_apb_clock(modem_syscon_dev_t *hw, bool en)
|
||||
{
|
||||
hw->clk_conf.clk_zb_apb_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_ieee802154_apb_clock_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return hw->clk_conf.clk_zb_apb_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_syscon_ll_enable_ieee802154_mac_clock(modem_syscon_dev_t *hw, bool en)
|
||||
{
|
||||
hw->clk_conf.clk_zb_mac_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_ieee802154_mac_clock_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return hw->clk_conf.clk_zb_mac_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_syscon_ll_enable_modem_sec_clock(modem_syscon_dev_t *hw, bool en)
|
||||
{
|
||||
@@ -60,6 +90,16 @@ static inline void modem_syscon_ll_enable_modem_sec_clock(modem_syscon_dev_t *hw
|
||||
hw->clk_conf.clk_modem_sec_apb_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_modem_sec_clock_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return hw->clk_conf.clk_modem_sec_en &&
|
||||
hw->clk_conf.clk_modem_sec_ecb_en &&
|
||||
hw->clk_conf.clk_modem_sec_ccm_en &&
|
||||
hw->clk_conf.clk_modem_sec_bah_en &&
|
||||
hw->clk_conf.clk_modem_sec_apb_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_syscon_ll_enable_ble_timer_clock(modem_syscon_dev_t *hw, bool en)
|
||||
{
|
||||
@@ -67,12 +107,25 @@ static inline void modem_syscon_ll_enable_ble_timer_clock(modem_syscon_dev_t *hw
|
||||
hw->clk_conf.clk_ble_timer_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_ble_timer_clock_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return hw->clk_conf.clk_ble_timer_apb_en &&
|
||||
hw->clk_conf.clk_ble_timer_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_syscon_ll_enable_data_dump_clock(modem_syscon_dev_t *hw, bool en)
|
||||
{
|
||||
hw->clk_conf.clk_data_dump_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_data_dump_clock_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return hw->clk_conf.clk_data_dump_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_syscon_ll_enable_etm_force_clock(modem_syscon_dev_t *hw)
|
||||
{
|
||||
@@ -209,12 +262,23 @@ static inline void modem_syscon_ll_enable_fe_16m_clock(modem_syscon_dev_t *hw, b
|
||||
hw->clk_conf1.clk_fe_16m_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_fe_16m_clock_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return hw->clk_conf1.clk_fe_16m_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_syscon_ll_enable_fe_32m_clock(modem_syscon_dev_t *hw, bool en)
|
||||
{
|
||||
hw->clk_conf1.clk_fe_32m_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_fe_32m_clock_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return hw->clk_conf1.clk_fe_32m_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_syscon_ll_enable_fe_sdm_clock(modem_syscon_dev_t *hw, bool en)
|
||||
@@ -222,27 +286,58 @@ static inline void modem_syscon_ll_enable_fe_sdm_clock(modem_syscon_dev_t *hw, b
|
||||
hw->clk_conf1.clk_fe_sdm_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_fe_sdm_clock_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return hw->clk_conf1.clk_fe_sdm_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_syscon_ll_enable_fe_adc_clock(modem_syscon_dev_t *hw, bool en)
|
||||
{
|
||||
hw->clk_conf1.clk_fe_adc_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_fe_adc_clock_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return hw->clk_conf1.clk_fe_adc_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_syscon_ll_enable_fe_apb_clock(modem_syscon_dev_t *hw, bool en)
|
||||
{
|
||||
hw->clk_conf1.clk_fe_apb_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_fe_apb_clock_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return hw->clk_conf1.clk_fe_apb_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_syscon_ll_enable_bt_apb_clock(modem_syscon_dev_t *hw, bool en)
|
||||
{
|
||||
hw->clk_conf1.clk_bt_apb_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_bt_apb_clock_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return hw->clk_conf1.clk_bt_apb_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_syscon_ll_enable_bt_mac_clock(modem_syscon_dev_t *hw, bool en)
|
||||
{
|
||||
// ESP32H2 Not Support
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_bt_mac_clock_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
@@ -251,6 +346,12 @@ static inline void modem_syscon_ll_enable_bt_clock(modem_syscon_dev_t *hw, bool
|
||||
hw->clk_conf1.clk_bt_en = en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline bool modem_syscon_ll_bt_clock_is_enabled(modem_syscon_dev_t *hw)
|
||||
{
|
||||
return hw->clk_conf1.clk_bt_en;
|
||||
}
|
||||
|
||||
__attribute__((always_inline))
|
||||
static inline void modem_syscon_ll_enable_fe_force_clock(modem_syscon_dev_t *hw, bool en)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user