aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Kay <chris.kay@arm.com>2020-06-08 18:05:57 +0100
committerjimqui01 <54316584+jimqui01@users.noreply.github.com>2020-06-09 19:26:33 +0100
commit7b01ad8451e9a6088584d70d799feb64e818e17e (patch)
treeb96559de36bb6f5cdaea40db06e0e1517cee01e8
parent6094316869ea7549559acb738a73dc284313379c (diff)
misc: Replace `assert()` calls with `fwk_assert()`
This commit replaces any call to `assert()` outside of the framework with a call to `fwk_assert()`. Change-Id: I83325af5892ac6b8b6b66a6586345d0988ca725e Signed-off-by: Chris Kay <chris.kay@arm.com>
-rw-r--r--arch/none/host/src/arch_thread.c6
-rw-r--r--framework/src/fwk_dlist.c30
-rw-r--r--framework/src/fwk_id.c40
-rw-r--r--framework/src/fwk_multi_thread.c10
-rw-r--r--framework/src/fwk_notification.c2
-rw-r--r--framework/src/fwk_slist.c38
-rw-r--r--module/apcontext/src/mod_apcontext.c5
-rw-r--r--module/armv7m_mpu/src/mod_armv7m_mpu.c4
-rw-r--r--module/cmn600/src/cmn600.c8
-rw-r--r--module/cmn600/src/mod_cmn600.c19
-rw-r--r--module/cmn_booker/src/mod_cmn_booker.c19
-rw-r--r--module/cmn_rhodes/src/mod_cmn_rhodes.c18
-rw-r--r--module/ddr_phy500/src/mod_ddr_phy500.c4
-rw-r--r--module/debugger_cli/src/mod_debugger_cli.c2
-rw-r--r--module/dmc500/src/mod_dmc500.c4
-rw-r--r--module/dmc620/src/mod_dmc620.c9
-rw-r--r--module/gtimer/src/mod_gtimer.c5
-rw-r--r--module/mhu2/src/mod_mhu2.c18
-rw-r--r--module/msys_rom/src/mod_msys_rom.c7
-rw-r--r--module/pcid/src/mod_pcid.c4
-rw-r--r--module/pik_clock/src/mod_pik_clock.c6
-rw-r--r--module/pl011/src/mod_pl011.c4
-rw-r--r--module/power_domain/src/mod_power_domain.c18
-rw-r--r--module/ppu_v0/src/mod_ppu_v0.c12
-rw-r--r--module/ppu_v0/src/ppu_v0.c12
-rw-r--r--module/ppu_v1/src/mod_ppu_v1.c48
-rw-r--r--module/ppu_v1/src/ppu_v1.c78
-rw-r--r--module/scmi/src/mod_scmi.c2
-rw-r--r--module/scmi_apcore/src/mod_scmi_apcore.c5
-rw-r--r--module/scmi_clock/src/mod_scmi_clock.c6
-rw-r--r--module/scmi_perf/src/mod_scmi_perf.c2
-rw-r--r--module/scmi_power_domain/src/mod_scmi_power_domain.c2
-rw-r--r--module/scmi_sensor/src/mod_scmi_sensor.c24
-rw-r--r--module/scmi_system_power/src/mod_scmi_system_power.c2
-rw-r--r--module/sid/src/mod_sid.c7
-rw-r--r--module/smt/src/mod_smt.c25
-rw-r--r--module/timer/src/mod_timer.c30
-rw-r--r--product/n1sdp/module/n1sdp_flash/src/mod_n1sdp_flash.c4
-rw-r--r--product/n1sdp/module/n1sdp_pcie/src/n1sdp_pcie.c20
-rw-r--r--product/n1sdp/module/n1sdp_pcie/src/pcie_enumeration.c4
-rw-r--r--product/n1sdp/module/n1sdp_smt/src/mod_smt.c27
-rw-r--r--product/n1sdp/module/n1sdp_system/src/mod_n1sdp_system.c2
-rw-r--r--product/n1sdp/module/scmi_management/src/mod_scmi_management.c2
-rw-r--r--product/n1sdp/scp_ramfw/config_ppu_v1.c2
-rw-r--r--product/n1sdp/src/n1sdp_core.c2
-rw-r--r--product/rddaniel/module/rddaniel_system/src/mod_rddaniel_system.c2
-rw-r--r--product/rddanielxlr/module/rddanielxlr_system/src/mod_rddanielxlr_system.c2
-rw-r--r--product/rdn1e1/module/rdn1e1_system/src/mod_rdn1e1_system.c2
-rw-r--r--product/rdn1e1/scp_ramfw/config_ppu_v1.c2
-rw-r--r--product/sgi575/module/sgi575_system/src/mod_sgi575_system.c2
-rw-r--r--product/sgi575/scp_ramfw/config_ppu_v1.c2
-rw-r--r--product/synquacer/module/ccn512/src/mod_ccn512.c6
-rw-r--r--product/synquacer/module/ppu_v0_synquacer/src/mod_ppu_v0.c12
-rw-r--r--product/synquacer/module/ppu_v0_synquacer/src/ppu_v0.c12
-rw-r--r--product/synquacer/module/scmi_vendor_ext/src/mod_scmi_vendor_ext.c6
-rw-r--r--product/synquacer/module/synquacer_memc/src/synquacer_ddr.c4
-rw-r--r--product/synquacer/module/synquacer_pik_clock/src/mod_synquacer_pik_clock.c6
-rw-r--r--product/synquacer/module/synquacer_system/src/synquacer_main.c2
-rw-r--r--product/synquacer/module/synquacer_system/src/sysoc.c2
-rw-r--r--product/tc0/module/tc0_system/src/mod_tc0_system.c2
60 files changed, 332 insertions, 330 deletions
diff --git a/arch/none/host/src/arch_thread.c b/arch/none/host/src/arch_thread.c
index 76e052a6..d68cc9b7 100644
--- a/arch/none/host/src/arch_thread.c
+++ b/arch/none/host/src/arch_thread.c
@@ -118,8 +118,8 @@ uint32_t osThreadFlagsWait(uint32_t flags, uint32_t options, uint32_t timeout)
bool wait;
uint32_t tmp_signal_flags;
- assert(flags != 0);
- assert(timeout == osWaitForever);
+ fwk_assert(flags != 0);
+ fwk_assert(timeout == osWaitForever);
while (true) {
switch (options) {
@@ -130,7 +130,7 @@ uint32_t osThreadFlagsWait(uint32_t flags, uint32_t options, uint32_t timeout)
wait = (local_thread_data->signal_flags & flags) != flags;
break;
default:
- assert(false);
+ fwk_assert(false);
}
if (!wait)
diff --git a/framework/src/fwk_dlist.c b/framework/src/fwk_dlist.c
index 05b6f200..5af1ae23 100644
--- a/framework/src/fwk_dlist.c
+++ b/framework/src/fwk_dlist.c
@@ -18,8 +18,8 @@ void __fwk_dlist_push_head(
struct fwk_dlist *list,
struct fwk_dlist_node *new)
{
- assert(list != NULL);
- assert(new != NULL);
+ fwk_assert(list != NULL);
+ fwk_assert(new != NULL);
fwk_check(new->prev == NULL);
new->prev = (struct fwk_dlist_node *)list;
@@ -34,8 +34,8 @@ void __fwk_dlist_push_tail(
struct fwk_dlist *list,
struct fwk_dlist_node *new)
{
- assert(list != NULL);
- assert(new != NULL);
+ fwk_assert(list != NULL);
+ fwk_assert(new != NULL);
fwk_check(new->prev == NULL);
new->prev = list->tail;
@@ -49,7 +49,7 @@ struct fwk_dlist_node *__fwk_dlist_pop_head(struct fwk_dlist *list)
{
struct fwk_dlist_node *popped;
- assert(list != NULL);
+ fwk_assert(list != NULL);
popped = (struct fwk_dlist_node *)__fwk_slist_pop_head(
(struct fwk_slist *)list);
@@ -66,11 +66,11 @@ void __fwk_dlist_remove(
struct fwk_dlist *list,
struct fwk_dlist_node *node)
{
- assert(list != NULL);
- assert(node != NULL);
- assert(node != (struct fwk_dlist_node *)list);
- assert(node->prev != NULL);
- assert(node->next != NULL);
+ fwk_assert(list != NULL);
+ fwk_assert(node != NULL);
+ fwk_assert(node != (struct fwk_dlist_node *)list);
+ fwk_assert(node->prev != NULL);
+ fwk_assert(node->next != NULL);
assert(__fwk_slist_contains(
(struct fwk_slist *)list,
@@ -88,9 +88,9 @@ void __fwk_dlist_insert(
struct fwk_dlist_node *restrict new,
struct fwk_dlist_node *restrict node)
{
- assert(list != NULL);
- assert(new != NULL);
- assert(new != node);
+ fwk_assert(list != NULL);
+ fwk_assert(new != NULL);
+ fwk_assert(new != node);
fwk_check(new->next == NULL);
fwk_check(new->prev == NULL);
@@ -100,8 +100,8 @@ void __fwk_dlist_insert(
return;
}
- assert(node->prev != NULL);
- assert(node->next != NULL);
+ fwk_assert(node->prev != NULL);
+ fwk_assert(node->next != NULL);
assert(__fwk_slist_contains(
(struct fwk_slist *)list,
diff --git a/framework/src/fwk_id.c b/framework/src/fwk_id.c
index da0292c9..1d148f3b 100644
--- a/framework/src/fwk_id.c
+++ b/framework/src/fwk_id.c
@@ -20,8 +20,8 @@ struct __fwk_id_fmt __fwk_id_str(fwk_id_t id)
{
struct __fwk_id_fmt fmt;
- assert(id.common.type != __FWK_ID_TYPE_INVALID);
- assert(id.common.type < __FWK_ID_TYPE_COUNT);
+ fwk_assert(id.common.type != __FWK_ID_TYPE_INVALID);
+ fwk_assert(id.common.type < __FWK_ID_TYPE_COUNT);
switch (id.common.type) {
case FWK_ID_TYPE_MODULE:
@@ -65,56 +65,56 @@ struct __fwk_id_fmt __fwk_id_str(fwk_id_t id)
bool fwk_id_is_type(fwk_id_t id, enum fwk_id_type type)
{
- assert(id.common.type != __FWK_ID_TYPE_INVALID);
- assert(id.common.type < __FWK_ID_TYPE_COUNT);
+ fwk_assert(id.common.type != __FWK_ID_TYPE_INVALID);
+ fwk_assert(id.common.type < __FWK_ID_TYPE_COUNT);
return id.common.type == type;
}
enum fwk_id_type fwk_id_get_type(fwk_id_t id)
{
- assert(id.common.type != __FWK_ID_TYPE_INVALID);
- assert(id.common.type < __FWK_ID_TYPE_COUNT);
+ fwk_assert(id.common.type != __FWK_ID_TYPE_INVALID);
+ fwk_assert(id.common.type < __FWK_ID_TYPE_COUNT);
return id.common.type;
}
bool fwk_id_is_equal(fwk_id_t left, fwk_id_t right)
{
- assert(left.common.type != __FWK_ID_TYPE_INVALID);
- assert(left.common.type < __FWK_ID_TYPE_COUNT);
+ fwk_assert(left.common.type != __FWK_ID_TYPE_INVALID);
+ fwk_assert(left.common.type < __FWK_ID_TYPE_COUNT);
return left.value == right.value;
}
fwk_id_t fwk_id_build_module_id(fwk_id_t id)
{
- assert(id.common.type != __FWK_ID_TYPE_INVALID);
- assert(id.common.type < __FWK_ID_TYPE_COUNT);
+ fwk_assert(id.common.type != __FWK_ID_TYPE_INVALID);
+ fwk_assert(id.common.type < __FWK_ID_TYPE_COUNT);
return FWK_ID_MODULE(id.common.module_idx);
}
fwk_id_t fwk_id_build_element_id(fwk_id_t id, unsigned int element_idx)
{
- assert(id.common.type != __FWK_ID_TYPE_INVALID);
- assert(id.common.type < __FWK_ID_TYPE_COUNT);
+ fwk_assert(id.common.type != __FWK_ID_TYPE_INVALID);
+ fwk_assert(id.common.type < __FWK_ID_TYPE_COUNT);
return FWK_ID_ELEMENT(id.common.module_idx, element_idx);
}
fwk_id_t fwk_id_build_api_id(fwk_id_t id, unsigned int api_idx)
{
- assert(id.common.type != __FWK_ID_TYPE_INVALID);
- assert(id.common.type < __FWK_ID_TYPE_COUNT);
+ fwk_assert(id.common.type != __FWK_ID_TYPE_INVALID);
+ fwk_assert(id.common.type < __FWK_ID_TYPE_COUNT);
return FWK_ID_API(id.common.module_idx, api_idx);
}
unsigned int fwk_id_get_module_idx(fwk_id_t id)
{
- assert(id.common.type != __FWK_ID_TYPE_INVALID);
- assert(id.common.type < __FWK_ID_TYPE_COUNT);
+ fwk_assert(id.common.type != __FWK_ID_TYPE_INVALID);
+ fwk_assert(id.common.type < __FWK_ID_TYPE_COUNT);
return id.common.module_idx;
}
@@ -129,28 +129,28 @@ unsigned int fwk_id_get_element_idx(fwk_id_t element_id)
unsigned int fwk_id_get_sub_element_idx(fwk_id_t sub_element_id)
{
- assert(sub_element_id.common.type == __FWK_ID_TYPE_SUB_ELEMENT);
+ fwk_assert(sub_element_id.common.type == __FWK_ID_TYPE_SUB_ELEMENT);
return sub_element_id.sub_element.sub_element_idx;
}
unsigned int fwk_id_get_api_idx(fwk_id_t api_id)
{
- assert(api_id.common.type == __FWK_ID_TYPE_API);
+ fwk_assert(api_id.common.type == __FWK_ID_TYPE_API);
return api_id.api.api_idx;
}
unsigned int fwk_id_get_event_idx(fwk_id_t event_id)
{
- assert(event_id.common.type == __FWK_ID_TYPE_EVENT);
+ fwk_assert(event_id.common.type == __FWK_ID_TYPE_EVENT);
return event_id.event.event_idx;
}
unsigned int fwk_id_get_notification_idx(fwk_id_t notification_id)
{
- assert(notification_id.common.type == __FWK_ID_TYPE_NOTIFICATION);
+ fwk_assert(notification_id.common.type == __FWK_ID_TYPE_NOTIFICATION);
return notification_id.notification.notification_idx;
}
diff --git a/framework/src/fwk_multi_thread.c b/framework/src/fwk_multi_thread.c
index faa0c121..6f27c27f 100644
--- a/framework/src/fwk_multi_thread.c
+++ b/framework/src/fwk_multi_thread.c
@@ -106,7 +106,7 @@ static struct fwk_event *duplicate_event(struct fwk_event *event)
{
struct fwk_event *allocated_event;
- assert(event != NULL);
+ fwk_assert(event != NULL);
fwk_interrupt_global_disable();
allocated_event = FWK_LIST_GET(fwk_list_pop_head(&ctx.event_free_queue),
@@ -121,7 +121,7 @@ static struct fwk_event *duplicate_event(struct fwk_event *event)
return allocated_event;
}
- assert(false);
+ fwk_assert(false);
FWK_LOG_CRIT(err_msg_func, FWK_E_NOMEM, __func__);
return NULL;
}
@@ -357,7 +357,7 @@ static void process_next_thread_event(struct __fwk_thread_ctx *thread_ctx)
ctx.current_event = event =
FWK_LIST_GET(fwk_list_pop_head(&thread_ctx->event_queue),
struct fwk_event, slist_node);
- assert(event != NULL);
+ fwk_assert(event != NULL);
if (event->response_requested)
process_event_requiring_response(event);
@@ -519,7 +519,7 @@ static void thread_function(struct __fwk_thread_ctx *thread_ctx,
static void specific_thread_function(void *arg)
{
- assert(arg != NULL);
+ fwk_assert(arg != NULL);
thread_function((struct __fwk_thread_ctx *)arg, NULL);
}
@@ -547,7 +547,7 @@ static void get_next_isr_event(void)
struct fwk_event, slist_node);
fwk_interrupt_global_enable();
- assert(isr_event != NULL);
+ fwk_assert(isr_event != NULL);
FWK_LOG_TRACE(
"[FWK] Get ISR event (%s: %s -> %s)\n",
diff --git a/framework/src/fwk_notification.c b/framework/src/fwk_notification.c
index d382e02d..997dff1c 100644
--- a/framework/src/fwk_notification.c
+++ b/framework/src/fwk_notification.c
@@ -205,7 +205,7 @@ int fwk_notification_subscribe(fwk_id_t notification_id, fwk_id_t source_id,
if (subscription == NULL) {
status = FWK_E_NOMEM;
- assert(false);
+ fwk_assert(false);
goto error;
}
diff --git a/framework/src/fwk_slist.c b/framework/src/fwk_slist.c
index ef10d9b1..46feb99e 100644
--- a/framework/src/fwk_slist.c
+++ b/framework/src/fwk_slist.c
@@ -17,7 +17,7 @@
void __fwk_slist_init(struct fwk_slist *list)
{
- assert(list != NULL);
+ fwk_assert(list != NULL);
list->head = (struct fwk_slist_node *)list;
list->tail = (struct fwk_slist_node *)list;
@@ -25,7 +25,7 @@ void __fwk_slist_init(struct fwk_slist *list)
struct fwk_slist_node *__fwk_slist_head(const struct fwk_slist *list)
{
- assert(list != NULL);
+ fwk_assert(list != NULL);
if (fwk_list_is_empty(list))
return NULL;
@@ -37,12 +37,12 @@ bool __fwk_slist_is_empty(const struct fwk_slist *list)
{
bool is_empty;
- assert(list != NULL);
+ fwk_assert(list != NULL);
is_empty = list->head == (struct fwk_slist_node *)list;
if (is_empty)
- assert(list->tail == list->head);
+ fwk_assert(list->tail == list->head);
return is_empty;
}
@@ -51,8 +51,8 @@ void __fwk_slist_push_head(
struct fwk_slist *list,
struct fwk_slist_node *new)
{
- assert(list != NULL);
- assert(new != NULL);
+ fwk_assert(list != NULL);
+ fwk_assert(new != NULL);
fwk_check(new->next == NULL);
new->next = list->head;
@@ -66,8 +66,8 @@ void __fwk_slist_push_tail(
struct fwk_slist *list,
struct fwk_slist_node *new)
{
- assert(list != NULL);
- assert(new != NULL);
+ fwk_assert(list != NULL);
+ fwk_assert(new != NULL);
fwk_check(new->next == NULL);
new->next = (struct fwk_slist_node *)list;
@@ -80,7 +80,7 @@ struct fwk_slist_node *__fwk_slist_pop_head(struct fwk_slist *list)
{
struct fwk_slist_node *popped;
- assert(list != NULL);
+ fwk_assert(list != NULL);
if (fwk_list_is_empty(list))
return NULL;
@@ -100,10 +100,10 @@ struct fwk_slist_node *__fwk_slist_next(
const struct fwk_slist *list,
const struct fwk_slist_node *node)
{
- assert(list != NULL);
- assert(node != NULL);
+ fwk_assert(list != NULL);
+ fwk_assert(node != NULL);
- assert(__fwk_slist_contains(list, node));
+ fwk_assert(__fwk_slist_contains(list, node));
return (node->next == (struct fwk_slist_node *)list) ? NULL : node->next;
}
@@ -112,9 +112,9 @@ void __fwk_slist_remove(
struct fwk_slist *list,
struct fwk_slist_node *node)
{
- assert(list != NULL);
- assert(node != NULL);
- assert(node->next != NULL);
+ fwk_assert(list != NULL);
+ fwk_assert(node != NULL);
+ fwk_assert(node->next != NULL);
struct fwk_slist_node *node_iter = (struct fwk_slist_node *)list;
@@ -132,7 +132,7 @@ void __fwk_slist_remove(
node_iter = node_iter->next;
}
- assert(false);
+ fwk_assert(false);
}
bool __fwk_slist_contains(
@@ -141,9 +141,9 @@ bool __fwk_slist_contains(
{
const struct fwk_slist_node *node_iter;
- assert(list != NULL);
- assert(node != NULL);
- assert(node->next != NULL);
+ fwk_assert(list != NULL);
+ fwk_assert(node != NULL);
+ fwk_assert(node->next != NULL);
node_iter = (struct fwk_slist_node *)list;
diff --git a/module/apcontext/src/mod_apcontext.c b/module/apcontext/src/mod_apcontext.c
index 413606f5..ad5e3918 100644
--- a/module/apcontext/src/mod_apcontext.c
+++ b/module/apcontext/src/mod_apcontext.c
@@ -81,8 +81,9 @@ static int apcontext_process_notification(const struct fwk_event *event,
{
struct clock_notification_params *params;
- assert(fwk_id_is_equal(event->id, mod_clock_notification_id_state_changed));
- assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
+ fwk_assert(
+ fwk_id_is_equal(event->id, mod_clock_notification_id_state_changed));
+ fwk_assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
params = (struct clock_notification_params *)event->params;
diff --git a/module/armv7m_mpu/src/mod_armv7m_mpu.c b/module/armv7m_mpu/src/mod_armv7m_mpu.c
index 86ac0d18..935326dd 100644
--- a/module/armv7m_mpu/src/mod_armv7m_mpu.c
+++ b/module/armv7m_mpu/src/mod_armv7m_mpu.c
@@ -21,8 +21,8 @@ static int armv7m_mpu_init(
{
const struct mod_armv7m_mpu_config *config;
- assert(element_count == 0);
- assert(data != NULL);
+ fwk_assert(element_count == 0);
+ fwk_assert(data != NULL);
config = data;
diff --git a/module/cmn600/src/cmn600.c b/module/cmn600/src/cmn600.c
index 40a6f804..78a464a6 100644
--- a/module/cmn600/src/cmn600.c
+++ b/module/cmn600/src/cmn600.c
@@ -106,10 +106,10 @@ uint64_t sam_encode_region_size(uint64_t size)
uint64_t result;
/* Size must be a multiple of SAM_GRANULARITY */
- assert((size % SAM_GRANULARITY) == 0);
+ fwk_assert((size % SAM_GRANULARITY) == 0);
/* Size also must be a power of two */
- assert((size & (size - 1)) == 0);
+ fwk_assert((size & (size - 1)) == 0);
blocks = size / SAM_GRANULARITY;
result = fwk_math_log2(blocks);
@@ -122,8 +122,8 @@ void configure_region(volatile uint64_t *reg, unsigned int bit_offset,
{
uint64_t value;
- assert(reg);
- assert((base % size) == 0);
+ fwk_assert(reg);
+ fwk_assert((base % size) == 0);
value = CMN600_RNSAM_REGION_ENTRY_VALID;
value |= node_type << CMN600_RNSAM_REGION_ENTRY_TYPE_POS;
diff --git a/module/cmn600/src/mod_cmn600.c b/module/cmn600/src/mod_cmn600.c
index 127f7bc7..cfc15830 100644
--- a/module/cmn600/src/mod_cmn600.c
+++ b/module/cmn600/src/mod_cmn600.c
@@ -71,7 +71,7 @@ static void process_node_hnf(struct cmn600_hnf_reg *hnf)
ctx->hnf_count--;
}
- assert(logical_id < config->snf_count);
+ fwk_assert(logical_id < config->snf_count);
group = logical_id /
(CMN600_HNF_CACHE_GROUP_ENTRIES_PER_GROUP * cal_mode_factor);
@@ -145,14 +145,14 @@ static int cmn600_discovery(void)
FWK_LOG_INFO(MOD_NAME "Starting discovery...");
- assert(get_node_type(ctx->root) == NODE_TYPE_CFG);
+ fwk_assert(get_node_type(ctx->root) == NODE_TYPE_CFG);
/* Traverse cross points (XP) */
xp_count = get_node_child_count(ctx->root);
for (xp_idx = 0; xp_idx < xp_count; xp_idx++) {
xp = get_child_node(config->base, ctx->root, xp_idx);
- assert(get_node_type(xp) == NODE_TYPE_XP);
+ fwk_assert(get_node_type(xp) == NODE_TYPE_XP);
FWK_LOG_INFO(MOD_NAME);
@@ -313,7 +313,7 @@ static void cmn600_configure(void)
void *node;
const struct mod_cmn600_config *config = ctx->config;
- assert(get_node_type(ctx->root) == NODE_TYPE_CFG);
+ fwk_assert(get_node_type(ctx->root) == NODE_TYPE_CFG);
xrnsam_entry = 0;
irnsam_entry = 0;
@@ -322,7 +322,7 @@ static void cmn600_configure(void)
xp_count = get_node_child_count(ctx->root);
for (xp_idx = 0; xp_idx < xp_count; xp_idx++) {
xp = get_child_node(config->base, ctx->root, xp_idx);
- assert(get_node_type(xp) == NODE_TYPE_XP);
+ fwk_assert(get_node_type(xp) == NODE_TYPE_XP);
/* Traverse nodes */
node_count = get_node_child_count(xp);
@@ -516,7 +516,7 @@ int cmn600_setup_sam(struct cmn600_rnsam_reg *rnsam)
break;
default:
- assert(false);
+ fwk_assert(false);
return FWK_E_DATA;
}
}
@@ -628,7 +628,7 @@ static int cmn600_setup_rnsam(unsigned int node_id)
static void post_ppu_on(void *data)
{
- assert(data != NULL);
+ fwk_assert(data != NULL);
cmn600_setup_rnsam(*(unsigned int *)data);
}
@@ -814,8 +814,9 @@ static int cmn600_process_notification(
{
struct clock_notification_params *params;
- assert(fwk_id_is_equal(event->id, mod_clock_notification_id_state_changed));
- assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
+ fwk_assert(
+ fwk_id_is_equal(event->id, mod_clock_notification_id_state_changed));
+ fwk_assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
params = (struct clock_notification_params *)event->params;
diff --git a/module/cmn_booker/src/mod_cmn_booker.c b/module/cmn_booker/src/mod_cmn_booker.c
index 94298608..ecde9c94 100644
--- a/module/cmn_booker/src/mod_cmn_booker.c
+++ b/module/cmn_booker/src/mod_cmn_booker.c
@@ -53,7 +53,7 @@ static void process_node_hnf(struct cmn_booker_hnf_reg *hnf)
cal_mode_factor = 2;
}
- assert(logical_id < config->snf_count);
+ fwk_assert(logical_id < config->snf_count);
group = logical_id /
(CMN_BOOKER_HNF_CACHE_GROUP_ENTRIES_PER_GROUP * cal_mode_factor);
@@ -128,13 +128,13 @@ static int cmn_booker_discovery(void)
FWK_LOG_INFO(MOD_NAME "Starting discovery...");
- assert(get_node_type(ctx->root) == NODE_TYPE_CFG);
+ fwk_assert(get_node_type(ctx->root) == NODE_TYPE_CFG);
/* Traverse cross points (XP) */
xp_count = get_node_child_count(ctx->root);
for (xp_idx = 0; xp_idx < xp_count; xp_idx++) {
xp = get_child_node(config->base, ctx->root, xp_idx);
- assert(get_node_type(xp) == NODE_TYPE_XP);
+ fwk_assert(get_node_type(xp) == NODE_TYPE_XP);
FWK_LOG_INFO(
MOD_NAME "XP (%d, %d) ID:%d, LID:%d",
@@ -229,7 +229,7 @@ static void cmn_booker_configure(void)
struct cmn_booker_mxp_reg *xp;
const struct mod_cmn_booker_config *config = ctx->config;
- assert(get_node_type(ctx->root) == NODE_TYPE_CFG);
+ fwk_assert(get_node_type(ctx->root) == NODE_TYPE_CFG);
xrnsam_entry = 0;
irnsam_entry = 0;
@@ -238,7 +238,7 @@ static void cmn_booker_configure(void)
xp_count = get_node_child_count(ctx->root);
for (xp_idx = 0; xp_idx < xp_count; xp_idx++) {
xp = get_child_node(config->base, ctx->root, xp_idx);
- assert(get_node_type(xp) == NODE_TYPE_XP);
+ fwk_assert(get_node_type(xp) == NODE_TYPE_XP);
/* Traverse nodes */
node_count = get_node_child_count(xp);
@@ -369,7 +369,7 @@ static int cmn_booker_setup_sam(struct cmn_booker_rnsam_reg *rnsam)
break;
default:
- assert(false);
+ fwk_assert(false);
return FWK_E_DATA;
}
}
@@ -496,7 +496,7 @@ static int cmn_booker_setup_rnsam(unsigned int node_id)
static void post_ppu_on(void *data)
{
- assert(data != NULL);
+ fwk_assert(data != NULL);
cmn_booker_setup_rnsam(*(unsigned int *)data);
}
@@ -568,8 +568,9 @@ static int cmn_booker_process_notification(
{
struct clock_notification_params *params;
- assert(fwk_id_is_equal(event->id, mod_clock_notification_id_state_changed));
- assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
+ fwk_assert(
+ fwk_id_is_equal(event->id, mod_clock_notification_id_state_changed));
+ fwk_assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
params = (struct clock_notification_params *)event->params;
if (params->new_state == MOD_CLOCK_STATE_RUNNING)
diff --git a/module/cmn_rhodes/src/mod_cmn_rhodes.c b/module/cmn_rhodes/src/mod_cmn_rhodes.c
index 1d3afc98..de9e8c35 100644
--- a/module/cmn_rhodes/src/mod_cmn_rhodes.c
+++ b/module/cmn_rhodes/src/mod_cmn_rhodes.c
@@ -65,7 +65,7 @@ static void process_node_hnf(struct cmn_rhodes_hnf_reg *hnf)
cal_mode_factor = 2;
}
- assert(logical_id < config->snf_count);
+ fwk_assert(logical_id < config->snf_count);
group = logical_id /
(CMN_RHODES_HNF_CACHE_GROUP_ENTRIES_PER_GROUP * cal_mode_factor);
@@ -151,13 +151,13 @@ static int cmn_rhodes_discovery(void)
FWK_LOG_INFO(MOD_NAME "Starting discovery...");
- assert(get_node_type(ctx->root) == NODE_TYPE_CFG);
+ fwk_assert(get_node_type(ctx->root) == NODE_TYPE_CFG);
/* Traverse cross points (XP) */
xp_count = get_node_child_count(ctx->root);
for (xp_idx = 0; xp_idx < xp_count; xp_idx++) {
xp = get_child_node(config->base, ctx->root, xp_idx);
- assert(get_node_type(xp) == NODE_TYPE_XP);
+ fwk_assert(get_node_type(xp) == NODE_TYPE_XP);
FWK_LOG_INFO(
MOD_NAME "XP (%d, %d) ID:%d, LID:%d",
@@ -339,7 +339,7 @@ static void cmn_rhodes_configure(void)
struct cmn_rhodes_mxp_reg *xp;
const struct mod_cmn_rhodes_config *config = ctx->config;
- assert(get_node_type(ctx->root) == NODE_TYPE_CFG);
+ fwk_assert(get_node_type(ctx->root) == NODE_TYPE_CFG);
xrnsam_entry = 0;
irnsam_entry = 0;
@@ -349,7 +349,7 @@ static void cmn_rhodes_configure(void)
xp_count = get_node_child_count(ctx->root);
for (xp_idx = 0; xp_idx < xp_count; xp_idx++) {
xp = get_child_node(config->base, ctx->root, xp_idx);
- assert(get_node_type(xp) == NODE_TYPE_XP);
+ fwk_assert(get_node_type(xp) == NODE_TYPE_XP);
/* Traverse nodes */
node_count = get_node_child_count(xp);
@@ -517,7 +517,7 @@ static int cmn_rhodes_setup_sam(struct cmn_rhodes_rnsam_reg *rnsam)
break;
default:
- assert(false);
+ fwk_assert(false);
return FWK_E_DATA;
}
}
@@ -564,7 +564,7 @@ static int cmn_rhodes_setup_sam(struct cmn_rhodes_rnsam_reg *rnsam)
break;
default:
- assert(false);
+ fwk_assert(false);
return FWK_E_DATA;
}
}
@@ -734,7 +734,7 @@ static int cmn_rhodes_setup_rnsam(unsigned int node_id)
static void post_ppu_on(void *data)
{
- assert(data != NULL);
+ fwk_assert(data != NULL);
cmn_rhodes_setup_rnsam(*(unsigned int *)data);
}
@@ -766,7 +766,7 @@ static int cmn_rhodes_device_init(fwk_id_t element_id,
{
struct cmn_rhodes_device_ctx *device_ctx;
- assert(data != NULL);
+ fwk_assert(data != NULL);
device_ctx = ctx + fwk_id_get_element_idx(element_id);
device_ctx->config = data;
diff --git a/module/ddr_phy500/src/mod_ddr_phy500.c b/module/ddr_phy500/src/mod_ddr_phy500.c
index 7ecb158b..2db7b7bb 100644
--- a/module/ddr_phy500/src/mod_ddr_phy500.c
+++ b/module/ddr_phy500/src/mod_ddr_phy500.c
@@ -78,7 +78,7 @@ static struct mod_dmc_ddr_phy_api ddr_phy500_api = {
static int ddr_phy500_init(fwk_id_t module_id, unsigned int element_count,
const void *config)
{
- assert(config != NULL);
+ fwk_assert(config != NULL);
return FWK_SUCCESS;
}
@@ -86,7 +86,7 @@ static int ddr_phy500_init(fwk_id_t module_id, unsigned int element_count,
static int ddr_phy500_element_init(fwk_id_t element_id, unsigned int unused,
const void *data)
{
- assert(data != NULL);
+ fwk_assert(data != NULL);
return FWK_SUCCESS;
}
diff --git a/module/debugger_cli/src/mod_debugger_cli.c b/module/debugger_cli/src/mod_debugger_cli.c
index 3d99567b..265563a2 100644
--- a/module/debugger_cli/src/mod_debugger_cli.c
+++ b/module/debugger_cli/src/mod_debugger_cli.c
@@ -47,7 +47,7 @@ static void alarm_callback(uintptr_t module_idx)
status = fwk_thread_put_event(event);
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
}
}
}
diff --git a/module/dmc500/src/mod_dmc500.c b/module/dmc500/src/mod_dmc500.c
index 4a2e93fa..f8a4af3f 100644
--- a/module/dmc500/src/mod_dmc500.c
+++ b/module/dmc500/src/mod_dmc500.c
@@ -34,7 +34,7 @@ static int mod_dmc500_init(fwk_id_t module_id, unsigned int element_count,
static int mod_dmc500_element_init(fwk_id_t element_id, unsigned int unused,
const void *data)
{
- assert(data != NULL);
+ fwk_assert(data != NULL);
return FWK_SUCCESS;
}
@@ -53,7 +53,7 @@ static int mod_dmc500_bind(fwk_id_t id, unsigned int round)
return FWK_SUCCESS;
module_config = fwk_module_get_data(fwk_module_id_dmc500);
- assert(module_config != NULL);
+ fwk_assert(module_config != NULL);
status = fwk_module_bind(module_config->ddr_phy_module_id,
module_config->ddr_phy_api_id, &ddr_phy_api);
diff --git a/module/dmc620/src/mod_dmc620.c b/module/dmc620/src/mod_dmc620.c
index 0710f79e..5961302b 100644
--- a/module/dmc620/src/mod_dmc620.c
+++ b/module/dmc620/src/mod_dmc620.c
@@ -37,7 +37,7 @@ static int mod_dmc620_init(fwk_id_t module_id, unsigned int element_count,
static int mod_dmc620_element_init(fwk_id_t element_id, unsigned int unused,
const void *data)
{
- assert(data != NULL);
+ fwk_assert(data != NULL);
return FWK_SUCCESS;
}
@@ -56,7 +56,7 @@ static int mod_dmc620_bind(fwk_id_t id, unsigned int round)
return FWK_SUCCESS;
module_config = fwk_module_get_data(fwk_module_id_dmc620);
- assert(module_config != NULL);
+ fwk_assert(module_config != NULL);
if (!(fwk_id_is_equal(module_config->ddr_module_id, FWK_ID_NONE))) {
status = fwk_module_bind(module_config->ddr_module_id,
@@ -101,8 +101,9 @@ static int mod_dmc620_process_notification(
{
struct clock_notification_params *params;
- assert(fwk_id_is_equal(event->id, mod_clock_notification_id_state_changed));
- assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_ELEMENT));
+ fwk_assert(
+ fwk_id_is_equal(event->id, mod_clock_notification_id_state_changed));
+ fwk_assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_ELEMENT));
params = (struct clock_notification_params *)event->params;
diff --git a/module/gtimer/src/mod_gtimer.c b/module/gtimer/src/mod_gtimer.c
index dcbcf764..71993c48 100644
--- a/module/gtimer/src/mod_gtimer.c
+++ b/module/gtimer/src/mod_gtimer.c
@@ -267,8 +267,9 @@ static int gtimer_process_notification(
struct clock_notification_params *params;
struct dev_ctx *ctx;
- assert(fwk_id_is_equal(event->id, mod_clock_notification_id_state_changed));
- assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_ELEMENT));
+ fwk_assert(
+ fwk_id_is_equal(event->id, mod_clock_notification_id_state_changed));
+ fwk_assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_ELEMENT));
params = (struct clock_notification_params *)event->params;
diff --git a/module/mhu2/src/mod_mhu2.c b/module/mhu2/src/mod_mhu2.c
index 49c804f2..d77f4f50 100644
--- a/module/mhu2/src/mod_mhu2.c
+++ b/module/mhu2/src/mod_mhu2.c
@@ -69,7 +69,7 @@ static void mhu2_isr(uintptr_t ctx_param)
unsigned int slot;
struct mhu2_smt_channel *smt_channel;
- assert(channel_ctx != NULL);
+ fwk_assert(channel_ctx != NULL);
while (channel_ctx->recv_channel->STAT != 0) {
slot = __builtin_ctz(channel_ctx->recv_channel->STAT);
@@ -129,7 +129,7 @@ static int mhu2_init(fwk_id_t module_id,
{
if (channel_count == 0) {
/* There must be at least 1 mhu channel */
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -150,7 +150,7 @@ static int mhu2_channel_init(fwk_id_t channel_id,
struct mhu2_recv_reg *recv_reg;
if ((config == NULL) || (config->recv == 0) || (config->send == 0)) {
- assert(false);
+ fwk_assert(false);
return FWK_E_DATA;
}
@@ -158,7 +158,7 @@ static int mhu2_channel_init(fwk_id_t channel_id,
channel_ctx->send = (struct mhu2_send_reg *)config->send;
if (config->channel >= channel_ctx->send->MSG_NO_CAP) {
- assert(false);
+ fwk_assert(false);
return FWK_E_DATA;
}
@@ -196,7 +196,7 @@ static int mhu2_bind(fwk_id_t id, unsigned int round)
&smt_channel->api);
if (status != FWK_SUCCESS) {
/* Unable to bind back to SMT channel */
- assert(false);
+ fwk_assert(false);
return status;
}
}
@@ -218,7 +218,7 @@ static int mhu2_process_bind_request(fwk_id_t source_id,
* Something tried to bind to the module or an element. Only binding to
* a slot (sub-element) is allowed.
*/
- assert(false);
+ fwk_assert(false);
return FWK_E_ACCESS;
}
@@ -227,7 +227,7 @@ static int mhu2_process_bind_request(fwk_id_t source_id,
if (channel_ctx->bound_slots & (1 << slot)) {
/* Something tried to bind to a slot that has already been bound to */
- assert(false);
+ fwk_assert(false);
return FWK_E_ACCESS;
}
@@ -255,13 +255,13 @@ static int mhu2_start(fwk_id_t id)
(uintptr_t)channel_ctx);
if (status != FWK_SUCCESS) {
/* Failed to set isr */
- assert(false);
+ fwk_assert(false);
return status;
}
status = fwk_interrupt_enable(channel_ctx->config->irq);
if (status != FWK_SUCCESS) {
/* Failed to enable isr */
- assert(false);
+ fwk_assert(false);
return status;
}
}
diff --git a/module/msys_rom/src/mod_msys_rom.c b/module/msys_rom/src/mod_msys_rom.c
index d1fe41c9..c2fa76fd 100644
--- a/module/msys_rom/src/mod_msys_rom.c
+++ b/module/msys_rom/src/mod_msys_rom.c
@@ -147,12 +147,13 @@ static int msys_rom_process_notification(
const struct fwk_event *event,
struct fwk_event *resp_event)
{
- assert(fwk_id_is_equal(event->id, mod_msys_rom_notification_id_systop));
- assert(event->is_response == true);
+ fwk_assert(
+ fwk_id_is_equal(event->id, mod_msys_rom_notification_id_systop));
+ fwk_assert(event->is_response == true);
/* At least one notification response must be outstanding */
if (ctx.notification_count == 0) {
- assert(false);
+ fwk_assert(false);
return FWK_E_PANIC;
}
diff --git a/module/pcid/src/mod_pcid.c b/module/pcid/src/mod_pcid.c
index e776b063..4f8647c2 100644
--- a/module/pcid/src/mod_pcid.c
+++ b/module/pcid/src/mod_pcid.c
@@ -18,8 +18,8 @@
bool mod_pcid_check_registers(const struct mod_pcid_registers *registers,
const struct mod_pcid_registers *expected)
{
- assert(registers != NULL);
- assert(expected != NULL);
+ fwk_assert(registers != NULL);
+ fwk_assert(expected != NULL);
return !memcmp(registers, expected, sizeof(*registers));
}
diff --git a/module/pik_clock/src/mod_pik_clock.c b/module/pik_clock/src/mod_pik_clock.c
index 99ffb44c..946d3c6c 100644
--- a/module/pik_clock/src/mod_pik_clock.c
+++ b/module/pik_clock/src/mod_pik_clock.c
@@ -531,7 +531,7 @@ static int pik_clock_direct_set_div(fwk_id_t clock_id, uint32_t divider_type,
struct pik_clock_dev_ctx *ctx;
ctx = module_ctx.dev_ctx_table + fwk_id_get_element_idx(clock_id);
- assert(ctx->config->is_group_member);
+ fwk_assert(ctx->config->is_group_member);
if (ctx->current_state == MOD_CLOCK_STATE_STOPPED)
return FWK_E_PWRSTATE;
@@ -557,7 +557,7 @@ static int pik_clock_direct_set_source(fwk_id_t clock_id, uint8_t source)
struct pik_clock_dev_ctx *ctx;
ctx = module_ctx.dev_ctx_table + fwk_id_get_element_idx(clock_id);
- assert(ctx->config->is_group_member);
+ fwk_assert(ctx->config->is_group_member);
if (ctx->current_state == MOD_CLOCK_STATE_STOPPED)
return FWK_E_PWRSTATE;
@@ -571,7 +571,7 @@ static int pik_clock_direct_set_mod(fwk_id_t clock_id, uint32_t numerator,
struct pik_clock_dev_ctx *ctx;
ctx = module_ctx.dev_ctx_table + fwk_id_get_element_idx(clock_id);
- assert(ctx->config->is_group_member);
+ fwk_assert(ctx->config->is_group_member);
if (ctx->current_state == MOD_CLOCK_STATE_STOPPED)
return FWK_E_PWRSTATE;
diff --git a/module/pl011/src/mod_pl011.c b/module/pl011/src/mod_pl011.c
index 72e20f09..fa9d0f41 100644
--- a/module/pl011/src/mod_pl011.c
+++ b/module/pl011/src/mod_pl011.c
@@ -63,7 +63,7 @@ int mod_pl011_set_baud_rate(unsigned int baud_rate_bps, uint64_t clock_rate_hz,
struct pl011_reg *reg = (struct pl011_reg *)reg_ptr;
- assert(reg);
+ fwk_assert(reg);
if (baud_rate_bps == 0)
return FWK_E_PARAM;
@@ -73,7 +73,7 @@ int mod_pl011_set_baud_rate(unsigned int baud_rate_bps, uint64_t clock_rate_hz,
return FWK_E_PARAM;
/* The highest clock x4 should still fit in 32 bits */
- assert((PL011_UARTCLK_MAX * UINT64_C(4)) < UINT32_MAX);
+ fwk_assert((PL011_UARTCLK_MAX * UINT64_C(4)) < UINT32_MAX);
/* Ensure baud rate is not higher than the clock can support */
clock_rate_x4 = clock_rate_hz * 4;
diff --git a/module/power_domain/src/mod_power_domain.c b/module/power_domain/src/mod_power_domain.c
index 3c4784aa..430f0588 100644
--- a/module/power_domain/src/mod_power_domain.c
+++ b/module/power_domain/src/mod_power_domain.c
@@ -450,8 +450,6 @@ static bool is_valid_composite_state(struct pd_ctx *target_pd,
struct pd_ctx *pd = target_pd;
struct pd_ctx *child = NULL;
- assert(target_pd != NULL);
-
if (composite_state & (~MOD_PD_CS_VALID_BITS))
goto error;
@@ -1938,14 +1936,14 @@ static int pd_process_event(const struct fwk_event *event,
switch (fwk_id_get_event_idx(event->id)) {
case MOD_PD_PUBLIC_EVENT_IDX_SET_STATE:
- assert(pd != NULL);
+ fwk_assert(pd != NULL);
process_set_state_request(pd, event, resp);
return FWK_SUCCESS;
case MOD_PD_PUBLIC_EVENT_IDX_GET_STATE:
- assert(pd != NULL);
+ fwk_assert(pd != NULL);
process_get_state_request(pd,
(struct pd_get_state_request *)event->params,
@@ -1954,14 +1952,14 @@ static int pd_process_event(const struct fwk_event *event,
return FWK_SUCCESS;
case PD_EVENT_IDX_RESET:
- assert(pd != NULL);
+ fwk_assert(pd != NULL);
process_reset_request(pd, (struct pd_response *)resp->params);
return FWK_SUCCESS;
case PD_EVENT_IDX_REPORT_POWER_STATE_TRANSITION:
- assert(pd != NULL);
+ fwk_assert(pd != NULL);
process_power_state_transition_report(pd,
(struct pd_power_state_transition_report *)event->params);
@@ -2009,7 +2007,7 @@ static int process_power_state_pre_transition_notification_response(
{
if (pd->power_state_pre_transition_notification_ctx.pending_responses
== 0) {
- assert(false);
+ fwk_assert(false);
return FWK_E_PANIC;
}
@@ -2055,7 +2053,7 @@ static int process_power_state_transition_notification_response(
struct mod_pd_power_state_transition_notification_params *params;
if (pd->power_state_transition_notification_ctx.pending_responses == 0) {
- assert(false);
+ fwk_assert(false);
return FWK_E_PANIC;
}
@@ -2109,7 +2107,7 @@ static int pd_process_notification(const struct fwk_event *event,
/* Only responses are expected. */
if (!event->is_response) {
- assert(false);
+ fwk_assert(false);
return FWK_E_SUPPORT;
}
@@ -2117,7 +2115,7 @@ static int pd_process_notification(const struct fwk_event *event,
return process_pre_shutdown_notification_response();
if (!fwk_module_is_valid_element_id(event->target_id)) {
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
diff --git a/module/ppu_v0/src/mod_ppu_v0.c b/module/ppu_v0/src/mod_ppu_v0.c
index be4b7d7b..61eedffb 100644
--- a/module/ppu_v0/src/mod_ppu_v0.c
+++ b/module/ppu_v0/src/mod_ppu_v0.c
@@ -82,7 +82,7 @@ static int get_state(struct ppu_v0_reg *ppu, unsigned int *state)
"[MOD_PPU_V0] ppu_mode_to_power_state size error");
ppu_v0_get_power_mode(ppu, &ppu_mode);
- assert(ppu_mode < PPU_V0_MODE_COUNT);
+ fwk_assert(ppu_mode < PPU_V0_MODE_COUNT);
*state = ppu_mode_to_power_state[ppu_mode];
if (*state == MODE_UNSUPPORTED) {
@@ -114,14 +114,14 @@ static int pd_set_state(fwk_id_t pd_id, unsigned int state)
ppu_v0_set_power_mode(pd_ctx->ppu, PPU_V0_MODE_ON);
status = pd_ctx->pd_driver_input_api->report_power_state_transition(
pd_ctx->bound_id, MOD_PD_STATE_ON);
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
break;
case MOD_PD_STATE_OFF:
ppu_v0_set_power_mode(pd_ctx->ppu, PPU_V0_MODE_OFF);
status = pd_ctx->pd_driver_input_api->report_power_state_transition(
pd_ctx->bound_id, MOD_PD_STATE_OFF);
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
break;
default:
@@ -242,7 +242,7 @@ static int ppu_v0_bind(fwk_id_t id, unsigned int round)
#endif
default:
- assert(false);
+ fwk_assert(false);
return FWK_E_SUPPORT;
}
}
@@ -258,7 +258,7 @@ static int ppu_v0_process_bind_request(fwk_id_t source_id,
switch (pd_ctx->config->pd_type) {
case MOD_PD_TYPE_SYSTEM:
if (!fwk_id_is_equal(pd_ctx->bound_id, FWK_ID_NONE)) {
- assert(false);
+ fwk_assert(false);
return FWK_E_ACCESS;
}
/* Fallthrough */
@@ -279,7 +279,7 @@ static int ppu_v0_process_bind_request(fwk_id_t source_id,
break;
}
#endif
- assert(false);
+ fwk_assert(false);
return FWK_E_ACCESS;
default:
diff --git a/module/ppu_v0/src/ppu_v0.c b/module/ppu_v0/src/ppu_v0.c
index 50dbf8c8..f63a6f2f 100644
--- a/module/ppu_v0/src/ppu_v0.c
+++ b/module/ppu_v0/src/ppu_v0.c
@@ -14,7 +14,7 @@
void ppu_v0_init(struct ppu_v0_reg *ppu)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
/* Set mode as masked to all input edge interrupts */
ppu->IESR = 0;
@@ -29,8 +29,8 @@ void ppu_v0_init(struct ppu_v0_reg *ppu)
int ppu_v0_request_power_mode(struct ppu_v0_reg *ppu, enum ppu_v0_mode mode)
{
uint32_t power_policy;
- assert(ppu != NULL);
- assert(mode < PPU_V0_MODE_COUNT);
+ fwk_assert(ppu != NULL);
+ fwk_assert(mode < PPU_V0_MODE_COUNT);
power_policy = ppu->POWER_POLICY &
~(PPU_V0_PPR_POLICY | PPU_V0_PPR_DYNAMIC_EN);
@@ -42,7 +42,7 @@ int ppu_v0_request_power_mode(struct ppu_v0_reg *ppu, enum ppu_v0_mode mode)
int ppu_v0_set_power_mode(struct ppu_v0_reg *ppu, enum ppu_v0_mode mode)
{
int status;
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
status = ppu_v0_request_power_mode(ppu, mode);
if (status != FWK_SUCCESS)
@@ -57,8 +57,8 @@ int ppu_v0_set_power_mode(struct ppu_v0_reg *ppu, enum ppu_v0_mode mode)
int ppu_v0_get_power_mode(struct ppu_v0_reg *ppu, enum ppu_v0_mode *mode)
{
- assert(ppu != NULL);
- assert(mode != NULL);
+ fwk_assert(ppu != NULL);
+ fwk_assert(mode != NULL);
*mode = (enum ppu_v0_mode)(ppu->POWER_STATUS & PPU_V0_PSR_POWSTAT);
diff --git a/module/ppu_v1/src/mod_ppu_v1.c b/module/ppu_v1/src/mod_ppu_v1.c
index a8a9106c..1a20ed56 100644
--- a/module/ppu_v1/src/mod_ppu_v1.c
+++ b/module/ppu_v1/src/mod_ppu_v1.c
@@ -113,7 +113,7 @@ static int get_state(struct ppu_v1_reg *ppu, unsigned int *state)
PPU_V1_MODE_COUNT), "[PPU_V1] ppu_mode_to_power_state size error");
mode = ppu_v1_get_power_mode(ppu);
- assert(mode < PPU_V1_MODE_COUNT);
+ fwk_assert(mode < PPU_V1_MODE_COUNT);
*state = ppu_mode_to_power_state[mode];
@@ -140,14 +140,14 @@ static int ppu_v1_pd_set_state(fwk_id_t pd_id, unsigned int state)
ppu_v1_set_power_mode(pd_ctx->ppu, PPU_V1_MODE_ON);
status = pd_ctx->pd_driver_input_api->report_power_state_transition(
pd_ctx->bound_id, MOD_PD_STATE_ON);
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
break;
case MOD_PD_STATE_OFF:
ppu_v1_set_power_mode(pd_ctx->ppu, PPU_V1_MODE_OFF);
status = pd_ctx->pd_driver_input_api->report_power_state_transition(
pd_ctx->bound_id, MOD_PD_STATE_OFF);
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
break;
default:
@@ -238,7 +238,7 @@ static int ppu_v1_core_pd_set_state(fwk_id_t core_pd_id, unsigned int state)
ppu_v1_off_unlock(ppu);
status = pd_ctx->pd_driver_input_api->report_power_state_transition(
pd_ctx->bound_id, MOD_PD_STATE_OFF);
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
break;
case MOD_PD_STATE_ON:
@@ -250,7 +250,7 @@ static int ppu_v1_core_pd_set_state(fwk_id_t core_pd_id, unsigned int state)
ppu_v1_dynamic_enable(ppu, PPU_V1_MODE_OFF);
status = pd_ctx->pd_driver_input_api->report_power_state_transition(
pd_ctx->bound_id, MOD_PD_STATE_ON);
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
break;
case MOD_PD_STATE_SLEEP:
@@ -269,7 +269,7 @@ static int ppu_v1_core_pd_set_state(fwk_id_t core_pd_id, unsigned int state)
}
status = pd_ctx->pd_driver_input_api->report_power_state_transition(
pd_ctx->bound_id, MOD_PD_STATE_SLEEP);
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
break;
default:
@@ -325,7 +325,7 @@ static void core_pd_ppu_interrupt_handler(struct ppu_v1_pd_ctx *pd_ctx)
status = pd_ctx->pd_driver_input_api->report_power_state_transition(
pd_ctx->bound_id, MOD_PD_STATE_ON);
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
(void)status;
/* Minimum policy reached interrupt */
} else if (ppu_v1_is_dyn_policy_min_interrupt(ppu)) {
@@ -334,7 +334,7 @@ static void core_pd_ppu_interrupt_handler(struct ppu_v1_pd_ctx *pd_ctx)
status = pd_ctx->pd_driver_input_api->report_power_state_transition(
pd_ctx->bound_id, MOD_PD_STATE_SLEEP);
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
(void)status;
/*
@@ -376,7 +376,7 @@ static void unlock_all_cores(struct ppu_v1_pd_ctx *pd_ctx)
struct ppu_v1_reg *cpu_ppu;
unsigned int core_idx;
- assert(pd_ctx != NULL);
+ fwk_assert(pd_ctx != NULL);
cluster_pd_ctx = pd_ctx->data;
@@ -393,7 +393,7 @@ static bool lock_all_dynamic_cores(struct ppu_v1_pd_ctx *pd_ctx)
struct ppu_v1_reg *cpu_ppu;
unsigned int core_idx;
- assert(pd_ctx != NULL);
+ fwk_assert(pd_ctx != NULL);
cluster_pd_ctx = pd_ctx->data;
@@ -420,7 +420,7 @@ static bool cluster_off(struct ppu_v1_pd_ctx *pd_ctx)
struct ppu_v1_reg *ppu;
bool lock_successful;
- assert(pd_ctx != NULL);
+ fwk_assert(pd_ctx != NULL);
ppu = pd_ctx->ppu;
@@ -443,7 +443,7 @@ static void cluster_on(struct ppu_v1_pd_ctx *pd_ctx)
int status;
struct ppu_v1_reg *ppu;
- assert(pd_ctx != NULL);
+ fwk_assert(pd_ctx != NULL);
ppu = pd_ctx->ppu;
@@ -454,7 +454,7 @@ static void cluster_on(struct ppu_v1_pd_ctx *pd_ctx)
ppu_v1_set_power_mode(ppu, PPU_V1_MODE_ON);
status = pd_ctx->pd_driver_input_api->report_power_state_transition(
pd_ctx->bound_id, MOD_PD_STATE_ON);
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
(void)status;
if (pd_ctx->observer_api != NULL)
@@ -521,7 +521,7 @@ static int ppu_v1_cluster_pd_set_state(fwk_id_t cluster_pd_id,
}
status = pd_ctx->pd_driver_input_api->report_power_state_transition(
pd_ctx->bound_id, MOD_PD_STATE_OFF);
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
return status;
default:
@@ -537,7 +537,7 @@ static void cluster_pd_ppu_interrupt_handler(struct ppu_v1_pd_ctx *pd_ctx)
struct ppu_v1_reg *ppu;
enum ppu_v1_mode current_mode;
- assert(pd_ctx != NULL);
+ fwk_assert(pd_ctx != NULL);
ppu = pd_ctx->ppu;
@@ -573,7 +573,7 @@ static void cluster_pd_ppu_interrupt_handler(struct ppu_v1_pd_ctx *pd_ctx)
PPU_V1_MODE_ON, PPU_V1_EDGE_SENSITIVITY_RISING_EDGE);
status = pd_ctx->pd_driver_input_api->report_power_state_transition(
pd_ctx->bound_id, MOD_PD_STATE_SLEEP);
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
(void)status;
} else {
/* Cluster did not transition to off */
@@ -584,7 +584,7 @@ static void cluster_pd_ppu_interrupt_handler(struct ppu_v1_pd_ctx *pd_ctx)
default:
/* Cluster is in an invalid power mode */
- assert(false);
+ fwk_assert(false);
return;
}
}
@@ -600,7 +600,7 @@ static void ppu_interrupt_handler(uintptr_t pd_ctx_param)
{
struct ppu_v1_pd_ctx *pd_ctx = (struct ppu_v1_pd_ctx *)pd_ctx_param;
- assert(pd_ctx != NULL);
+ fwk_assert(pd_ctx != NULL);
if (pd_ctx->config->pd_type == MOD_PD_TYPE_CORE)
core_pd_ppu_interrupt_handler(pd_ctx);
@@ -688,7 +688,7 @@ static int ppu_v1_pd_init(fwk_id_t pd_id, unsigned int unused, const void *data)
return ppu_v1_set_power_mode(pd_ctx->ppu, PPU_V1_MODE_ON);
default:
- assert(false);
+ fwk_assert(false);
return FWK_E_SUPPORT;
}
}
@@ -749,7 +749,7 @@ static int ppu_v1_bind(fwk_id_t id, unsigned int round)
if (!fwk_id_is_equal(pd_ctx->config->observer_id, FWK_ID_NONE)) {
if (pd_ctx->config->pd_type != MOD_PD_TYPE_CLUSTER) {
/* State observation only supported for clusters */
- assert(false);
+ fwk_assert(false);
return FWK_E_SUPPORT;
}
@@ -781,7 +781,7 @@ static int ppu_v1_bind(fwk_id_t id, unsigned int round)
#endif
default:
- assert(false);
+ fwk_assert(false);
return FWK_E_SUPPORT;
}
}
@@ -821,7 +821,7 @@ static int ppu_v1_process_bind_request(fwk_id_t source_id,
/* Allow multiple binding only for device power domain for now */
if ((pd_ctx->config->pd_type != MOD_PD_TYPE_DEVICE) &&
(!fwk_id_is_equal(pd_ctx->bound_id, FWK_ID_NONE))) {
- assert(false);
+ fwk_assert(false);
return FWK_E_ACCESS;
}
@@ -881,7 +881,7 @@ static int ppu_v1_start(fwk_id_t id)
pd_ctx = ppu_v1_ctx.pd_ctx_table + fwk_id_get_element_idx(id);
module_config = fwk_module_get_data(fwk_id_build_module_id(id));
- assert(module_config != NULL);
+ fwk_assert(module_config != NULL);
/* Register for power domain transition notifications */
status = fwk_notification_subscribe(
@@ -913,7 +913,7 @@ static int ppu_v1_process_notification(
struct ppu_v1_pd_ctx *pd_ctx;
struct mod_pd_power_state_transition_notification_params *params;
- assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_ELEMENT));
+ fwk_assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_ELEMENT));
module_config =
fwk_module_get_data(fwk_id_build_module_id(event->target_id));
assert(
diff --git a/module/ppu_v1/src/ppu_v1.c b/module/ppu_v1/src/ppu_v1.c
index 308a4c9a..f3012aa0 100644
--- a/module/ppu_v1/src/ppu_v1.c
+++ b/module/ppu_v1/src/ppu_v1.c
@@ -14,7 +14,7 @@
void ppu_v1_init(struct ppu_v1_reg *ppu)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
/* Set edge sensitivity to masked for all input edges */
ppu->IESR = 0;
@@ -32,8 +32,8 @@ void ppu_v1_init(struct ppu_v1_reg *ppu)
int ppu_v1_request_power_mode(struct ppu_v1_reg *ppu, enum ppu_v1_mode ppu_mode)
{
uint32_t power_policy;
- assert(ppu != NULL);
- assert(ppu_mode < PPU_V1_MODE_COUNT);
+ fwk_assert(ppu != NULL);
+ fwk_assert(ppu_mode < PPU_V1_MODE_COUNT);
power_policy = ppu->PWPR & ~(PPU_V1_PWPR_POLICY | PPU_V1_PWPR_DYNAMIC_EN);
ppu->PWPR = power_policy | ppu_mode;
@@ -60,8 +60,8 @@ int ppu_v1_request_operating_mode(struct ppu_v1_reg *ppu,
enum ppu_v1_opmode op_mode)
{
uint32_t power_policy;
- assert(ppu != NULL);
- assert(op_mode < PPU_V1_OPMODE_COUNT);
+ fwk_assert(ppu != NULL);
+ fwk_assert(op_mode < PPU_V1_OPMODE_COUNT);
power_policy = ppu->PWPR & ~(PPU_V1_PWPR_OP_POLICY | PPU_V1_PWPR_OP_DYN_EN);
ppu->PWPR = power_policy | (op_mode << PPU_V1_PWPR_OP_POLICY_POS);
@@ -74,8 +74,8 @@ void ppu_v1_opmode_dynamic_enable(struct ppu_v1_reg *ppu,
{
uint32_t power_policy;
- assert(ppu != NULL);
- assert(min_dyn_mode < PPU_V1_OPMODE_COUNT);
+ fwk_assert(ppu != NULL);
+ fwk_assert(min_dyn_mode < PPU_V1_OPMODE_COUNT);
power_policy = ppu->PWPR & ~PPU_V1_PWPR_OP_POLICY;
ppu->PWPR = power_policy |
@@ -90,8 +90,8 @@ void ppu_v1_dynamic_enable(struct ppu_v1_reg *ppu,
{
uint32_t power_policy;
- assert(ppu != NULL);
- assert(min_dyn_state < PPU_V1_MODE_COUNT);
+ fwk_assert(ppu != NULL);
+ fwk_assert(min_dyn_state < PPU_V1_MODE_COUNT);
power_policy = ppu->PWPR & ~PPU_V1_PWPR_POLICY;
ppu->PWPR = power_policy | PPU_V1_PWPR_DYNAMIC_EN | min_dyn_state;
@@ -101,35 +101,35 @@ void ppu_v1_dynamic_enable(struct ppu_v1_reg *ppu,
void ppu_v1_lock_off_enable(struct ppu_v1_reg *ppu)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
ppu->PWPR |= PPU_V1_PWPR_OFF_LOCK_EN;
}
void ppu_v1_lock_off_disable(struct ppu_v1_reg *ppu)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
ppu->PWPR &= ~PPU_V1_PWPR_OFF_LOCK_EN;
}
enum ppu_v1_mode ppu_v1_get_power_mode(struct ppu_v1_reg *ppu)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
return (enum ppu_v1_mode)(ppu->PWSR & PPU_V1_PWSR_PWR_STATUS);
}
enum ppu_v1_mode ppu_v1_get_programmed_power_mode(struct ppu_v1_reg *ppu)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
return (enum ppu_v1_mode)(ppu->PWPR & PPU_V1_PWPR_POLICY);
}
enum ppu_v1_opmode ppu_v1_get_operating_mode(struct ppu_v1_reg *ppu)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
return (enum ppu_v1_opmode)
((ppu->PWSR & PPU_V1_PWSR_OP_STATUS) >> PPU_V1_PWSR_OP_STATUS_POS);
@@ -137,7 +137,7 @@ enum ppu_v1_opmode ppu_v1_get_operating_mode(struct ppu_v1_reg *ppu)
enum ppu_v1_opmode ppu_v1_get_programmed_operating_mode(struct ppu_v1_reg *ppu)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
return (enum ppu_v1_opmode)
((ppu->PWPR & PPU_V1_PWPR_OP_POLICY) >> PPU_V1_PWPR_OP_POLICY_POS);
@@ -145,14 +145,14 @@ enum ppu_v1_opmode ppu_v1_get_programmed_operating_mode(struct ppu_v1_reg *ppu)
bool ppu_v1_is_dynamic_enabled(struct ppu_v1_reg *ppu)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
return ((ppu->PWSR & PPU_V1_PWSR_PWR_DYN_STATUS) != 0);
}
bool ppu_v1_is_locked(struct ppu_v1_reg *ppu)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
return ((ppu->PWSR & PPU_V1_PWSR_OFF_LOCK_STATUS) != 0);
}
@@ -163,7 +163,7 @@ bool ppu_v1_is_locked(struct ppu_v1_reg *ppu)
bool ppu_v1_is_power_devactive_high(struct ppu_v1_reg *ppu,
enum ppu_v1_mode ppu_mode)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
return (ppu->DISR &
(1 << (ppu_mode + PPU_V1_DISR_PWR_DEVACTIVE_STATUS_POS))) != 0;
@@ -172,7 +172,7 @@ bool ppu_v1_is_power_devactive_high(struct ppu_v1_reg *ppu,
bool ppu_v1_is_op_devactive_high(struct ppu_v1_reg *ppu,
enum ppu_v1_op_devactive op_devactive)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
return (ppu->DISR &
(1 << (op_devactive + PPU_V1_DISR_OP_DEVACTIVE_STATUS_POS))) != 0;
@@ -183,7 +183,7 @@ bool ppu_v1_is_op_devactive_high(struct ppu_v1_reg *ppu,
*/
void ppu_v1_off_unlock(struct ppu_v1_reg *ppu)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
ppu->UNLK = PPU_V1_UNLK_OFF_UNLOCK;
}
@@ -193,14 +193,14 @@ void ppu_v1_off_unlock(struct ppu_v1_reg *ppu)
*/
void ppu_v1_disable_devactive(struct ppu_v1_reg *ppu)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
ppu->PWCR &= ~PPU_V1_PWCR_DEV_ACTIVE_EN;
}
void ppu_v1_disable_handshake(struct ppu_v1_reg *ppu)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
ppu->PWCR &= ~PPU_V1_PWCR_DEV_REQ_EN;
}
@@ -210,21 +210,21 @@ void ppu_v1_disable_handshake(struct ppu_v1_reg *ppu)
*/
void ppu_v1_interrupt_mask(struct ppu_v1_reg *ppu, unsigned int mask)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
ppu->IMR |= mask & PPU_V1_IMR_MASK;
}
void ppu_v1_additional_interrupt_mask(struct ppu_v1_reg *ppu, unsigned int mask)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
ppu->AIMR |= mask & PPU_V1_AIMR_MASK;
}
void ppu_v1_interrupt_unmask(struct ppu_v1_reg *ppu, unsigned int mask)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
ppu->IMR &= ~(mask & PPU_V1_IMR_MASK);
}
@@ -232,7 +232,7 @@ void ppu_v1_interrupt_unmask(struct ppu_v1_reg *ppu, unsigned int mask)
void ppu_v1_additional_interrupt_unmask(struct ppu_v1_reg *ppu,
unsigned int mask)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
ppu->AIMR &= ~(mask & PPU_V1_AIMR_MASK);
}
@@ -245,14 +245,14 @@ bool ppu_v1_is_additional_interrupt_pending(struct ppu_v1_reg *ppu,
void ppu_v1_ack_interrupt(struct ppu_v1_reg *ppu, unsigned int mask)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
ppu->ISR &= mask & PPU_V1_IMR_MASK;
}
void ppu_v1_ack_additional_interrupt(struct ppu_v1_reg *ppu, unsigned int mask)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
ppu->AISR &= mask & PPU_V1_AIMR_MASK;
}
@@ -260,9 +260,9 @@ void ppu_v1_ack_additional_interrupt(struct ppu_v1_reg *ppu, unsigned int mask)
void ppu_v1_set_input_edge_sensitivity(struct ppu_v1_reg *ppu,
enum ppu_v1_mode ppu_mode, enum ppu_v1_edge_sensitivity edge_sensitivity)
{
- assert(ppu != NULL);
- assert(ppu_mode < PPU_V1_MODE_COUNT);
- assert((edge_sensitivity & ~PPU_V1_EDGE_SENSITIVITY_MASK) == 0);
+ fwk_assert(ppu != NULL);
+ fwk_assert(ppu_mode < PPU_V1_MODE_COUNT);
+ fwk_assert((edge_sensitivity & ~PPU_V1_EDGE_SENSITIVITY_MASK) == 0);
/* Clear current settings */
ppu->IESR &= ~(PPU_V1_EDGE_SENSITIVITY_MASK <<
@@ -276,8 +276,8 @@ void ppu_v1_set_input_edge_sensitivity(struct ppu_v1_reg *ppu,
enum ppu_v1_edge_sensitivity ppu_v1_get_input_edge_sensitivity(
struct ppu_v1_reg *ppu, enum ppu_v1_mode ppu_mode)
{
- assert(ppu != NULL);
- assert(ppu_mode < PPU_V1_MODE_COUNT);
+ fwk_assert(ppu != NULL);
+ fwk_assert(ppu_mode < PPU_V1_MODE_COUNT);
return (enum ppu_v1_edge_sensitivity)(
(ppu->IESR >> (ppu_mode * PPU_V1_BITS_PER_EDGE_SENSITIVITY)) &
@@ -300,9 +300,9 @@ void ppu_v1_set_op_active_edge_sensitivity(struct ppu_v1_reg *ppu,
enum ppu_v1_op_devactive op_devactive,
enum ppu_v1_edge_sensitivity edge_sensitivity)
{
- assert(ppu != NULL);
- assert(op_devactive < PPU_V1_OP_DEVACTIVE_COUNT);
- assert((edge_sensitivity & ~PPU_V1_EDGE_SENSITIVITY_MASK) == 0);
+ fwk_assert(ppu != NULL);
+ fwk_assert(op_devactive < PPU_V1_OP_DEVACTIVE_COUNT);
+ fwk_assert((edge_sensitivity & ~PPU_V1_EDGE_SENSITIVITY_MASK) == 0);
/* Clear current settings */
ppu->OPSR &= ~(PPU_V1_EDGE_SENSITIVITY_MASK <<
@@ -316,8 +316,8 @@ void ppu_v1_set_op_active_edge_sensitivity(struct ppu_v1_reg *ppu,
enum ppu_v1_edge_sensitivity ppu_v1_get_op_active_edge_sensitivity(
struct ppu_v1_reg *ppu, enum ppu_v1_op_devactive op_devactive)
{
- assert(ppu != NULL);
- assert(op_devactive < PPU_V1_OP_DEVACTIVE_COUNT);
+ fwk_assert(ppu != NULL);
+ fwk_assert(op_devactive < PPU_V1_OP_DEVACTIVE_COUNT);
return (enum ppu_v1_edge_sensitivity)(
(ppu->OPSR >> (op_devactive * PPU_V1_BITS_PER_EDGE_SENSITIVITY)) &
@@ -355,7 +355,7 @@ unsigned int ppu_v1_get_num_opmode(struct ppu_v1_reg *ppu)
*/
unsigned int ppu_v1_get_arch_id(struct ppu_v1_reg *ppu)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
return (ppu->AIDR & (PPU_V1_AIDR_ARCH_REV_MINOR |
PPU_V1_AIDR_ARCH_REV_MAJOR));
diff --git a/module/scmi/src/mod_scmi.c b/module/scmi/src/mod_scmi.c
index 7146ce61..03d15aaa 100644
--- a/module/scmi/src/mod_scmi.c
+++ b/module/scmi/src/mod_scmi.c
@@ -641,7 +641,7 @@ static int scmi_base_message_handler(fwk_id_t protocol_id, fwk_id_t service_id,
static_assert(FWK_ARRAY_SIZE(base_handler_table) ==
FWK_ARRAY_SIZE(base_payload_size_table),
"[SCMI] Base protocol table sizes not consistent");
- assert(payload != NULL);
+ fwk_assert(payload != NULL);
if (message_id >= FWK_ARRAY_SIZE(base_handler_table)) {
return_value = SCMI_NOT_SUPPORTED;
diff --git a/module/scmi_apcore/src/mod_scmi_apcore.c b/module/scmi_apcore/src/mod_scmi_apcore.c
index ea71a450..ed6c8be4 100644
--- a/module/scmi_apcore/src/mod_scmi_apcore.c
+++ b/module/scmi_apcore/src/mod_scmi_apcore.c
@@ -94,7 +94,7 @@ static int set_reset_address(uint32_t address_low, uint32_t address_high)
reg_group =
&scmi_apcore_ctx.config->reset_register_group_table[grp_idx];
- assert(reg_group->base_register != 0);
+ fwk_assert(reg_group->base_register != 0);
/* Begin with the first register in the group */
reset_reg = reg_group->base_register;
@@ -339,8 +339,7 @@ static int scmi_apcore_message_handler(
static_assert(FWK_ARRAY_SIZE(handler_table) ==
FWK_ARRAY_SIZE(payload_size_table),
"[SCMI] Core configuration protocol table sizes not consistent");
- assert(payload != NULL);
-
+ fwk_assert(payload != NULL);
if (message_id >= FWK_ARRAY_SIZE(handler_table)) {
return_value = SCMI_NOT_SUPPORTED;
diff --git a/module/scmi_clock/src/mod_scmi_clock.c b/module/scmi_clock/src/mod_scmi_clock.c
index 1fe91a1e..ec513d60 100644
--- a/module/scmi_clock/src/mod_scmi_clock.c
+++ b/module/scmi_clock/src/mod_scmi_clock.c
@@ -174,8 +174,8 @@ static int get_clock_device_entry(
*clock_device = &agent_entry->device_table[clock_idx];
- assert((*clock_device)->permissions != MOD_SCMI_CLOCK_PERM_INVALID);
- assert(fwk_module_is_valid_element_id((*clock_device)->element_id));
+ fwk_assert((*clock_device)->permissions != MOD_SCMI_CLOCK_PERM_INVALID);
+ fwk_assert(fwk_module_is_valid_element_id((*clock_device)->element_id));
if (agent != NULL)
*agent = agent_entry;
@@ -921,7 +921,7 @@ static int scmi_clock_message_handler(fwk_id_t protocol_id, fwk_id_t service_id,
static_assert(FWK_ARRAY_SIZE(handler_table) ==
FWK_ARRAY_SIZE(payload_size_table),
"[SCMI] Clock management protocol table sizes not consistent");
- assert(payload != NULL);
+ fwk_assert(payload != NULL);
if (message_id >= FWK_ARRAY_SIZE(handler_table)) {
return_value = SCMI_NOT_SUPPORTED;
diff --git a/module/scmi_perf/src/mod_scmi_perf.c b/module/scmi_perf/src/mod_scmi_perf.c
index 449bd8c7..4b274cf3 100644
--- a/module/scmi_perf/src/mod_scmi_perf.c
+++ b/module/scmi_perf/src/mod_scmi_perf.c
@@ -881,7 +881,7 @@ static int scmi_perf_message_handler(fwk_id_t protocol_id, fwk_id_t service_id,
static_assert(FWK_ARRAY_SIZE(handler_table) ==
FWK_ARRAY_SIZE(payload_size_table),
"[SCMI] Performance management protocol table sizes not consistent");
- assert(payload != NULL);
+ fwk_assert(payload != NULL);
if (message_id >= FWK_ARRAY_SIZE(handler_table)) {
return_value = SCMI_NOT_SUPPORTED;
diff --git a/module/scmi_power_domain/src/mod_scmi_power_domain.c b/module/scmi_power_domain/src/mod_scmi_power_domain.c
index beb9545d..791fb78e 100644
--- a/module/scmi_power_domain/src/mod_scmi_power_domain.c
+++ b/module/scmi_power_domain/src/mod_scmi_power_domain.c
@@ -649,7 +649,7 @@ static int scmi_pd_message_handler(fwk_id_t protocol_id, fwk_id_t service_id,
static_assert(FWK_ARRAY_SIZE(handler_table) ==
FWK_ARRAY_SIZE(payload_size_table),
"[SCMI] Power domain management protocol table sizes not consistent");
- assert(payload != NULL);
+ fwk_assert(payload != NULL);
if (message_id >= FWK_ARRAY_SIZE(handler_table)) {
return_value = SCMI_NOT_SUPPORTED;
diff --git a/module/scmi_sensor/src/mod_scmi_sensor.c b/module/scmi_sensor/src/mod_scmi_sensor.c
index 85132c06..d7807b03 100644
--- a/module/scmi_sensor/src/mod_scmi_sensor.c
+++ b/module/scmi_sensor/src/mod_scmi_sensor.c
@@ -209,7 +209,7 @@ static int scmi_sensor_protocol_desc_get_handler(fwk_id_t service_id,
if (SCMI_SENSOR_DESCS_MAX(max_payload_size) == 0) {
/* Can't even fit one sensor description in the payload */
- assert(false);
+ fwk_assert(false);
status = FWK_E_SIZE;
goto exit;
}
@@ -238,7 +238,7 @@ static int scmi_sensor_protocol_desc_get_handler(fwk_id_t service_id,
sensor_id = FWK_ID_ELEMENT(FWK_MODULE_IDX_SENSOR, desc_index);
if (!fwk_module_is_valid_element_id(sensor_id)) {
/* domain_idx did not map to a sensor device */
- assert(false);
+ fwk_assert(false);
return_values.status = SCMI_NOT_FOUND;
goto exit;
}
@@ -246,13 +246,13 @@ static int scmi_sensor_protocol_desc_get_handler(fwk_id_t service_id,
status = scmi_sensor_ctx.sensor_api->get_info(sensor_id, &sensor_info);
if (status != FWK_SUCCESS) {
/* Unable to get sensor info */
- assert(false);
+ fwk_assert(false);
goto exit;
}
if (sensor_info.type >= MOD_SENSOR_TYPE_COUNT) {
/* Invalid sensor type */
- assert(false);
+ fwk_assert(false);
goto exit;
}
@@ -262,7 +262,7 @@ static int scmi_sensor_protocol_desc_get_handler(fwk_id_t service_id,
SCMI_SENSOR_DESC_ATTRS_HIGH_SENSOR_UNIT_MULTIPLIER_MAX)) {
/* Sensor unit multiplier out of range */
- assert(false);
+ fwk_assert(false);
goto exit;
}
@@ -272,7 +272,7 @@ static int scmi_sensor_protocol_desc_get_handler(fwk_id_t service_id,
SCMI_SENSOR_DESC_ATTRS_HIGH_SENSOR_UPDATE_MULTIPLIER_MAX)) {
/* Sensor update interval multiplier is out of range */
- assert(false);
+ fwk_assert(false);
goto exit;
}
@@ -280,7 +280,7 @@ static int scmi_sensor_protocol_desc_get_handler(fwk_id_t service_id,
SCMI_SENSOR_DESC_ATTRS_HIGH_SENSOR_UPDATE_INTERVAL_MASK) {
/* Update interval is too big to fit in its mask */
- assert(false);
+ fwk_assert(false);
goto exit;
}
@@ -302,7 +302,7 @@ static int scmi_sensor_protocol_desc_get_handler(fwk_id_t service_id,
payload_size, &desc, sizeof(struct scmi_sensor_desc));
if (status != FWK_SUCCESS) {
/* Failed to write sensor description into message payload */
- assert(false);
+ fwk_assert(false);
goto exit;
}
}
@@ -420,7 +420,7 @@ static int scmi_sensor_message_handler(fwk_id_t protocol_id,
static_assert(FWK_ARRAY_SIZE(handler_table) ==
FWK_ARRAY_SIZE(payload_size_table),
"[SCMI] Sensor management protocol table sizes not consistent");
- assert(payload != NULL);
+ fwk_assert(payload != NULL);
if (message_id >= FWK_ARRAY_SIZE(handler_table)) {
return_value = SCMI_NOT_SUPPORTED;
@@ -455,7 +455,7 @@ static int scmi_sensor_init(fwk_id_t module_id,
{
if (element_count != 0) {
/* This module should not have any elements */
- assert(false);
+ fwk_assert(false);
return FWK_E_SUPPORT;
}
@@ -494,7 +494,7 @@ static int scmi_sensor_bind(fwk_id_t id, unsigned int round)
&scmi_sensor_ctx.scmi_api);
if (status != FWK_SUCCESS) {
/* Failed to bind to SCMI module */
- assert(false);
+ fwk_assert(false);
return status;
}
@@ -503,7 +503,7 @@ static int scmi_sensor_bind(fwk_id_t id, unsigned int round)
&scmi_sensor_ctx.sensor_api);
if (status != FWK_SUCCESS) {
/* Failed to bind to sensor module */
- assert(false);
+ fwk_assert(false);
return status;
}
diff --git a/module/scmi_system_power/src/mod_scmi_system_power.c b/module/scmi_system_power/src/mod_scmi_system_power.c
index e2d1c1a8..21ff6d4c 100644
--- a/module/scmi_system_power/src/mod_scmi_system_power.c
+++ b/module/scmi_system_power/src/mod_scmi_system_power.c
@@ -447,7 +447,7 @@ static int scmi_sys_power_handler(fwk_id_t protocol_id,
FWK_ARRAY_SIZE(payload_size_table),
"[SCMI] System power protocol table sizes not consistent");
- assert(payload != NULL);
+ fwk_assert(payload != NULL);
if (message_id >= FWK_ARRAY_SIZE(handler_table)) {
return_value = SCMI_NOT_SUPPORTED;
diff --git a/module/sid/src/mod_sid.c b/module/sid/src/mod_sid.c
index 0407d7e8..11f82158 100644
--- a/module/sid/src/mod_sid.c
+++ b/module/sid/src/mod_sid.c
@@ -61,13 +61,14 @@ static int sid_init(
struct sid_reg *sid_reg;
if ((config == NULL) || (config->sid_base == 0) || (element_count == 0)) {
- assert(false);
+ fwk_assert(false);
return FWK_E_DATA;
}
sid_reg = (struct sid_reg *)config->sid_base;
- assert(mod_pcid_check_registers(&sid_reg->pcid, &config->pcid_expected));
+ fwk_assert(
+ mod_pcid_check_registers(&sid_reg->pcid, &config->pcid_expected));
info.system_major_revision =
(sid_reg->SYSTEM_ID & SID_SYS_SOC_ID_MAJOR_REVISION_MASK)
@@ -114,7 +115,7 @@ static int sid_subsystem_init(
{
const struct mod_sid_subsystem_config *subsystem_config;
- assert(data != NULL);
+ fwk_assert(data != NULL);
subsystem_config = data;
if (subsystem_config->part_number == info.system_part_number) {
diff --git a/module/smt/src/mod_smt.c b/module/smt/src/mod_smt.c
index 7d95295c..83f5df59 100644
--- a/module/smt/src/mod_smt.c
+++ b/module/smt/src/mod_smt.c
@@ -82,7 +82,7 @@ static int smt_get_secure(fwk_id_t channel_id, bool *secure)
struct smt_channel_ctx *channel_ctx;
if (secure == NULL) {
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -99,7 +99,7 @@ static int smt_get_max_payload_size(fwk_id_t channel_id, size_t *size)
struct smt_channel_ctx *channel_ctx;
if (size == NULL) {
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -116,7 +116,7 @@ static int smt_get_message_header(fwk_id_t channel_id, uint32_t *header)
struct smt_channel_ctx *channel_ctx;
if (header == NULL) {
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -138,7 +138,7 @@ static int smt_get_payload(fwk_id_t channel_id,
struct smt_channel_ctx *channel_ctx;
if (payload == NULL) {
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -172,8 +172,7 @@ static int smt_write_payload(fwk_id_t channel_id,
(offset > channel_ctx->max_payload_size) ||
(size > channel_ctx->max_payload_size) ||
((offset + size) > channel_ctx->max_payload_size)) {
-
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -385,14 +384,14 @@ static int smt_signal_message(fwk_id_t channel_id)
switch (channel_ctx->config->type) {
case MOD_SMT_CHANNEL_TYPE_MASTER:
/* Not supported yet */
- assert(false);
+ fwk_assert(false);
break;
case MOD_SMT_CHANNEL_TYPE_SLAVE:
return smt_slave_handler(channel_ctx);
break;
default:
/* Invalid config */
- assert(false);
+ fwk_assert(false);
break;
}
@@ -429,7 +428,7 @@ static int smt_channel_init(fwk_id_t channel_id, unsigned int unused,
if ((channel_ctx->config->type >= MOD_SMT_CHANNEL_TYPE_COUNT) ||
(channel_ctx->config->mailbox_address == 0) ||
(channel_ctx->config->mailbox_size == 0)) {
- assert(false);
+ fwk_assert(false);
return FWK_E_DATA;
}
@@ -494,7 +493,7 @@ static int smt_process_bind_request(fwk_id_t source_id,
/* Only bind to a channel (not the whole module) */
if (!fwk_id_is_type(target_id, FWK_ID_TYPE_ELEMENT)) {
/* Tried to bind to something other than a specific channel */
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -523,7 +522,7 @@ static int smt_process_bind_request(fwk_id_t source_id,
*api = &driver_input_api;
} else {
/* A module that we did not bind to is trying to bind to us */
- assert(false);
+ fwk_assert(false);
return FWK_E_ACCESS;
}
break;
@@ -542,7 +541,7 @@ static int smt_process_bind_request(fwk_id_t source_id,
default:
/* Invalid API */
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -576,7 +575,7 @@ static int smt_process_notification(
assert(fwk_id_is_equal(event->id,
mod_pd_notification_id_power_state_transition));
- assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_ELEMENT));
+ fwk_assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_ELEMENT));
params = (struct mod_pd_power_state_transition_notification_params *)
event->params;
diff --git a/module/timer/src/mod_timer.c b/module/timer/src/mod_timer.c
index 43bf47d8..8838ee95 100644
--- a/module/timer/src/mod_timer.c
+++ b/module/timer/src/mod_timer.c
@@ -82,8 +82,8 @@ static int _time_to_timestamp(struct dev_ctx *ctx,
int status;
uint32_t frequency;
- assert(ctx != NULL);
- assert(timestamp != NULL);
+ fwk_assert(ctx != NULL);
+ fwk_assert(timestamp != NULL);
status = ctx->driver->get_frequency(ctx->driver_dev_id, &frequency);
if (status != FWK_SUCCESS)
@@ -101,8 +101,8 @@ static int _timestamp_from_now(struct dev_ctx *ctx,
int status;
uint64_t counter;
- assert(ctx != NULL);
- assert(timestamp != NULL);
+ fwk_assert(ctx != NULL);
+ fwk_assert(timestamp != NULL);
status = _time_to_timestamp(ctx, microseconds, timestamp);
if (status != FWK_SUCCESS)
@@ -144,7 +144,7 @@ static void _configure_timer_with_next_alarm(struct dev_ctx *ctx)
{
struct alarm_ctx *alarm_head;
- assert(ctx != NULL);
+ fwk_assert(ctx != NULL);
alarm_head = (struct alarm_ctx *)fwk_list_head(&ctx->alarms_active);
if (alarm_head != NULL) {
@@ -160,8 +160,8 @@ static void _insert_alarm_ctx_into_active_queue(struct dev_ctx *ctx,
struct fwk_dlist_node *alarm_node;
struct alarm_ctx *alarm;
- assert(ctx != NULL);
- assert(alarm_new != NULL);
+ fwk_assert(ctx != NULL);
+ fwk_assert(alarm_new != NULL);
/*
* Search though the active queue to find the correct place to insert the
@@ -356,7 +356,7 @@ static int alarm_stop(fwk_id_t alarm_id)
struct alarm_ctx *alarm;
unsigned int interrupt;
- assert(fwk_module_is_valid_sub_element_id(alarm_id));
+ fwk_assert(fwk_module_is_valid_sub_element_id(alarm_id));
ctx = &ctx_table[fwk_id_get_element_idx(alarm_id)];
@@ -427,7 +427,7 @@ static int alarm_start(fwk_id_t alarm_id,
struct alarm_ctx *alarm;
unsigned int interrupt;
- assert(fwk_module_is_valid_sub_element_id(alarm_id));
+ fwk_assert(fwk_module_is_valid_sub_element_id(alarm_id));
status = fwk_interrupt_get_current(&interrupt);
if (status != FWK_E_STATE) {
@@ -483,7 +483,7 @@ static void timer_isr(uintptr_t ctx_ptr)
struct dev_ctx *ctx = (struct dev_ctx *)ctx_ptr;
uint64_t timestamp = 0;
- assert(ctx != NULL);
+ fwk_assert(ctx != NULL);
/* Disable timer interrupts to work with the active queue */
ctx->driver->disable(ctx->driver_dev_id);
@@ -493,7 +493,7 @@ static void timer_isr(uintptr_t ctx_ptr)
if (alarm == NULL) {
/* Timer interrupt triggered without any alarm in the active queue */
- assert(false);
+ fwk_assert(false);
return;
}
@@ -537,7 +537,7 @@ static int timer_device_init(fwk_id_t element_id, unsigned int alarm_count,
{
struct dev_ctx *ctx;
- assert(data != NULL);
+ fwk_assert(data != NULL);
ctx = ctx_table + fwk_id_get_element_idx(element_id);
ctx->config = data;
@@ -595,7 +595,7 @@ static int timer_process_bind_request(fwk_id_t requester_id,
if (fwk_id_is_equal(api_id, MOD_TIMER_API_ID_TIMER)) {
if (!fwk_module_is_valid_element_id(id)) {
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -606,7 +606,7 @@ static int timer_process_bind_request(fwk_id_t requester_id,
/* Alarm API requested */
if (!fwk_module_is_valid_sub_element_id(id)) {
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -614,7 +614,7 @@ static int timer_process_bind_request(fwk_id_t requester_id,
alarm_ctx = &ctx->alarm_pool[fwk_id_get_sub_element_idx(id)];
if (alarm_ctx->bound) {
- assert(false);
+ fwk_assert(false);
return FWK_E_STATE;
}
diff --git a/product/n1sdp/module/n1sdp_flash/src/mod_n1sdp_flash.c b/product/n1sdp/module/n1sdp_flash/src/mod_n1sdp_flash.c
index 901a8342..b775e3af 100644
--- a/product/n1sdp/module/n1sdp_flash/src/mod_n1sdp_flash.c
+++ b/product/n1sdp/module/n1sdp_flash/src/mod_n1sdp_flash.c
@@ -105,8 +105,8 @@ static uint16_t crc16(const void *data, uint32_t size)
const uint8_t *byte = data;
uint32_t i = 0, j = 0;
- assert(data != NULL);
- assert(size != 0);
+ fwk_assert(data != NULL);
+ fwk_assert(size != 0);
for (i = 0; i < size; ++i) {
crc = crc ^ byte[i];
diff --git a/product/n1sdp/module/n1sdp_pcie/src/n1sdp_pcie.c b/product/n1sdp/module/n1sdp_pcie/src/n1sdp_pcie.c
index 4a5bbb1f..acd753a4 100644
--- a/product/n1sdp/module/n1sdp_pcie/src/n1sdp_pcie.c
+++ b/product/n1sdp/module/n1sdp_pcie/src/n1sdp_pcie.c
@@ -271,7 +271,7 @@ void pcie_phy_init(uint32_t phy_apb_base, uint32_t pcie_lane_count)
bool pcie_wait_condition(void *data)
{
- assert(data != NULL);
+ fwk_assert(data != NULL);
struct pcie_wait_condition_data *wait_data =
(struct pcie_wait_condition_data *)data;
@@ -293,7 +293,7 @@ bool pcie_wait_condition(void *data)
case PCIE_INIT_STAGE_LINK_RE_TRNG:
return ((ctrl_apb->RP_LTSSM_STATE & RP_LTSSM_STATE_MASK) == 0x10);
default:
- assert(false);
+ fwk_assert(false);
return false;
}
}
@@ -304,9 +304,9 @@ int pcie_init(struct pcie_ctrl_apb_reg *ctrl_apb,
enum pcie_gen gen,
enum pcie_lane_count lane_count)
{
- assert(ctrl_apb != NULL);
- assert(timer_api != NULL);
- assert(stage < PCIE_INIT_STAGE_COUNT);
+ fwk_assert(ctrl_apb != NULL);
+ fwk_assert(timer_api != NULL);
+ fwk_assert(stage < PCIE_INIT_STAGE_COUNT);
struct pcie_wait_condition_data wait_data;
int status;
@@ -359,7 +359,7 @@ int pcie_init(struct pcie_ctrl_apb_reg *ctrl_apb,
break;
default:
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
return FWK_SUCCESS;
@@ -372,9 +372,9 @@ int pcie_link_retrain(struct pcie_ctrl_apb_reg *ctrl_apb,
uint32_t reg_val = 0;
struct pcie_wait_condition_data wait_data;
- assert(ctrl_apb != NULL);
- assert(rp_ep_config_base != 0x0);
- assert(timer_api != NULL);
+ fwk_assert(ctrl_apb != NULL);
+ fwk_assert(rp_ep_config_base != 0x0);
+ fwk_assert(timer_api != NULL);
wait_data.ctrl_apb = ctrl_apb;
wait_data.stage = PCIE_INIT_STAGE_LINK_RE_TRNG;
@@ -495,7 +495,7 @@ int pcie_set_gen_tx_preset(uint32_t rp_ep_config_apb_base,
uint32_t offset_max;
uint32_t nibble;
- assert((gen == PCIE_GEN_3) || (gen == PCIE_GEN_4));
+ fwk_assert((gen == PCIE_GEN_3) || (gen == PCIE_GEN_4));
offset_min = (gen == PCIE_GEN_3) ? GEN3_OFFSET_MIN : GEN4_OFFSET_MIN;
offset_max = (gen == PCIE_GEN_3) ? GEN3_OFFSET_MAX : GEN4_OFFSET_MAX;
diff --git a/product/n1sdp/module/n1sdp_pcie/src/pcie_enumeration.c b/product/n1sdp/module/n1sdp_pcie/src/pcie_enumeration.c
index 3e31a48f..7e9156d8 100644
--- a/product/n1sdp/module/n1sdp_pcie/src/pcie_enumeration.c
+++ b/product/n1sdp/module/n1sdp_pcie/src/pcie_enumeration.c
@@ -98,7 +98,7 @@ static bool checked_read_u32(uint32_t *const value, const uint32_t *const src);
*/
void pcie_init_bdf_table(struct n1sdp_pcie_dev_config *config)
{
- assert(config != NULL);
+ fwk_assert(config != NULL);
struct bdf_table *table;
/* Set BDF table pointer based on the root complex */
@@ -208,7 +208,7 @@ static uint8_t pcie_bus_scan(uint32_t ecam_addr,
void pcie_bus_enumeration(struct n1sdp_pcie_dev_config *config)
{
- assert(config != NULL);
+ fwk_assert(config != NULL);
uint32_t ecam_base_addr = config->axi_slave_base32;
uint8_t pri_bnum, sec_bnum, sub_bnum;
diff --git a/product/n1sdp/module/n1sdp_smt/src/mod_smt.c b/product/n1sdp/module/n1sdp_smt/src/mod_smt.c
index 81d04fe4..3a0b56b7 100644
--- a/product/n1sdp/module/n1sdp_smt/src/mod_smt.c
+++ b/product/n1sdp/module/n1sdp_smt/src/mod_smt.c
@@ -64,7 +64,7 @@ static int smt_get_secure(fwk_id_t channel_id, bool *secure)
struct smt_channel_ctx *channel_ctx;
if (secure == NULL) {
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -81,7 +81,7 @@ static int smt_get_max_payload_size(fwk_id_t channel_id, size_t *size)
struct smt_channel_ctx *channel_ctx;
if (size == NULL) {
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -98,7 +98,7 @@ static int smt_get_message_header(fwk_id_t channel_id, uint32_t *header)
struct smt_channel_ctx *channel_ctx;
if (header == NULL) {
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -120,7 +120,7 @@ static int smt_get_payload(fwk_id_t channel_id,
struct smt_channel_ctx *channel_ctx;
if (payload == NULL) {
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -154,8 +154,7 @@ static int smt_write_payload(fwk_id_t channel_id,
(offset > channel_ctx->max_payload_size) ||
(size > channel_ctx->max_payload_size) ||
((offset + size) > channel_ctx->max_payload_size)) {
-
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -237,7 +236,7 @@ static int smt_send(fwk_id_t channel_id, struct mod_smt_command_config *cmd)
if (((cmd->size != 0) && (cmd->payload == NULL)) ||
(cmd->size > channel_ctx->max_payload_size)) {
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -326,11 +325,11 @@ static int smt_signal_message(fwk_id_t channel_id)
return smt_master_handler(channel_ctx);
break;
case MOD_SMT_CHANNEL_TYPE_SLAVE:
- assert(false);
+ fwk_assert(false);
break;
default:
/* Invalid config */
- assert(false);
+ fwk_assert(false);
break;
}
@@ -367,7 +366,7 @@ static int smt_channel_init(fwk_id_t channel_id, unsigned int unused,
if ((channel_ctx->config->type >= MOD_SMT_CHANNEL_TYPE_COUNT) ||
(channel_ctx->config->mailbox_address == 0) ||
(channel_ctx->config->mailbox_size == 0)) {
- assert(false);
+ fwk_assert(false);
return FWK_E_DATA;
}
@@ -412,7 +411,7 @@ static int smt_process_bind_request(fwk_id_t source_id,
/* Only bind to a channel (not the whole module) */
if (!fwk_id_is_type(target_id, FWK_ID_TYPE_ELEMENT)) {
/* Tried to bind to something other than a specific channel */
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -441,7 +440,7 @@ static int smt_process_bind_request(fwk_id_t source_id,
*api = &driver_input_api;
} else {
/* A module that we did not bind to is trying to bind to us */
- assert(false);
+ fwk_assert(false);
return FWK_E_ACCESS;
}
break;
@@ -460,7 +459,7 @@ static int smt_process_bind_request(fwk_id_t source_id,
default:
/* Invalid API */
- assert(false);
+ fwk_assert(false);
return FWK_E_PARAM;
}
@@ -504,7 +503,7 @@ static int smt_process_notification(
assert(fwk_id_is_equal(event->id,
mod_pd_notification_id_power_state_transition));
- assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_ELEMENT));
+ fwk_assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_ELEMENT));
params = (struct mod_pd_power_state_transition_notification_params *)
event->params;
diff --git a/product/n1sdp/module/n1sdp_system/src/mod_n1sdp_system.c b/product/n1sdp/module/n1sdp_system/src/mod_n1sdp_system.c
index c01718e9..8a6685ad 100644
--- a/product/n1sdp/module/n1sdp_system/src/mod_n1sdp_system.c
+++ b/product/n1sdp/module/n1sdp_system/src/mod_n1sdp_system.c
@@ -679,7 +679,7 @@ static int n1sdp_system_process_notification(const struct fwk_event *event,
static bool sds_notification_received = false;
int status;
- assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
+ fwk_assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
params = (struct clock_notification_params *)event->params;
diff --git a/product/n1sdp/module/scmi_management/src/mod_scmi_management.c b/product/n1sdp/module/scmi_management/src/mod_scmi_management.c
index c77e0f37..d8a838f5 100644
--- a/product/n1sdp/module/scmi_management/src/mod_scmi_management.c
+++ b/product/n1sdp/module/scmi_management/src/mod_scmi_management.c
@@ -239,7 +239,7 @@ static int scmi_management_message_handler(
static_assert(FWK_ARRAY_SIZE(handler_table) ==
FWK_ARRAY_SIZE(payload_size_table),
"[SCMI] Management protocol table sizes not consistent");
- assert(payload != NULL);
+ fwk_assert(payload != NULL);
if (message_id >= FWK_ARRAY_SIZE(handler_table)) {
return_value = SCMI_NOT_SUPPORTED;
diff --git a/product/n1sdp/scp_ramfw/config_ppu_v1.c b/product/n1sdp/scp_ramfw/config_ppu_v1.c
index 60d0d4ae..897fe165 100644
--- a/product/n1sdp/scp_ramfw/config_ppu_v1.c
+++ b/product/n1sdp/scp_ramfw/config_ppu_v1.c
@@ -77,7 +77,7 @@ static const struct fwk_element *ppu_v1_get_element_table(fwk_id_t module_id)
core_count = n1sdp_core_get_core_count();
cluster_count = n1sdp_core_get_cluster_count();
- assert(cluster_count == FWK_ARRAY_SIZE(cluster_idx_to_node_id));
+ fwk_assert(cluster_count == FWK_ARRAY_SIZE(cluster_idx_to_node_id));
/*
* Allocate element descriptors based on:
diff --git a/product/n1sdp/src/n1sdp_core.c b/product/n1sdp/src/n1sdp_core.c
index cbf88133..69588d9d 100644
--- a/product/n1sdp/src/n1sdp_core.c
+++ b/product/n1sdp/src/n1sdp_core.c
@@ -13,7 +13,7 @@
unsigned int n1sdp_core_get_core_per_cluster_count(unsigned int cluster)
{
- assert(cluster < n1sdp_core_get_cluster_count());
+ fwk_assert(cluster < n1sdp_core_get_cluster_count());
return CORES_PER_CLUSTER;
}
diff --git a/product/rddaniel/module/rddaniel_system/src/mod_rddaniel_system.c b/product/rddaniel/module/rddaniel_system/src/mod_rddaniel_system.c
index c64dc3bd..5910986c 100644
--- a/product/rddaniel/module/rddaniel_system/src/mod_rddaniel_system.c
+++ b/product/rddaniel/module/rddaniel_system/src/mod_rddaniel_system.c
@@ -296,7 +296,7 @@ int rddaniel_system_process_notification(const struct fwk_event *event,
static unsigned int scmi_notification_count = 0;
static bool sds_notification_received = false;
- assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
+ fwk_assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
if (fwk_id_is_equal(event->id, mod_clock_notification_id_state_changed)) {
params = (struct clock_notification_params *)event->params;
diff --git a/product/rddanielxlr/module/rddanielxlr_system/src/mod_rddanielxlr_system.c b/product/rddanielxlr/module/rddanielxlr_system/src/mod_rddanielxlr_system.c
index 1a234ca1..16230764 100644
--- a/product/rddanielxlr/module/rddanielxlr_system/src/mod_rddanielxlr_system.c
+++ b/product/rddanielxlr/module/rddanielxlr_system/src/mod_rddanielxlr_system.c
@@ -322,7 +322,7 @@ int rddanielxlr_system_process_notification(const struct fwk_event *event,
if (status == FWK_SUCCESS)
chip_id = system_info->chip_id;
- assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
+ fwk_assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
if (fwk_id_is_equal(event->id, mod_clock_notification_id_state_changed)) {
params = (struct clock_notification_params *)event->params;
diff --git a/product/rdn1e1/module/rdn1e1_system/src/mod_rdn1e1_system.c b/product/rdn1e1/module/rdn1e1_system/src/mod_rdn1e1_system.c
index 7bf36154..f38508d1 100644
--- a/product/rdn1e1/module/rdn1e1_system/src/mod_rdn1e1_system.c
+++ b/product/rdn1e1/module/rdn1e1_system/src/mod_rdn1e1_system.c
@@ -329,7 +329,7 @@ int rdn1e1_system_process_notification(const struct fwk_event *event,
mc_mode = system_info->multi_chip_mode;
}
- assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
+ fwk_assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
if (fwk_id_is_equal(event->id, mod_clock_notification_id_state_changed)) {
params = (struct clock_notification_params *)event->params;
diff --git a/product/rdn1e1/scp_ramfw/config_ppu_v1.c b/product/rdn1e1/scp_ramfw/config_ppu_v1.c
index 2e608a26..4aad1cce 100644
--- a/product/rdn1e1/scp_ramfw/config_ppu_v1.c
+++ b/product/rdn1e1/scp_ramfw/config_ppu_v1.c
@@ -73,7 +73,7 @@ static const struct fwk_element *ppu_v1_get_element_table(fwk_id_t module_id)
core_count = rdn1e1_core_get_core_count();
cluster_count = rdn1e1_core_get_cluster_count();
- assert(cluster_count == FWK_ARRAY_SIZE(cluster_idx_to_node_id));
+ fwk_assert(cluster_count == FWK_ARRAY_SIZE(cluster_idx_to_node_id));
/*
* Allocate element descriptors based on:
diff --git a/product/sgi575/module/sgi575_system/src/mod_sgi575_system.c b/product/sgi575/module/sgi575_system/src/mod_sgi575_system.c
index 3329b96d..76d8b00f 100644
--- a/product/sgi575/module/sgi575_system/src/mod_sgi575_system.c
+++ b/product/sgi575/module/sgi575_system/src/mod_sgi575_system.c
@@ -293,7 +293,7 @@ int sgi575_system_process_notification(const struct fwk_event *event,
static unsigned int scmi_notification_count = 0;
static bool sds_notification_received = false;
- assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
+ fwk_assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
if (fwk_id_is_equal(event->id, mod_clock_notification_id_state_changed)) {
params = (struct clock_notification_params *)event->params;
diff --git a/product/sgi575/scp_ramfw/config_ppu_v1.c b/product/sgi575/scp_ramfw/config_ppu_v1.c
index 26dd66ba..d6419853 100644
--- a/product/sgi575/scp_ramfw/config_ppu_v1.c
+++ b/product/sgi575/scp_ramfw/config_ppu_v1.c
@@ -73,7 +73,7 @@ static const struct fwk_element *ppu_v1_get_element_table(fwk_id_t module_id)
core_count = sgi575_core_get_core_count();
cluster_count = sgi575_core_get_cluster_count();
- assert(cluster_count == FWK_ARRAY_SIZE(cluster_idx_to_node_id));
+ fwk_assert(cluster_count == FWK_ARRAY_SIZE(cluster_idx_to_node_id));
/*
* Allocate element descriptors based on:
diff --git a/product/synquacer/module/ccn512/src/mod_ccn512.c b/product/synquacer/module/ccn512/src/mod_ccn512.c
index fb69e0c9..905b2774 100644
--- a/product/synquacer/module/ccn512/src/mod_ccn512.c
+++ b/product/synquacer/module/ccn512/src/mod_ccn512.c
@@ -135,7 +135,7 @@ void fw_ccn512_exit(void)
unsigned int i;
module_config = fwk_module_get_data(fwk_module_id_ccn512);
- assert(module_config != NULL);
+ fwk_assert(module_config != NULL);
ccn512 = module_config->reg_base;
@@ -182,7 +182,7 @@ static int mod_ccn512_element_init(
unsigned int unused,
const void *data)
{
- assert(data != NULL);
+ fwk_assert(data != NULL);
return FWK_SUCCESS;
}
@@ -206,7 +206,7 @@ static int mod_ccn512_start(fwk_id_t id)
ccn512_reg_t *ccn512;
module_config = fwk_module_get_data(fwk_module_id_ccn512);
- assert(module_config != NULL);
+ fwk_assert(module_config != NULL);
ccn512 = module_config->reg_base;
diff --git a/product/synquacer/module/ppu_v0_synquacer/src/mod_ppu_v0.c b/product/synquacer/module/ppu_v0_synquacer/src/mod_ppu_v0.c
index 3156460f..4f363858 100644
--- a/product/synquacer/module/ppu_v0_synquacer/src/mod_ppu_v0.c
+++ b/product/synquacer/module/ppu_v0_synquacer/src/mod_ppu_v0.c
@@ -82,7 +82,7 @@ static int get_state(struct ppu_v0_reg *ppu, unsigned int *state)
"[MOD_PPU_V0] ppu_mode_to_power_state size error");
ppu_v0_get_power_mode(ppu, &ppu_mode);
- assert(ppu_mode < PPU_V0_MODE_COUNT);
+ fwk_assert(ppu_mode < PPU_V0_MODE_COUNT);
*state = ppu_mode_to_power_state[ppu_mode];
if (*state == MODE_UNSUPPORTED) {
@@ -125,7 +125,7 @@ static int pd_set_state(fwk_id_t pd_id, unsigned int state)
(void *)pd_ctx->ppu,
state);
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
break;
case MOD_PD_STATE_OFF:
@@ -153,7 +153,7 @@ static int pd_set_state(fwk_id_t pd_id, unsigned int state)
(void *)pd_ctx->ppu,
state);
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
break;
default:
@@ -293,7 +293,7 @@ static int ppu_v0_bind(fwk_id_t id, unsigned int round)
#endif
default:
- assert(false);
+ fwk_assert(false);
return FWK_E_SUPPORT;
}
}
@@ -311,7 +311,7 @@ static int ppu_v0_process_bind_request(
switch (pd_ctx->config->pd_type) {
case MOD_PD_TYPE_SYSTEM:
if (!fwk_id_is_equal(pd_ctx->bound_id, FWK_ID_NONE)) {
- assert(false);
+ fwk_assert(false);
return FWK_E_ACCESS;
}
/* Fallthrough */
@@ -333,7 +333,7 @@ static int ppu_v0_process_bind_request(
break;
}
#endif
- assert(false);
+ fwk_assert(false);
return FWK_E_ACCESS;
default:
diff --git a/product/synquacer/module/ppu_v0_synquacer/src/ppu_v0.c b/product/synquacer/module/ppu_v0_synquacer/src/ppu_v0.c
index 19e43b41..e5b24b4f 100644
--- a/product/synquacer/module/ppu_v0_synquacer/src/ppu_v0.c
+++ b/product/synquacer/module/ppu_v0_synquacer/src/ppu_v0.c
@@ -14,7 +14,7 @@
void ppu_v0_init(struct ppu_v0_reg *ppu)
{
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
/* Set mode as masked to all input edge interrupts */
ppu->IESR = 0;
@@ -29,8 +29,8 @@ void ppu_v0_init(struct ppu_v0_reg *ppu)
int ppu_v0_request_power_mode(struct ppu_v0_reg *ppu, enum ppu_v0_mode mode)
{
uint32_t power_policy;
- assert(ppu != NULL);
- assert(mode < PPU_V0_MODE_COUNT);
+ fwk_assert(ppu != NULL);
+ fwk_assert(mode < PPU_V0_MODE_COUNT);
power_policy =
ppu->POWER_POLICY & ~(PPU_V0_PPR_POLICY | PPU_V0_PPR_DYNAMIC_EN);
@@ -42,7 +42,7 @@ int ppu_v0_request_power_mode(struct ppu_v0_reg *ppu, enum ppu_v0_mode mode)
int ppu_v0_set_power_mode(struct ppu_v0_reg *ppu, enum ppu_v0_mode mode)
{
int status;
- assert(ppu != NULL);
+ fwk_assert(ppu != NULL);
status = ppu_v0_request_power_mode(ppu, mode);
if (status != FWK_SUCCESS)
@@ -57,8 +57,8 @@ int ppu_v0_set_power_mode(struct ppu_v0_reg *ppu, enum ppu_v0_mode mode)
int ppu_v0_get_power_mode(struct ppu_v0_reg *ppu, enum ppu_v0_mode *mode)
{
- assert(ppu != NULL);
- assert(mode != NULL);
+ fwk_assert(ppu != NULL);
+ fwk_assert(mode != NULL);
*mode = (enum ppu_v0_mode)(ppu->POWER_STATUS & PPU_V0_PSR_POWSTAT);
diff --git a/product/synquacer/module/scmi_vendor_ext/src/mod_scmi_vendor_ext.c b/product/synquacer/module/scmi_vendor_ext/src/mod_scmi_vendor_ext.c
index 6416c086..fdf91745 100644
--- a/product/synquacer/module/scmi_vendor_ext/src/mod_scmi_vendor_ext.c
+++ b/product/synquacer/module/scmi_vendor_ext/src/mod_scmi_vendor_ext.c
@@ -235,7 +235,7 @@ static int scmi_vendor_ext_message_handler(
static_assert(
FWK_ARRAY_SIZE(handler_table) == FWK_ARRAY_SIZE(payload_size_table),
"[SCMI] vendor_ext management protocol table sizes not consistent");
- assert(payload != NULL);
+ fwk_assert(payload != NULL);
if (message_id >= FWK_ARRAY_SIZE(handler_table)) {
return_value = SCMI_NOT_SUPPORTED;
@@ -271,7 +271,7 @@ static int scmi_vendor_ext_init(
{
if (element_count != 0) {
/* This module should not have any elements */
- assert(false);
+ fwk_assert(false);
return FWK_E_SUPPORT;
}
@@ -291,7 +291,7 @@ static int scmi_vendor_ext_bind(fwk_id_t id, unsigned int round)
&scmi_vendor_ext_ctx.scmi_api);
if (status != FWK_SUCCESS) {
/* Failed to bind to SCMI module */
- assert(false);
+ fwk_assert(false);
return status;
}
diff --git a/product/synquacer/module/synquacer_memc/src/synquacer_ddr.c b/product/synquacer/module/synquacer_memc/src/synquacer_ddr.c
index c59005b7..c2c1ab32 100644
--- a/product/synquacer/module/synquacer_memc/src/synquacer_ddr.c
+++ b/product/synquacer/module/synquacer_memc/src/synquacer_ddr.c
@@ -162,7 +162,7 @@ static void fw_ddr_change_freq(ddr_freq_t freq)
break;
default:
FWK_LOG_INFO("[DDR] Invalid DDR frequency");
- assert(false);
+ fwk_assert(false);
}
/* set value */
@@ -362,7 +362,7 @@ bool fw_spd_rdimm_support_check(spd_ddr_info_t *spd_ddr_info_p)
{
bool error_flag = false;
- assert(spd_ddr_info_p->per_slot_dimm_size == FW_MODULE_CAPACITY_16GB);
+ fwk_assert(spd_ddr_info_p->per_slot_dimm_size == FW_MODULE_CAPACITY_16GB);
/* !ERROR CHECK! and memory kinds select */
/* 16GB module RDIMM */
diff --git a/product/synquacer/module/synquacer_pik_clock/src/mod_synquacer_pik_clock.c b/product/synquacer/module/synquacer_pik_clock/src/mod_synquacer_pik_clock.c
index 8f542fc9..9e3cc6fb 100644
--- a/product/synquacer/module/synquacer_pik_clock/src/mod_synquacer_pik_clock.c
+++ b/product/synquacer/module/synquacer_pik_clock/src/mod_synquacer_pik_clock.c
@@ -543,7 +543,7 @@ static int pik_clock_direct_set_div(
struct pik_clock_dev_ctx *ctx;
ctx = module_ctx.dev_ctx_table + fwk_id_get_element_idx(clock_id);
- assert(ctx->config->is_group_member);
+ fwk_assert(ctx->config->is_group_member);
if (ctx->current_state == MOD_CLOCK_STATE_STOPPED)
return FWK_E_PWRSTATE;
@@ -572,7 +572,7 @@ static int pik_clock_direct_set_source(fwk_id_t clock_id, uint8_t source)
struct pik_clock_dev_ctx *ctx;
ctx = module_ctx.dev_ctx_table + fwk_id_get_element_idx(clock_id);
- assert(ctx->config->is_group_member);
+ fwk_assert(ctx->config->is_group_member);
if (ctx->current_state == MOD_CLOCK_STATE_STOPPED)
return FWK_E_PWRSTATE;
@@ -588,7 +588,7 @@ static int pik_clock_direct_set_mod(
struct pik_clock_dev_ctx *ctx;
ctx = module_ctx.dev_ctx_table + fwk_id_get_element_idx(clock_id);
- assert(ctx->config->is_group_member);
+ fwk_assert(ctx->config->is_group_member);
if (ctx->current_state == MOD_CLOCK_STATE_STOPPED)
return FWK_E_PWRSTATE;
diff --git a/product/synquacer/module/synquacer_system/src/synquacer_main.c b/product/synquacer/module/synquacer_system/src/synquacer_main.c
index 2fd768cb..893690b7 100644
--- a/product/synquacer/module/synquacer_system/src/synquacer_main.c
+++ b/product/synquacer/module/synquacer_system/src/synquacer_main.c
@@ -315,7 +315,7 @@ void main_initialize(void)
synquacer_system_ctx.f_i2c_api->init();
status = fw_ddr_spd_param_check();
- assert(status == FWK_SUCCESS);
+ fwk_assert(status == FWK_SUCCESS);
/* prepare eeprom configuration data */
memcpy(
diff --git a/product/synquacer/module/synquacer_system/src/sysoc.c b/product/synquacer/module/synquacer_system/src/sysoc.c
index 75d34010..9c8bc161 100644
--- a/product/synquacer/module/synquacer_system/src/sysoc.c
+++ b/product/synquacer/module/synquacer_system/src/sysoc.c
@@ -343,7 +343,7 @@ void bus_sysoc_init(void)
result = sysoc_wait_status_change(
CONFIG_SOC_REG_ADDR_SYSOC_BUS_TOP, false, MAIN_BUS_RESET_BIT);
- assert(result == FWK_SUCCESS);
+ fwk_assert(result == FWK_SUCCESS);
}
#define CONFIG_SOC_PCIEB_SYSOC_REG_BASE UINT32_C(0x78240000)
diff --git a/product/tc0/module/tc0_system/src/mod_tc0_system.c b/product/tc0/module/tc0_system/src/mod_tc0_system.c
index 2c241844..1036e8ae 100644
--- a/product/tc0/module/tc0_system/src/mod_tc0_system.c
+++ b/product/tc0/module/tc0_system/src/mod_tc0_system.c
@@ -294,7 +294,7 @@ int tc0_system_process_notification(const struct fwk_event *event,
static unsigned int scmi_notification_count = 0;
static bool sds_notification_received = false;
- assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
+ fwk_assert(fwk_id_is_type(event->target_id, FWK_ID_TYPE_MODULE));
if (fwk_id_is_equal(event->id,
mod_scmi_notification_id_initialized)) {