summaryrefslogtreecommitdiff
path: root/chip/stm32
diff options
context:
space:
mode:
authorDawid Niedzwiecki <dn@semihalf.com>2020-11-06 09:20:56 +0100
committerCommit Bot <commit-bot@chromium.org>2020-12-14 19:59:09 +0000
commitf96f176c303a73973d7cf5ddf1abf86f534a6e39 (patch)
treea793c58f008cfa94cc93ea34627fd1b6457e3a1b /chip/stm32
parenta23ef3d074335f2b6953194671f966117fd1fe60 (diff)
downloadchrome-ec-f96f176c303a73973d7cf5ddf1abf86f534a6e39.tar.gz
task_set_event: remove the wait argument
There is an option in the task_set_event function which force the calling task to wait for an event. However, the option is never used thus remove it. This also will help in the Zephyr migration process. BUG=b:172360521 BRANCH=none TEST=make buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ic152fd3d6862d487bcc0024c48d136556c0b81bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521599 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'chip/stm32')
-rw-r--r--chip/stm32/dma-stm32f4.c2
-rw-r--r--chip/stm32/dma.c2
-rw-r--r--chip/stm32/i2c-stm32f4.c2
-rw-r--r--chip/stm32/ucpd-stm32gx.c19
-rw-r--r--chip/stm32/usb_pd_phy.c2
5 files changed, 13 insertions, 14 deletions
diff --git a/chip/stm32/dma-stm32f4.c b/chip/stm32/dma-stm32f4.c
index abb33befda..860874de8c 100644
--- a/chip/stm32/dma-stm32f4.c
+++ b/chip/stm32/dma-stm32f4.c
@@ -261,7 +261,7 @@ static inline void _dma_wake_callback(void *cb_data)
task_id_t id = (task_id_t)(int)cb_data;
if (id != TASK_ID_INVALID)
- task_set_event(id, TASK_EVENT_DMA_TC, 0);
+ task_set_event(id, TASK_EVENT_DMA_TC);
}
void dma_enable_tc_interrupt(enum dma_channel stream)
diff --git a/chip/stm32/dma.c b/chip/stm32/dma.c
index a2ed6ca3cb..cd6038b2aa 100644
--- a/chip/stm32/dma.c
+++ b/chip/stm32/dma.c
@@ -276,7 +276,7 @@ static inline void _dma_wake_callback(void *cb_data)
{
task_id_t id = (task_id_t)(int)cb_data;
if (id != TASK_ID_INVALID)
- task_set_event(id, TASK_EVENT_DMA_TC, 0);
+ task_set_event(id, TASK_EVENT_DMA_TC);
}
void dma_enable_tc_interrupt(enum dma_channel channel)
diff --git a/chip/stm32/i2c-stm32f4.c b/chip/stm32/i2c-stm32f4.c
index df6e61564f..c1f19704b5 100644
--- a/chip/stm32/i2c-stm32f4.c
+++ b/chip/stm32/i2c-stm32f4.c
@@ -79,7 +79,7 @@ static inline void _i2c_dma_wake_callback(void *cb_data, int port)
task_id_t id = (task_id_t)(int)cb_data;
if (id != TASK_ID_INVALID)
- task_set_event(id, TASK_EVENT_I2C_COMPLETION(port), 0);
+ task_set_event(id, TASK_EVENT_I2C_COMPLETION(port));
}
/* Each callback is hardcoded to an I2C channel. */
diff --git a/chip/stm32/ucpd-stm32gx.c b/chip/stm32/ucpd-stm32gx.c
index 8a21087b05..f0240230c7 100644
--- a/chip/stm32/ucpd-stm32gx.c
+++ b/chip/stm32/ucpd-stm32gx.c
@@ -777,7 +777,7 @@ static void ucpd_send_good_crc(int port, uint16_t rx_header)
ucpd_tx_buffers[TX_MSG_GOOD_CRC].type = tx_type;
/* Notify ucpd task that a GoodCRC message tx request is pending */
- task_set_event(TASK_ID_UCPD, UCPD_EVT_GOOD_CRC_REQ, 0);
+ task_set_event(TASK_ID_UCPD, UCPD_EVT_GOOD_CRC_REQ);
}
int stm32gx_ucpd_transmit(int port,
@@ -800,7 +800,7 @@ int stm32gx_ucpd_transmit(int port,
len - 2);
/* Notify ucpd task that a TCPM message tx request is pending */
- task_set_event(TASK_ID_UCPD, UCPD_EVT_TCPM_MSG_REQ, 0);
+ task_set_event(TASK_ID_UCPD, UCPD_EVT_TCPM_MSG_REQ);
return EC_SUCCESS;
}
@@ -847,7 +847,7 @@ void stm32gx_ucpd1_irq(void)
/* Check for CC events, set event to wake PD task */
if (sr & (STM32_UCPD_SR_TYPECEVT1 | STM32_UCPD_SR_TYPECEVT2))
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC);
/*
* Check for Tx events. tx_mask includes all status bits related to the
@@ -858,18 +858,17 @@ void stm32gx_ucpd1_irq(void)
if (sr & tx_done_mask) {
/* Check for tx message complete */
if (sr & STM32_UCPD_SR_TXMSGSENT) {
- task_set_event(TASK_ID_UCPD, UCPD_EVT_TX_MSG_SUCCESS,
- 0);
+ task_set_event(TASK_ID_UCPD, UCPD_EVT_TX_MSG_SUCCESS);
#ifdef CONFIG_STM32G4_UCPD_DEBUG
ucpd_log_mark_tx_comp();
#endif
} else if (sr & (STM32_UCPD_SR_TXMSGABT |
STM32_UCPD_SR_TXMSGDISC |STM32_UCPD_SR_TXUND)) {
- task_set_event(TASK_ID_UCPD, UCPD_EVT_TX_MSG_FAIL, 0);
+ task_set_event(TASK_ID_UCPD, UCPD_EVT_TX_MSG_FAIL);
} else if (sr & STM32_UCPD_SR_HRSTSENT) {
- task_set_event(TASK_ID_UCPD, UCPD_EVT_HR_DONE, 0);
+ task_set_event(TASK_ID_UCPD, UCPD_EVT_HR_DONE);
} else if (sr & STM32_UCPD_SR_HRSTDISC) {
- task_set_event(TASK_ID_UCPD, UCPD_EVT_HR_FAIL, 0);
+ task_set_event(TASK_ID_UCPD, UCPD_EVT_HR_FAIL);
}
/* Disable Tx interrupts */
ucpd_tx_interrupts_enable(port, 0);
@@ -906,7 +905,7 @@ void stm32gx_ucpd1_irq(void)
ucpd_send_good_crc(port, *rx_header);
} else {
task_set_event(TASK_ID_UCPD,
- UCPD_EVT_RX_GOOD_CRC, 0);
+ UCPD_EVT_RX_GOOD_CRC);
ucpd_crc_id = PD_HEADER_ID(*rx_header);
}
}
@@ -915,7 +914,7 @@ void stm32gx_ucpd1_irq(void)
if (sr & STM32_UCPD_SR_RXHRSTDET) {
/* hard reset received */
pd_execute_hard_reset(port);
- task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE);
hook_call_deferred(&ucpd_hard_reset_rx_log_data, 0);
}
diff --git a/chip/stm32/usb_pd_phy.c b/chip/stm32/usb_pd_phy.c
index b53c5cfeeb..90506d8975 100644
--- a/chip/stm32/usb_pd_phy.c
+++ b/chip/stm32/usb_pd_phy.c
@@ -303,7 +303,7 @@ static void tx_dma_done(void *data)
pd_tx_disable(port, polarity);
#if defined(CONFIG_COMMON_RUNTIME) && defined(CONFIG_DMA_DEFAULT_HANDLERS)
- task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_DMA_TC, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_DMA_TC);
#endif
}