PebbleOS v4.47.0-160-g9e782207f
Loading...
Searching...
No Matches
SF32LB mailbox

SiFli SF32LB mailbox. More...

Data Structures

struct  pbl_mbox_sf32lb
 SF32LB mailbox. More...
 

Macros

#define PBL_MBOX_SF32LB_NO_IRQ   UINT16_MAX
 Interrupt of a block whose interrupt does not reach this CPU.
 
#define PBL_MBOX_SF32LB_NUM_DOORBELLS   16U
 Doorbells per block.
 
#define PBL_MBOX_SF32LB_DEFINE(sym, _name, _base, _clk, ...)
 Define a mailbox block.
 

Functions

void pbl_mbox_sf32lb_irq_handler (const struct pbl_mbox_sf32lb *mbox)
 Interrupt handler of a block rung by the remote, connected by PBL_MBOX_SF32LB_DEFINE().
 

Detailed Description

SiFli SF32LB mailbox.

One mailbox block, with 16 doorbells on channel 1. Writing a doorbell interrupts the other subsystem's CPU, so a block either rings the remote (MAILBOX1, from the HCPU) or, when its interrupt reaches this CPU, is rung by it (MAILBOX2, LCPU2HCPU). Specifiers have one cell, the doorbell.


Data Structure Documentation

◆ pbl_mbox_sf32lb

struct pbl_mbox_sf32lb

SF32LB mailbox.

Data Fields
uintptr_t base Base address.
struct pbl_clk clk Clock, if controlled by this CPU.
struct pbl_mbox_controller ctrl Controller.
pbl_irq_t irqn Interrupt, or PBL_MBOX_SF32LB_NO_IRQ.

Macro Definition Documentation

◆ PBL_MBOX_SF32LB_DEFINE

#define PBL_MBOX_SF32LB_DEFINE (   sym,
  _name,
  _base,
  _clk,
  ... 
)
Value:
PBL_DEVICE_INSTANCE(sym, struct pbl_mbox_sf32lb, struct pbl_mbox_controller, ctrl){ \
.ctrl = PBL_MBOX_CONTROLLER_INIT(sym, _name, pbl_mbox_sf32lb_init, nullptr, \
&pbl_mbox_sf32lb_ops, 1U), \
.base = (_base), \
.irqn = PBL_MBOX_SF32LB_FIRST_(__VA_ARGS__ __VA_OPT__(, ) PBL_MBOX_SF32LB_NO_IRQ), \
.clk = _clk, \
}; \
__VA_OPT__(PBL_IRQ_CONNECT_NUM(__VA_ARGS__, CONFIG_MBOX_SF32LB_IRQ_PRIO, \
pbl_mbox_sf32lb_irq_handler, &sym##_inst, 0))
SF32LB mailbox.
Definition sf32lb.h:31
#define PBL_MBOX_SF32LB_NUM_DOORBELLS
Doorbells per block.
Definition sf32lb.h:28
#define PBL_MBOX_SF32LB_NO_IRQ
Interrupt of a block whose interrupt does not reach this CPU.
Definition sf32lb.h:25
void pbl_mbox_sf32lb_irq_handler(const struct pbl_mbox_sf32lb *mbox)
Interrupt handler of a block rung by the remote, connected by PBL_MBOX_SF32LB_DEFINE().
Mailbox controller.
Definition mbox.h:128
#define PBL_MBOX_CONTROLLER_STATE_DEFINE(sym, _num_chans)
Define the state of a controller, for providers.
Definition mbox.h:149
#define PBL_MBOX_CONTROLLER_INIT(sym, _name, _init, _deps, _ops, _txpoll_period_ms)
Initializer of a struct pbl_mbox_controller, for providers.
Definition mbox.h:164
#define PBL_IRQ_CONNECT_NUM(n, prio, isr, arg, flags)
PBL_IRQ_CONNECT() with the line given by number, for generated code.
Definition irq.h:129

Define a mailbox block.

Parameters
symSymbol.
_nameDevice name.
_baseBase address.
_clkClock, or PBL_CLK(nullptr, 0) if not controlled by this CPU.
...Interrupt, if it reaches this CPU.

◆ PBL_MBOX_SF32LB_NO_IRQ

#define PBL_MBOX_SF32LB_NO_IRQ   UINT16_MAX

Interrupt of a block whose interrupt does not reach this CPU.

◆ PBL_MBOX_SF32LB_NUM_DOORBELLS

#define PBL_MBOX_SF32LB_NUM_DOORBELLS   16U

Doorbells per block.

Function Documentation

◆ pbl_mbox_sf32lb_irq_handler()

void pbl_mbox_sf32lb_irq_handler ( const struct pbl_mbox_sf32lb *  mbox)

Interrupt handler of a block rung by the remote, connected by PBL_MBOX_SF32LB_DEFINE().

Parameters
mboxMailbox.