mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
refactor(esp_hw_support): move regdma structure defination to soc components
This commit is contained in:
@@ -285,16 +285,24 @@ inline __attribute__((always_inline)) bool sleep_modem_wifi_modem_link_done(void
|
||||
bool modem_domain_pd_allowed(void)
|
||||
{
|
||||
#if SOC_PM_MODEM_RETENTION_BY_REGDMA
|
||||
bool modem_domain_pd_allowed = false;
|
||||
const uint32_t modules = sleep_retention_get_modules();
|
||||
#if SOC_WIFI_SUPPORTED
|
||||
const uint32_t mask_wifi = (const uint32_t) (SLEEP_RETENTION_MODULE_WIFI_MAC |
|
||||
SLEEP_RETENTION_MODULE_WIFI_BB);
|
||||
modem_domain_pd_allowed |= ((modules & mask_wifi) == mask_wifi);
|
||||
#endif
|
||||
#if SOC_BT_SUPPORTED
|
||||
const uint32_t mask_ble = (const uint32_t) (SLEEP_RETENTION_MODULE_BLE_MAC |
|
||||
SLEEP_RETENTION_MODULE_BT_BB);
|
||||
modem_domain_pd_allowed |= ((modules & mask_ble) == mask_ble);
|
||||
#endif
|
||||
#if SOC_IEEE802154_SUPPORTED
|
||||
const uint32_t mask_154 = (const uint32_t) (SLEEP_RETENTION_MODULE_802154_MAC |
|
||||
SLEEP_RETENTION_MODULE_BT_BB);
|
||||
return (((modules & mask_wifi) == mask_wifi) ||
|
||||
((modules & mask_ble) == mask_ble) ||
|
||||
((modules & mask_154) == mask_154));
|
||||
modem_domain_pd_allowed |= ((modules & mask_154) == mask_154);
|
||||
#endif
|
||||
return modem_domain_pd_allowed;
|
||||
#else
|
||||
return false; /* MODEM power domain is controlled by each module (WiFi, Bluetooth or 15.4) of modem */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user