RFC: Introduce new mailbox API mbox_send_then_poll_rx and use it in TISCI for AM243x EVM platform#108491
RFC: Introduce new mailbox API mbox_send_then_poll_rx and use it in TISCI for AM243x EVM platform#108491natto1784 wants to merge 5 commits into
Conversation
Add a new API that allows polling for a response instead of the usual way of waiting for an interrupt service routine to use a callback. This is useful for - 1. Mailboxes that do not have interrupts 2. PRE_KERNEL access since using callbacks implies using semaphores and the like, which are not available at that stage. Also include a *_dt definition that allows passing struct mbox_dt_spec instead of raw channel IDs. Signed-off-by: Amneesh Singh <amneesh@ti.com>
TISCI uses ti_secproxy as the mailbox for communicating with the DM for things as power management, clock management and more. We currently use a semaphore as a notification for the received reply/message from the DM after we send a message. However, since kernel services are not initialized during PRE_KERNEL stages, we cannot rely on this. To overcome this, add a polling API that first sends a message on a specified tx_channel and then poll for a reply on a specified rx_channel. This is also similarly, a blocking call. Signed-off-by: Amneesh Singh <amneesh@ti.com>
TISCI uses ti_secproxy as the mailbox for communicating with the DM for things as power management, clock management and more. We currently use a semaphore as a notification for the received reply/message from the DM after we send a message. However, since kernel services are not initialized during PRE_KERNEL stages, we cannot rely on this. To solve this, use the new mbox_send_then_poll_rx mailbox API to wait on a message if it's PRE_KERNEL. Signed-off-by: Amneesh Singh <amneesh@ti.com>
Add the clock controller node for TISCI and also add power-domains and clocks properties for supported general peripherals in the files. Signed-off-by: Amneesh Singh <amneesh@ti.com>
Enable Kconfig options for TISCI, clock control, power domains and power management for the R5FSS0_0 core. Signed-off-by: Amneesh Singh <amneesh@ti.com>
|
can you not achieve this by adding a
unconditionally poll in the MBOX is the MBOX |
|



NOTE: This patchset is an alternative to the existing PR - #105343
Proposal
Add a new API that allows polling on a response instead of waiting for an interrupt to call a registered callback function. This is useful in two particular situations -
Potential improvemets
Example
Added an implementation for
ti_secproxymailbox and a call for it intiscifirmware driver.