mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
change(hal): remove useless code from periph_ll_wifi_bt_module_enable_clk
This commit is contained in:
@@ -47,7 +47,7 @@ IRAM_ATTR void wifi_bt_common_module_enable(void)
|
|||||||
{
|
{
|
||||||
portENTER_CRITICAL_SAFE(&periph_spinlock);
|
portENTER_CRITICAL_SAFE(&periph_spinlock);
|
||||||
if (ref_counts[PERIPH_WIFI_BT_COMMON_MODULE] == 0) {
|
if (ref_counts[PERIPH_WIFI_BT_COMMON_MODULE] == 0) {
|
||||||
periph_ll_wifi_bt_module_enable_clk_clear_rst();
|
periph_ll_wifi_bt_module_enable_clk();
|
||||||
}
|
}
|
||||||
ref_counts[PERIPH_WIFI_BT_COMMON_MODULE]++;
|
ref_counts[PERIPH_WIFI_BT_COMMON_MODULE]++;
|
||||||
portEXIT_CRITICAL_SAFE(&periph_spinlock);
|
portEXIT_CRITICAL_SAFE(&periph_spinlock);
|
||||||
@@ -58,7 +58,7 @@ IRAM_ATTR void wifi_bt_common_module_disable(void)
|
|||||||
portENTER_CRITICAL_SAFE(&periph_spinlock);
|
portENTER_CRITICAL_SAFE(&periph_spinlock);
|
||||||
ref_counts[PERIPH_WIFI_BT_COMMON_MODULE]--;
|
ref_counts[PERIPH_WIFI_BT_COMMON_MODULE]--;
|
||||||
if (ref_counts[PERIPH_WIFI_BT_COMMON_MODULE] == 0) {
|
if (ref_counts[PERIPH_WIFI_BT_COMMON_MODULE] == 0) {
|
||||||
periph_ll_wifi_bt_module_disable_clk_set_rst();
|
periph_ll_wifi_bt_module_disable_clk();
|
||||||
}
|
}
|
||||||
portEXIT_CRITICAL_SAFE(&periph_spinlock);
|
portEXIT_CRITICAL_SAFE(&periph_spinlock);
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -228,16 +228,14 @@ static inline void periph_ll_disable_clk_set_rst(periph_module_t periph)
|
|||||||
DPORT_SET_PERI_REG_MASK(periph_ll_get_rst_en_reg(periph), periph_ll_get_rst_en_mask(periph, false));
|
DPORT_SET_PERI_REG_MASK(periph_ll_get_rst_en_reg(periph), periph_ll_get_rst_en_mask(periph, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void IRAM_ATTR periph_ll_wifi_bt_module_enable_clk_clear_rst(void)
|
static inline void IRAM_ATTR periph_ll_wifi_bt_module_enable_clk(void)
|
||||||
{
|
{
|
||||||
DPORT_SET_PERI_REG_MASK(DPORT_WIFI_CLK_EN_REG, DPORT_WIFI_CLK_WIFI_BT_COMMON_M);
|
DPORT_SET_PERI_REG_MASK(DPORT_WIFI_CLK_EN_REG, DPORT_WIFI_CLK_WIFI_BT_COMMON_M);
|
||||||
DPORT_CLEAR_PERI_REG_MASK(DPORT_CORE_RST_EN_REG, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void IRAM_ATTR periph_ll_wifi_bt_module_disable_clk_set_rst(void)
|
static inline void IRAM_ATTR periph_ll_wifi_bt_module_disable_clk(void)
|
||||||
{
|
{
|
||||||
DPORT_CLEAR_PERI_REG_MASK(DPORT_WIFI_CLK_EN_REG, DPORT_WIFI_CLK_WIFI_BT_COMMON_M);
|
DPORT_CLEAR_PERI_REG_MASK(DPORT_WIFI_CLK_EN_REG, DPORT_WIFI_CLK_WIFI_BT_COMMON_M);
|
||||||
DPORT_SET_PERI_REG_MASK(DPORT_CORE_RST_EN_REG, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void periph_ll_reset(periph_module_t periph)
|
static inline void periph_ll_reset(periph_module_t periph)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -166,16 +166,14 @@ static inline void periph_ll_disable_clk_set_rst(periph_module_t periph)
|
|||||||
DPORT_SET_PERI_REG_MASK(periph_ll_get_rst_en_reg(periph), periph_ll_get_rst_en_mask(periph, false));
|
DPORT_SET_PERI_REG_MASK(periph_ll_get_rst_en_reg(periph), periph_ll_get_rst_en_mask(periph, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void IRAM_ATTR periph_ll_wifi_bt_module_enable_clk_clear_rst(void)
|
static inline void IRAM_ATTR periph_ll_wifi_bt_module_enable_clk(void)
|
||||||
{
|
{
|
||||||
DPORT_SET_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, SYSTEM_WIFI_CLK_WIFI_BT_COMMON_M);
|
DPORT_SET_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, SYSTEM_WIFI_CLK_WIFI_BT_COMMON_M);
|
||||||
DPORT_CLEAR_PERI_REG_MASK(SYSTEM_CORE_RST_EN_REG, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void IRAM_ATTR periph_ll_wifi_bt_module_disable_clk_set_rst(void)
|
static inline void IRAM_ATTR periph_ll_wifi_bt_module_disable_clk(void)
|
||||||
{
|
{
|
||||||
DPORT_CLEAR_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, SYSTEM_WIFI_CLK_WIFI_BT_COMMON_M);
|
DPORT_CLEAR_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, SYSTEM_WIFI_CLK_WIFI_BT_COMMON_M);
|
||||||
DPORT_SET_PERI_REG_MASK(SYSTEM_CORE_RST_EN_REG, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void periph_ll_reset(periph_module_t periph)
|
static inline void periph_ll_reset(periph_module_t periph)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -215,16 +215,14 @@ static inline void periph_ll_disable_clk_set_rst(periph_module_t periph)
|
|||||||
DPORT_SET_PERI_REG_MASK(periph_ll_get_rst_en_reg(periph), periph_ll_get_rst_en_mask(periph, false));
|
DPORT_SET_PERI_REG_MASK(periph_ll_get_rst_en_reg(periph), periph_ll_get_rst_en_mask(periph, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void IRAM_ATTR periph_ll_wifi_bt_module_enable_clk_clear_rst(void)
|
static inline void IRAM_ATTR periph_ll_wifi_bt_module_enable_clk(void)
|
||||||
{
|
{
|
||||||
DPORT_SET_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, SYSTEM_WIFI_CLK_WIFI_BT_COMMON_M);
|
DPORT_SET_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, SYSTEM_WIFI_CLK_WIFI_BT_COMMON_M);
|
||||||
DPORT_CLEAR_PERI_REG_MASK(SYSTEM_CORE_RST_EN_REG, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void IRAM_ATTR periph_ll_wifi_bt_module_disable_clk_set_rst(void)
|
static inline void IRAM_ATTR periph_ll_wifi_bt_module_disable_clk(void)
|
||||||
{
|
{
|
||||||
DPORT_CLEAR_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, SYSTEM_WIFI_CLK_WIFI_BT_COMMON_M);
|
DPORT_CLEAR_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, SYSTEM_WIFI_CLK_WIFI_BT_COMMON_M);
|
||||||
DPORT_SET_PERI_REG_MASK(SYSTEM_CORE_RST_EN_REG, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void periph_ll_reset(periph_module_t periph)
|
static inline void periph_ll_reset(periph_module_t periph)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -241,16 +241,14 @@ static inline void periph_ll_disable_clk_set_rst(periph_module_t periph)
|
|||||||
DPORT_SET_PERI_REG_MASK(periph_ll_get_rst_en_reg(periph), periph_ll_get_rst_en_mask(periph, false));
|
DPORT_SET_PERI_REG_MASK(periph_ll_get_rst_en_reg(periph), periph_ll_get_rst_en_mask(periph, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void IRAM_ATTR periph_ll_wifi_bt_module_enable_clk_clear_rst(void)
|
static inline void IRAM_ATTR periph_ll_wifi_bt_module_enable_clk(void)
|
||||||
{
|
{
|
||||||
DPORT_SET_PERI_REG_MASK(DPORT_WIFI_CLK_EN_REG, DPORT_WIFI_CLK_WIFI_BT_COMMON_M);
|
DPORT_SET_PERI_REG_MASK(DPORT_WIFI_CLK_EN_REG, DPORT_WIFI_CLK_WIFI_BT_COMMON_M);
|
||||||
DPORT_CLEAR_PERI_REG_MASK(DPORT_CORE_RST_EN_REG, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void IRAM_ATTR periph_ll_wifi_bt_module_disable_clk_set_rst(void)
|
static inline void IRAM_ATTR periph_ll_wifi_bt_module_disable_clk(void)
|
||||||
{
|
{
|
||||||
DPORT_CLEAR_PERI_REG_MASK(DPORT_WIFI_CLK_EN_REG, DPORT_WIFI_CLK_WIFI_BT_COMMON_M);
|
DPORT_CLEAR_PERI_REG_MASK(DPORT_WIFI_CLK_EN_REG, DPORT_WIFI_CLK_WIFI_BT_COMMON_M);
|
||||||
DPORT_SET_PERI_REG_MASK(DPORT_CORE_RST_EN_REG, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void periph_ll_reset(periph_module_t periph)
|
static inline void periph_ll_reset(periph_module_t periph)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -262,16 +262,14 @@ static inline void periph_ll_disable_clk_set_rst(periph_module_t periph)
|
|||||||
DPORT_SET_PERI_REG_MASK(periph_ll_get_rst_en_reg(periph), periph_ll_get_rst_en_mask(periph, false));
|
DPORT_SET_PERI_REG_MASK(periph_ll_get_rst_en_reg(periph), periph_ll_get_rst_en_mask(periph, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void IRAM_ATTR periph_ll_wifi_bt_module_enable_clk_clear_rst(void)
|
static inline void IRAM_ATTR periph_ll_wifi_bt_module_enable_clk(void)
|
||||||
{
|
{
|
||||||
DPORT_SET_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, SYSTEM_WIFI_CLK_WIFI_BT_COMMON_M);
|
DPORT_SET_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, SYSTEM_WIFI_CLK_WIFI_BT_COMMON_M);
|
||||||
DPORT_CLEAR_PERI_REG_MASK(SYSTEM_CORE_RST_EN_REG, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void IRAM_ATTR periph_ll_wifi_bt_module_disable_clk_set_rst(void)
|
static inline void IRAM_ATTR periph_ll_wifi_bt_module_disable_clk(void)
|
||||||
{
|
{
|
||||||
DPORT_CLEAR_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, SYSTEM_WIFI_CLK_WIFI_BT_COMMON_M);
|
DPORT_CLEAR_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, SYSTEM_WIFI_CLK_WIFI_BT_COMMON_M);
|
||||||
DPORT_SET_PERI_REG_MASK(SYSTEM_CORE_RST_EN_REG, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void periph_ll_reset(periph_module_t periph)
|
static inline void periph_ll_reset(periph_module_t periph)
|
||||||
|
Reference in New Issue
Block a user