summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--baseboard/dedede/variant_ec_it8320.c2
-rw-r--r--baseboard/dedede/variant_ec_npcx796fc.c2
-rw-r--r--baseboard/hatch/baseboard.c2
-rw-r--r--board/samus/power_sequence.c2
-rw-r--r--board/samus_pd/board.c4
-rw-r--r--board/twinkie/sniffer.c5
-rw-r--r--chip/lm4/i2c.c2
-rw-r--r--chip/stm32/pwm.c4
-rw-r--r--common/button.c5
-rw-r--r--common/charge_manager.c2
-rw-r--r--common/device_event.c2
-rw-r--r--common/dptf.c4
-rw-r--r--common/host_event_commands.c4
-rw-r--r--common/keyboard_scan.c4
-rw-r--r--common/timer.c4
-rw-r--r--common/usb_pd_protocol.c8
-rw-r--r--common/usbc/usb_pe_drp_sm.c7
-rw-r--r--common/usbc/usb_prl_sm.c10
-rw-r--r--common/usbc/usb_tc_drp_acc_trysrc_sm.c29
-rw-r--r--common/usbc_ppc.c4
-rw-r--r--core/cortex-m/atomic.h4
-rw-r--r--core/cortex-m/task.c14
-rw-r--r--core/cortex-m0/atomic.h4
-rw-r--r--core/cortex-m0/task.c8
-rw-r--r--core/host/atomic.h4
-rw-r--r--core/minute-ia/atomic.h4
-rw-r--r--core/minute-ia/task.c8
-rw-r--r--core/nds32/atomic.h4
-rw-r--r--core/nds32/task.c6
-rw-r--r--core/riscv-rv32i/atomic.h4
-rw-r--r--core/riscv-rv32i/task.c8
-rw-r--r--driver/ppc/aoz1380.c2
-rw-r--r--include/system.h4
33 files changed, 92 insertions, 88 deletions
diff --git a/baseboard/dedede/variant_ec_it8320.c b/baseboard/dedede/variant_ec_it8320.c
index a3abea9d58..d7e2785c4a 100644
--- a/baseboard/dedede/variant_ec_it8320.c
+++ b/baseboard/dedede/variant_ec_it8320.c
@@ -20,7 +20,7 @@
static void pp3300_a_pgood_low(void)
{
- deprecated_atomic_clear(&pp3300_a_pgood, 1);
+ deprecated_atomic_clear_bits(&pp3300_a_pgood, 1);
/* Disable low interrupt while asserted */
vcmp_enable(VCMP_SNS_PP3300_LOW, 0);
diff --git a/baseboard/dedede/variant_ec_npcx796fc.c b/baseboard/dedede/variant_ec_npcx796fc.c
index 878a1ea5a0..ae7890c473 100644
--- a/baseboard/dedede/variant_ec_npcx796fc.c
+++ b/baseboard/dedede/variant_ec_npcx796fc.c
@@ -42,7 +42,7 @@ void pp3300_a_pgood_high(void)
void pp3300_a_pgood_low(void)
{
- deprecated_atomic_clear(&pp3300_a_pgood, 1);
+ deprecated_atomic_clear_bits(&pp3300_a_pgood, 1);
/* Disable this interrupt while it's asserted. */
npcx_adc_thresh_int_enable(NPCX_ADC_THRESH2, 0);
diff --git a/baseboard/hatch/baseboard.c b/baseboard/hatch/baseboard.c
index 790a164f54..367f83e8d2 100644
--- a/baseboard/hatch/baseboard.c
+++ b/baseboard/hatch/baseboard.c
@@ -345,7 +345,7 @@ void baseboard_mst_enable_control(enum mst_source src, int level)
if (level)
deprecated_atomic_or(&mst_input_levels, 1 << src);
else
- deprecated_atomic_clear(&mst_input_levels, 1 << src);
+ deprecated_atomic_clear_bits(&mst_input_levels, 1 << src);
gpio_set_level(GPIO_EN_MST, mst_input_levels ? 1 : 0);
}
diff --git a/board/samus/power_sequence.c b/board/samus/power_sequence.c
index be2c9961cd..f6033055c4 100644
--- a/board/samus/power_sequence.c
+++ b/board/samus/power_sequence.c
@@ -504,7 +504,7 @@ void set_pp5000_in_g3(int mask, int enable)
if (enable)
deprecated_atomic_or(&pp5000_in_g3, mask);
else
- deprecated_atomic_clear(&pp5000_in_g3, mask);
+ deprecated_atomic_clear_bits(&pp5000_in_g3, mask);
/* if we are in G3 now, then set the rail accordingly */
if (chipset_in_state(CHIPSET_STATE_HARD_OFF))
diff --git a/board/samus_pd/board.c b/board/samus_pd/board.c
index fb98304c80..0f9c8cfbfe 100644
--- a/board/samus_pd/board.c
+++ b/board/samus_pd/board.c
@@ -593,7 +593,7 @@ static enum ec_status ec_status_host_cmd(struct host_cmd_handler_args *args)
r->status = pd_status_flags;
/* Clear host event */
- deprecated_atomic_clear(&(pd_status_flags), PD_STATUS_HOST_EVENT);
+ deprecated_atomic_clear_bits(&(pd_status_flags), PD_STATUS_HOST_EVENT);
args->response_size = sizeof(*r);
@@ -608,7 +608,7 @@ host_event_status_host_cmd(struct host_cmd_handler_args *args)
struct ec_response_host_event_status *r = args->response;
/* Clear host event bit to avoid sending more unnecessary events */
- deprecated_atomic_clear(&(pd_status_flags), PD_STATUS_HOST_EVENT);
+ deprecated_atomic_clear_bits(&(pd_status_flags), PD_STATUS_HOST_EVENT);
/* Read and clear the host event status to return to AP */
r->status = deprecated_atomic_read_clear(&(host_event_status_flags));
diff --git a/board/twinkie/sniffer.c b/board/twinkie/sniffer.c
index f94028b572..6eb2e0824e 100644
--- a/board/twinkie/sniffer.c
+++ b/board/twinkie/sniffer.c
@@ -316,9 +316,10 @@ void sniffer_task(void)
+ (EP_PACKET_HEADER_SIZE>>1))),
samples[d >> 4]+off,
EP_PAYLOAD_SIZE);
- deprecated_atomic_clear((uint32_t *)&free_usb, 1 << u);
+ deprecated_atomic_clear_bits((uint32_t *)&free_usb,
+ 1 << u);
u = !u;
- deprecated_atomic_clear(&filled_dma, 1 << d);
+ deprecated_atomic_clear_bits(&filled_dma, 1 << d);
}
led_reset_record();
diff --git a/chip/lm4/i2c.c b/chip/lm4/i2c.c
index 73f9ead8e1..0608b433bc 100644
--- a/chip/lm4/i2c.c
+++ b/chip/lm4/i2c.c
@@ -204,7 +204,7 @@ int chip_i2c_xfer(const int port, const uint16_t slave_addr_flags,
/* Clock timeout or arbitration lost. Reset port to clear. */
deprecated_atomic_or(LM4_SYSTEM_SRI2C_ADDR, BIT(port));
clock_wait_cycles(3);
- deprecated_atomic_clear(LM4_SYSTEM_SRI2C_ADDR, BIT(port));
+ deprecated_atomic_clear_bits(LM4_SYSTEM_SRI2C_ADDR, BIT(port));
clock_wait_cycles(3);
/* Restore settings */
diff --git a/chip/stm32/pwm.c b/chip/stm32/pwm.c
index 1a8f2050d0..ce9c4ae04b 100644
--- a/chip/stm32/pwm.c
+++ b/chip/stm32/pwm.c
@@ -125,7 +125,7 @@ static void pwm_disable(enum pwm_channel ch)
/* Allow sleep */
enable_sleep(SLEEP_MASK_PWM);
- deprecated_atomic_clear(&using_pwm, 1 << ch);
+ deprecated_atomic_clear_bits(&using_pwm, 1 << ch);
/* Unless another PWM is active... Then prevent sleep */
if (using_pwm)
@@ -147,7 +147,7 @@ int pwm_get_enabled(enum pwm_channel ch)
static void pwm_reconfigure(enum pwm_channel ch)
{
- deprecated_atomic_clear(&using_pwm, 1 << ch);
+ deprecated_atomic_clear_bits(&using_pwm, 1 << ch);
pwm_configure(ch);
}
diff --git a/common/button.c b/common/button.c
index 42d08c9baf..6f346ec7cb 100644
--- a/common/button.c
+++ b/common/button.c
@@ -387,8 +387,9 @@ static void simulate_button_release_deferred(void)
/* Check state for button pressed */
if (sim_button_state & BIT(buttons[button_idx].type)) {
/* Set state of the button as released */
- deprecated_atomic_clear(&sim_button_state,
- BIT(buttons[button_idx].type));
+ deprecated_atomic_clear_bits(
+ &sim_button_state,
+ BIT(buttons[button_idx].type));
button_interrupt_simulate(button_idx);
}
diff --git a/common/charge_manager.c b/common/charge_manager.c
index de88d3e437..bc82859e5d 100644
--- a/common/charge_manager.c
+++ b/common/charge_manager.c
@@ -1250,7 +1250,7 @@ void charge_manager_source_port(int port, int enable)
if (enable)
deprecated_atomic_or(&source_port_bitmap, 1 << port);
else
- deprecated_atomic_clear(&source_port_bitmap, 1 << port);
+ deprecated_atomic_clear_bits(&source_port_bitmap, 1 << port);
/* No change, exit early. */
if (prev_bitmap == source_port_bitmap)
diff --git a/common/device_event.c b/common/device_event.c
index 16d34b8729..3b1fae79d0 100644
--- a/common/device_event.c
+++ b/common/device_event.c
@@ -55,7 +55,7 @@ void device_clear_events(uint32_t mask)
if (device_current_events & mask)
CPRINTS("device event clear 0x%08x", mask);
- deprecated_atomic_clear(&device_current_events, mask);
+ deprecated_atomic_clear_bits(&device_current_events, mask);
}
static void device_set_enabled_events(uint32_t mask)
diff --git a/common/dptf.c b/common/dptf.c
index 75bcdcad01..f4fc6d0ff6 100644
--- a/common/dptf.c
+++ b/common/dptf.c
@@ -47,7 +47,7 @@ int dptf_query_next_sensor_event(void)
for (id = 0; id < TEMP_SENSOR_COUNT; id++)
if (dptf_seen & BIT(id)) { /* atomic? */
- deprecated_atomic_clear(&dptf_seen, BIT(id));
+ deprecated_atomic_clear_bits(&dptf_seen, BIT(id));
return id;
}
@@ -109,7 +109,7 @@ void dptf_set_temp_threshold(int sensor_id, int temp, int idx, int enable)
if (dptf_threshold[sensor_id][idx].temp == -1)
cond_init(&dptf_threshold[sensor_id][idx].over, 0);
dptf_threshold[sensor_id][idx].temp = temp;
- deprecated_atomic_clear(&dptf_seen, BIT(sensor_id));
+ deprecated_atomic_clear_bits(&dptf_seen, BIT(sensor_id));
} else {
dptf_threshold[sensor_id][idx].temp = -1;
}
diff --git a/common/host_event_commands.c b/common/host_event_commands.c
index 01e1d577cf..9ab7f19d04 100644
--- a/common/host_event_commands.c
+++ b/common/host_event_commands.c
@@ -276,9 +276,9 @@ static void host_events_atomic_clear(host_event_t *e, host_event_t m)
{
uint32_t *ptr = (uint32_t *)e;
- deprecated_atomic_clear(ptr, (uint32_t)m);
+ deprecated_atomic_clear_bits(ptr, (uint32_t)m);
#ifdef CONFIG_HOST_EVENT64
- deprecated_atomic_clear(ptr + 1, (uint32_t)(m >> 32));
+ deprecated_atomic_clear_bits(ptr + 1, (uint32_t)(m >> 32));
#endif
}
diff --git a/common/keyboard_scan.c b/common/keyboard_scan.c
index 7e68c28bee..0e95eb6c34 100644
--- a/common/keyboard_scan.c
+++ b/common/keyboard_scan.c
@@ -143,8 +143,8 @@ void keyboard_scan_enable(int enable, enum kb_scan_disable_masks mask)
{
/* Access atomically */
if (enable) {
- deprecated_atomic_clear((uint32_t *)&disable_scanning_mask,
- mask);
+ deprecated_atomic_clear_bits((uint32_t *)&disable_scanning_mask,
+ mask);
} else {
deprecated_atomic_or((uint32_t *)&disable_scanning_mask, mask);
clear_typematic_key();
diff --git a/common/timer.c b/common/timer.c
index 6a210ee9da..c359efb541 100644
--- a/common/timer.c
+++ b/common/timer.c
@@ -41,7 +41,7 @@ static int timer_irq;
static void expire_timer(task_id_t tskid)
{
/* we are done with this timer */
- deprecated_atomic_clear(&timer_running, 1 << tskid);
+ deprecated_atomic_clear_bits(&timer_running, 1 << tskid);
/* wake up the taks waiting for this timer */
task_set_event(tskid, TASK_EVENT_TIMER, 0);
}
@@ -146,7 +146,7 @@ void timer_cancel(task_id_t tskid)
{
ASSERT(tskid < TASK_ID_COUNT);
- deprecated_atomic_clear(&timer_running, BIT(tskid));
+ deprecated_atomic_clear_bits(&timer_running, BIT(tskid));
/*
* Don't need to cancel the hardware timer interrupt, instead do
* timer-related housekeeping when the next timer interrupt fires.
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index cbf1a193cb..1fe963f1fc 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -531,8 +531,8 @@ static int reset_device_and_notify(int port)
* waking the TCPC, but it has also set PD_EVENT_TCPC_RESET again, which
* would result in a second, unnecessary init.
*/
- deprecated_atomic_clear(task_get_event_bitmap(task_get_current()),
- PD_EVENT_TCPC_RESET);
+ deprecated_atomic_clear_bits(task_get_event_bitmap(task_get_current()),
+ PD_EVENT_TCPC_RESET);
waiting_tasks =
deprecated_atomic_read_clear(&pd[port].tasks_waiting_on_reset);
@@ -611,8 +611,8 @@ void pd_prevent_low_power_mode(int port, int prevent)
deprecated_atomic_or(&pd[port].tasks_preventing_lpm,
current_task_mask);
else
- deprecated_atomic_clear(&pd[port].tasks_preventing_lpm,
- current_task_mask);
+ deprecated_atomic_clear_bits(&pd[port].tasks_preventing_lpm,
+ current_task_mask);
}
/* This is only called from the PD tasks that owns the port. */
diff --git a/common/usbc/usb_pe_drp_sm.c b/common/usbc/usb_pe_drp_sm.c
index c64d8386ae..210bb9d1d8 100644
--- a/common/usbc/usb_pe_drp_sm.c
+++ b/common/usbc/usb_pe_drp_sm.c
@@ -65,7 +65,8 @@
#define PE_SET_FLAG(port, flag) deprecated_atomic_or(&pe[port].flags, (flag))
-#define PE_CLR_FLAG(port, flag) deprecated_atomic_clear(&pe[port].flags, (flag))
+#define PE_CLR_FLAG(port, flag) \
+ deprecated_atomic_clear_bits(&pe[port].flags, (flag))
#define PE_CHK_FLAG(port, flag) (pe[port].flags & (flag))
/*
@@ -75,7 +76,7 @@
#define PE_SET_DPM_REQUEST(port, req) \
deprecated_atomic_or(&pe[port].dpm_request, (req))
#define PE_CLR_DPM_REQUEST(port, req) \
- deprecated_atomic_clear(&pe[port].dpm_request, (req))
+ deprecated_atomic_clear_bits(&pe[port].dpm_request, (req))
#define PE_CHK_DPM_REQUEST(port, req) (pe[port].dpm_request & (req))
/*
@@ -6156,7 +6157,7 @@ void pd_dfp_discovery_init(int port)
void pd_discovery_access_clear(int port, enum tcpm_transmit_type type)
{
- deprecated_atomic_clear(&task_access[port][type], 0xFFFFFFFF);
+ deprecated_atomic_clear_bits(&task_access[port][type], 0xFFFFFFFF);
}
bool pd_discovery_access_validate(int port, enum tcpm_transmit_type type)
diff --git a/common/usbc/usb_prl_sm.c b/common/usbc/usb_prl_sm.c
index dd8a06c0bd..69861fb482 100644
--- a/common/usbc/usb_prl_sm.c
+++ b/common/usbc/usb_prl_sm.c
@@ -42,30 +42,30 @@
#define RCH_SET_FLAG(port, flag) deprecated_atomic_or(&rch[port].flags, (flag))
#define RCH_CLR_FLAG(port, flag) \
- deprecated_atomic_clear(&rch[port].flags, (flag))
+ deprecated_atomic_clear_bits(&rch[port].flags, (flag))
#define RCH_CHK_FLAG(port, flag) (rch[port].flags & (flag))
#define TCH_SET_FLAG(port, flag) deprecated_atomic_or(&tch[port].flags, (flag))
#define TCH_CLR_FLAG(port, flag) \
- deprecated_atomic_clear(&tch[port].flags, (flag))
+ deprecated_atomic_clear_bits(&tch[port].flags, (flag))
#define TCH_CHK_FLAG(port, flag) (tch[port].flags & (flag))
#define PRL_TX_SET_FLAG(port, flag) \
deprecated_atomic_or(&prl_tx[port].flags, (flag))
#define PRL_TX_CLR_FLAG(port, flag) \
- deprecated_atomic_clear(&prl_tx[port].flags, (flag))
+ deprecated_atomic_clear_bits(&prl_tx[port].flags, (flag))
#define PRL_TX_CHK_FLAG(port, flag) (prl_tx[port].flags & (flag))
#define PRL_HR_SET_FLAG(port, flag) \
deprecated_atomic_or(&prl_hr[port].flags, (flag))
#define PRL_HR_CLR_FLAG(port, flag) \
- deprecated_atomic_clear(&prl_hr[port].flags, (flag))
+ deprecated_atomic_clear_bits(&prl_hr[port].flags, (flag))
#define PRL_HR_CHK_FLAG(port, flag) (prl_hr[port].flags & (flag))
#define PDMSG_SET_FLAG(port, flag) \
deprecated_atomic_or(&pdmsg[port].flags, (flag))
#define PDMSG_CLR_FLAG(port, flag) \
- deprecated_atomic_clear(&pdmsg[port].flags, (flag))
+ deprecated_atomic_clear_bits(&pdmsg[port].flags, (flag))
#define PDMSG_CHK_FLAG(port, flag) (pdmsg[port].flags & (flag))
/* Protocol Layer Flags */
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
index 97d69b0876..1756f39c4a 100644
--- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c
+++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
@@ -65,14 +65,15 @@ void print_flag(int set_or_clear, int flag);
print_flag(1, flag); \
deprecated_atomic_or(&tc[port].flags, (flag)); \
} while (0)
-#define TC_CLR_FLAG(port, flag) \
- do { \
- print_flag(0, flag); \
- deprecated_atomic_clear(&tc[port].flags, (flag)); \
+#define TC_CLR_FLAG(port, flag) \
+ do { \
+ print_flag(0, flag); \
+ deprecated_atomic_clear_bits(&tc[port].flags, (flag)); \
} while (0)
#else
#define TC_SET_FLAG(port, flag) deprecated_atomic_or(&tc[port].flags, (flag))
-#define TC_CLR_FLAG(port, flag) deprecated_atomic_clear(&tc[port].flags, (flag))
+#define TC_CLR_FLAG(port, flag) \
+ deprecated_atomic_clear_bits(&tc[port].flags, (flag))
#endif
#define TC_CHK_FLAG(port, flag) (tc[port].flags & (flag))
@@ -607,8 +608,8 @@ static bool pd_comm_allowed_by_policy(void)
static void tc_policy_pd_enable(int port, int en)
{
if (en)
- deprecated_atomic_clear(&tc[port].pd_disabled_mask,
- PD_DISABLED_BY_POLICY);
+ deprecated_atomic_clear_bits(&tc[port].pd_disabled_mask,
+ PD_DISABLED_BY_POLICY);
else
deprecated_atomic_or(&tc[port].pd_disabled_mask,
PD_DISABLED_BY_POLICY);
@@ -619,8 +620,8 @@ static void tc_policy_pd_enable(int port, int en)
static void tc_enable_pd(int port, int en)
{
if (en)
- deprecated_atomic_clear(&tc[port].pd_disabled_mask,
- PD_DISABLED_NO_CONNECTION);
+ deprecated_atomic_clear_bits(&tc[port].pd_disabled_mask,
+ PD_DISABLED_NO_CONNECTION);
else
deprecated_atomic_or(&tc[port].pd_disabled_mask,
PD_DISABLED_NO_CONNECTION);
@@ -631,7 +632,7 @@ static void tc_enable_try_src(int en)
if (en)
deprecated_atomic_or(&pd_try_src, 1);
else
- deprecated_atomic_clear(&pd_try_src, 1);
+ deprecated_atomic_clear_bits(&pd_try_src, 1);
}
static void tc_detached(int port)
@@ -1739,8 +1740,8 @@ static __maybe_unused int reset_device_and_notify(int port)
* waking the TCPC, but it has also set PD_EVENT_TCPC_RESET again, which
* would result in a second, unnecessary init.
*/
- deprecated_atomic_clear(task_get_event_bitmap(task_get_current()),
- PD_EVENT_TCPC_RESET);
+ deprecated_atomic_clear_bits(task_get_event_bitmap(task_get_current()),
+ PD_EVENT_TCPC_RESET);
waiting_tasks =
deprecated_atomic_read_clear(&tc[port].tasks_waiting_on_reset);
@@ -1810,8 +1811,8 @@ void pd_prevent_low_power_mode(int port, int prevent)
deprecated_atomic_or(&tc[port].tasks_preventing_lpm,
current_task_mask);
else
- deprecated_atomic_clear(&tc[port].tasks_preventing_lpm,
- current_task_mask);
+ deprecated_atomic_clear_bits(&tc[port].tasks_preventing_lpm,
+ current_task_mask);
}
#endif /* CONFIG_USB_PD_TCPC_LOW_POWER */
diff --git a/common/usbc_ppc.c b/common/usbc_ppc.c
index 7b01ed4591..7a334ae439 100644
--- a/common/usbc_ppc.c
+++ b/common/usbc_ppc.c
@@ -82,7 +82,7 @@ int ppc_add_oc_event(int port)
oc_event_cnt_tbl[port]++;
/* The port overcurrented, so don't clear it's OC events. */
- deprecated_atomic_clear(&connected_ports, 1 << port);
+ deprecated_atomic_clear_bits(&connected_ports, 1 << port);
if (oc_event_cnt_tbl[port] >= PPC_OC_CNT_THRESH)
ppc_prints("OC event limit reached! "
@@ -266,7 +266,7 @@ void ppc_sink_is_connected(int port, int is_connected)
if (is_connected)
deprecated_atomic_or(&connected_ports, 1 << port);
else
- deprecated_atomic_clear(&connected_ports, 1 << port);
+ deprecated_atomic_clear_bits(&connected_ports, 1 << port);
}
int ppc_vbus_sink_enable(int port, int enable)
diff --git a/core/cortex-m/atomic.h b/core/cortex-m/atomic.h
index 4d56ce3e4e..736d5887b4 100644
--- a/core/cortex-m/atomic.h
+++ b/core/cortex-m/atomic.h
@@ -36,8 +36,8 @@
* removed in the following patches. Please see b:169151160 for more details.
*/
-static inline void deprecated_atomic_clear(uint32_t volatile *addr,
- uint32_t bits)
+static inline void deprecated_atomic_clear_bits(uint32_t volatile *addr,
+ uint32_t bits)
{
ATOMIC_OP(bic, addr, bits);
}
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c
index 058b892a46..510d18fca0 100644
--- a/core/cortex-m/task.c
+++ b/core/cortex-m/task.c
@@ -421,7 +421,7 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched)
if (timeout_us > 0) {
timer_cancel(me);
/* Ensure timer event is clear, we no longer care about it */
- deprecated_atomic_clear(&tsk->events, TASK_EVENT_TIMER);
+ deprecated_atomic_clear_bits(&tsk->events, TASK_EVENT_TIMER);
}
return evt;
}
@@ -501,7 +501,7 @@ void task_enable_task(task_id_t tskid)
void task_disable_task(task_id_t tskid)
{
- deprecated_atomic_clear(&tasks_enabled, BIT(tskid));
+ deprecated_atomic_clear_bits(&tasks_enabled, BIT(tskid));
if (!in_interrupt_context() && tskid == task_get_current())
__schedule(0, 0);
@@ -579,8 +579,8 @@ static void deferred_task_reset(void)
while (deferred_reset_task_ids) {
task_id_t reset_id = __fls(deferred_reset_task_ids);
- deprecated_atomic_clear(&deferred_reset_task_ids,
- 1 << reset_id);
+ deprecated_atomic_clear_bits(&deferred_reset_task_ids,
+ 1 << reset_id);
do_task_reset(reset_id);
}
}
@@ -760,7 +760,7 @@ int task_reset_cleanup(void)
* itself back to the list of tasks to notify,
* and we will notify it again.
*/
- deprecated_atomic_clear(state, 1 << notify_id);
+ deprecated_atomic_clear_bits(state, 1 << notify_id);
/*
* Skip any invalid ids set by tasks that
* requested a non-blocking reset.
@@ -897,7 +897,7 @@ void mutex_lock(struct mutex *mtx)
task_wait_event_mask(TASK_EVENT_MUTEX, 0);
} while (value);
- deprecated_atomic_clear(&mtx->waiters, id);
+ deprecated_atomic_clear_bits(&mtx->waiters, id);
}
void mutex_unlock(struct mutex *mtx)
@@ -923,7 +923,7 @@ void mutex_unlock(struct mutex *mtx)
}
/* Ensure no event is remaining from mutex wake-up */
- deprecated_atomic_clear(&tsk->events, TASK_EVENT_MUTEX);
+ deprecated_atomic_clear_bits(&tsk->events, TASK_EVENT_MUTEX);
}
void task_print_list(void)
diff --git a/core/cortex-m0/atomic.h b/core/cortex-m0/atomic.h
index 414e6a56c1..78ac91a676 100644
--- a/core/cortex-m0/atomic.h
+++ b/core/cortex-m0/atomic.h
@@ -33,8 +33,8 @@
* removed in the following patches. Please see b:169151160 for more details.
*/
-static inline void deprecated_atomic_clear(uint32_t volatile *addr,
- uint32_t bits)
+static inline void deprecated_atomic_clear_bits(uint32_t volatile *addr,
+ uint32_t bits)
{
ATOMIC_OP(bic, addr, bits);
}
diff --git a/core/cortex-m0/task.c b/core/cortex-m0/task.c
index 657ed88a73..3e54630ab2 100644
--- a/core/cortex-m0/task.c
+++ b/core/cortex-m0/task.c
@@ -349,7 +349,7 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched)
if (timeout_us > 0) {
timer_cancel(me);
/* Ensure timer event is clear, we no longer care about it */
- deprecated_atomic_clear(&tsk->events, TASK_EVENT_TIMER);
+ deprecated_atomic_clear_bits(&tsk->events, TASK_EVENT_TIMER);
}
return evt;
}
@@ -441,7 +441,7 @@ void task_enable_task(task_id_t tskid)
void task_disable_task(task_id_t tskid)
{
- deprecated_atomic_clear(&tasks_enabled, BIT(tskid));
+ deprecated_atomic_clear_bits(&tasks_enabled, BIT(tskid));
if (!in_interrupt_context() && tskid == task_get_current())
__schedule(0, 0);
@@ -514,7 +514,7 @@ void mutex_lock(struct mutex *mtx)
mtx->lock = 2;
__asm__ __volatile__("cpsie i");
- deprecated_atomic_clear(&mtx->waiters, id);
+ deprecated_atomic_clear_bits(&mtx->waiters, id);
}
void mutex_unlock(struct mutex *mtx)
@@ -540,7 +540,7 @@ void mutex_unlock(struct mutex *mtx)
}
/* Ensure no event is remaining from mutex wake-up */
- deprecated_atomic_clear(&tsk->events, TASK_EVENT_MUTEX);
+ deprecated_atomic_clear_bits(&tsk->events, TASK_EVENT_MUTEX);
}
void task_print_list(void)
diff --git a/core/host/atomic.h b/core/host/atomic.h
index 4150a20216..7f2e0ba16f 100644
--- a/core/host/atomic.h
+++ b/core/host/atomic.h
@@ -16,8 +16,8 @@
* removed in the following patches. Please see b:169151160 for more details.
*/
-static inline void deprecated_atomic_clear(uint32_t volatile *addr,
- uint32_t bits)
+static inline void deprecated_atomic_clear_bits(uint32_t volatile *addr,
+ uint32_t bits)
{
__sync_and_and_fetch(addr, ~bits);
}
diff --git a/core/minute-ia/atomic.h b/core/minute-ia/atomic.h
index 89ed35340c..598fc5b3ed 100644
--- a/core/minute-ia/atomic.h
+++ b/core/minute-ia/atomic.h
@@ -48,8 +48,8 @@ static inline void deprecated_atomic_and_u8(uint8_t *addr, uint8_t bits)
ATOMIC_OP(and, addr, bits);
}
-static inline void deprecated_atomic_clear(uint32_t volatile *addr,
- uint32_t bits)
+static inline void deprecated_atomic_clear_bits(uint32_t volatile *addr,
+ uint32_t bits)
{
ATOMIC_OP(andl, addr, ~bits);
}
diff --git a/core/minute-ia/task.c b/core/minute-ia/task.c
index f0296596b1..431bd62e54 100644
--- a/core/minute-ia/task.c
+++ b/core/minute-ia/task.c
@@ -326,7 +326,7 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched)
if (timeout_us > 0) {
timer_cancel(me);
/* Ensure timer event is clear, we no longer care about it */
- deprecated_atomic_clear(&tsk->events, TASK_EVENT_TIMER);
+ deprecated_atomic_clear_bits(&tsk->events, TASK_EVENT_TIMER);
}
return evt;
}
@@ -411,7 +411,7 @@ void task_enable_task(task_id_t tskid)
void task_disable_task(task_id_t tskid)
{
- deprecated_atomic_clear(&tasks_enabled, BIT(tskid));
+ deprecated_atomic_clear_bits(&tasks_enabled, BIT(tskid));
if (!in_interrupt_context() && tskid == task_get_current())
__schedule(0, 0);
@@ -471,7 +471,7 @@ void mutex_lock(struct mutex *mtx)
}
} while (old_val);
- deprecated_atomic_clear(&mtx->waiters, id);
+ deprecated_atomic_clear_bits(&mtx->waiters, id);
}
void mutex_unlock(struct mutex *mtx)
@@ -498,7 +498,7 @@ void mutex_unlock(struct mutex *mtx)
}
/* Ensure no event is remaining from mutex wake-up */
- deprecated_atomic_clear(&tsk->events, TASK_EVENT_MUTEX);
+ deprecated_atomic_clear_bits(&tsk->events, TASK_EVENT_MUTEX);
}
void task_print_list(void)
diff --git a/core/nds32/atomic.h b/core/nds32/atomic.h
index e10a35aa54..d93d1e7b06 100644
--- a/core/nds32/atomic.h
+++ b/core/nds32/atomic.h
@@ -18,8 +18,8 @@
* removed in the following patches. Please see b:169151160 for more details.
*/
-static inline void deprecated_atomic_clear(uint32_t volatile *addr,
- uint32_t bits)
+static inline void deprecated_atomic_clear_bits(uint32_t volatile *addr,
+ uint32_t bits)
{
uint32_t int_mask = read_clear_int_mask();
diff --git a/core/nds32/task.c b/core/nds32/task.c
index c6ae32912e..9c3d6357ac 100644
--- a/core/nds32/task.c
+++ b/core/nds32/task.c
@@ -411,7 +411,7 @@ static uint32_t __ram_code __wait_evt(int timeout_us, task_id_t resched)
if (timeout_us > 0) {
timer_cancel(me);
/* Ensure timer event is clear, we no longer care about it */
- deprecated_atomic_clear(&tsk->events, TASK_EVENT_TIMER);
+ deprecated_atomic_clear_bits(&tsk->events, TASK_EVENT_TIMER);
}
return evt;
}
@@ -526,7 +526,7 @@ void task_enable_task(task_id_t tskid)
void task_disable_task(task_id_t tskid)
{
- deprecated_atomic_clear(&tasks_enabled, BIT(tskid));
+ deprecated_atomic_clear_bits(&tasks_enabled, BIT(tskid));
if (!in_interrupt_context() && tskid == task_get_current())
__schedule(0, 0, 0);
@@ -644,7 +644,7 @@ void __ram_code mutex_unlock(struct mutex *mtx)
}
/* Ensure no event is remaining from mutex wake-up */
- deprecated_atomic_clear(&tsk->events, TASK_EVENT_MUTEX);
+ deprecated_atomic_clear_bits(&tsk->events, TASK_EVENT_MUTEX);
}
void task_print_list(void)
diff --git a/core/riscv-rv32i/atomic.h b/core/riscv-rv32i/atomic.h
index a9e4df0344..db21e2a70d 100644
--- a/core/riscv-rv32i/atomic.h
+++ b/core/riscv-rv32i/atomic.h
@@ -28,8 +28,8 @@
* removed in the following patches. Please see b:169151160 for more details.
*/
-static inline void deprecated_atomic_clear(volatile uint32_t *addr,
- uint32_t bits)
+static inline void deprecated_atomic_clear_bits(volatile uint32_t *addr,
+ uint32_t bits)
{
ATOMIC_OP(and, ~bits, addr);
}
diff --git a/core/riscv-rv32i/task.c b/core/riscv-rv32i/task.c
index 862f9e3b81..ecd8d72382 100644
--- a/core/riscv-rv32i/task.c
+++ b/core/riscv-rv32i/task.c
@@ -405,7 +405,7 @@ static uint32_t __ram_code __wait_evt(int timeout_us, task_id_t resched)
if (timeout_us > 0) {
timer_cancel(me);
/* Ensure timer event is clear, we no longer care about it */
- deprecated_atomic_clear(&tsk->events, TASK_EVENT_TIMER);
+ deprecated_atomic_clear_bits(&tsk->events, TASK_EVENT_TIMER);
}
return evt;
}
@@ -499,7 +499,7 @@ void task_enable_task(task_id_t tskid)
void task_disable_task(task_id_t tskid)
{
- deprecated_atomic_clear(&tasks_enabled, BIT(tskid));
+ deprecated_atomic_clear_bits(&tasks_enabled, BIT(tskid));
if (!in_interrupt_context() && tskid == task_get_current())
__schedule(0, 0, 0);
@@ -575,7 +575,7 @@ void __ram_code mutex_lock(struct mutex *mtx)
task_wait_event_mask(TASK_EVENT_MUTEX, 0);
}
- deprecated_atomic_clear(&mtx->waiters, id);
+ deprecated_atomic_clear_bits(&mtx->waiters, id);
}
void __ram_code mutex_unlock(struct mutex *mtx)
@@ -599,7 +599,7 @@ void __ram_code mutex_unlock(struct mutex *mtx)
}
/* Ensure no event is remaining from mutex wake-up */
- deprecated_atomic_clear(&tsk->events, TASK_EVENT_MUTEX);
+ deprecated_atomic_clear_bits(&tsk->events, TASK_EVENT_MUTEX);
}
void task_print_list(void)
diff --git a/driver/ppc/aoz1380.c b/driver/ppc/aoz1380.c
index 163c8db2ed..c4d3cc6056 100644
--- a/driver/ppc/aoz1380.c
+++ b/driver/ppc/aoz1380.c
@@ -34,7 +34,7 @@ static uint32_t flags[CONFIG_USB_PD_PORT_MAX_COUNT];
#define AOZ1380_SET_FLAG(port, flag) deprecated_atomic_or(&flags[port], (flag))
#define AOZ1380_CLR_FLAG(port, flag) \
- deprecated_atomic_clear(&flags[port], (flag))
+ deprecated_atomic_clear_bits(&flags[port], (flag))
static int aoz1380_init(int port)
{
diff --git a/include/system.h b/include/system.h
index 34c3486f35..d14f382ee1 100644
--- a/include/system.h
+++ b/include/system.h
@@ -503,7 +503,7 @@ extern uint32_t sleep_mask;
*/
static inline void enable_sleep(uint32_t mask)
{
- deprecated_atomic_clear(&sleep_mask, mask);
+ deprecated_atomic_clear_bits(&sleep_mask, mask);
}
/**
@@ -537,7 +537,7 @@ static inline void disable_idle(void)
static inline void enable_idle(void)
{
- deprecated_atomic_clear(&idle_disabled, 1);
+ deprecated_atomic_clear_bits(&idle_disabled, 1);
}
#endif