Lines Matching full:mhuv2
3 * ARM Message Handling Unit Version 2 (MHUv2) driver.
8 * An MHUv2 mailbox controller can provide up to 124 channel windows (each 32
16 * device tree bindings of the ARM MHUv2 controller for more details.
22 * The MHUv2 controller can work both as a sender and receiver, but the driver
36 /* ====== MHUv2 Registers ====== */
46 #define MHUV2_PROTOCOL_PROP "arm,mhuv2-protocols"
147 /* ====== MHUv2 data structures ====== */
160 * struct mhuv2 - MHUv2 mailbox controller data
174 struct mhuv2 { struct
190 #define mhu_from_mbox(_mbox) container_of(_mbox, struct mhuv2, mbox) argument
193 * struct mhuv2_protocol_ops - MHUv2 operations
207 int (*rx_startup)(struct mhuv2 *mhu, struct mbox_chan *chan);
208 void (*rx_shutdown)(struct mhuv2 *mhu, struct mbox_chan *chan);
209 void *(*read_data)(struct mhuv2 *mhu, struct mbox_chan *chan);
211 void (*tx_startup)(struct mhuv2 *mhu, struct mbox_chan *chan);
212 void (*tx_shutdown)(struct mhuv2 *mhu, struct mbox_chan *chan);
213 int (*last_tx_done)(struct mhuv2 *mhu, struct mbox_chan *chan);
214 int (*send_data)(struct mhuv2 *mhu, struct mbox_chan *chan, void *arg);
218 * MHUv2 mailbox channel's private information
261 static int mhuv2_doorbell_rx_startup(struct mhuv2 *mhu, struct mbox_chan *chan) in mhuv2_doorbell_rx_startup()
270 static void mhuv2_doorbell_rx_shutdown(struct mhuv2 *mhu, in mhuv2_doorbell_rx_shutdown()
279 static void *mhuv2_doorbell_read_data(struct mhuv2 *mhu, struct mbox_chan *chan) in mhuv2_doorbell_read_data()
288 static int mhuv2_doorbell_last_tx_done(struct mhuv2 *mhu, in mhuv2_doorbell_last_tx_done()
297 static int mhuv2_doorbell_send_data(struct mhuv2 *mhu, struct mbox_chan *chan, in mhuv2_doorbell_send_data()
325 static int mhuv2_data_transfer_rx_startup(struct mhuv2 *mhu, in mhuv2_data_transfer_rx_startup()
339 static void mhuv2_data_transfer_rx_shutdown(struct mhuv2 *mhu, in mhuv2_data_transfer_rx_shutdown()
348 static void *mhuv2_data_transfer_read_data(struct mhuv2 *mhu, in mhuv2_data_transfer_read_data()
385 static void mhuv2_data_transfer_tx_startup(struct mhuv2 *mhu, in mhuv2_data_transfer_tx_startup()
398 static void mhuv2_data_transfer_tx_shutdown(struct mhuv2 *mhu, in mhuv2_data_transfer_tx_shutdown()
408 static int mhuv2_data_transfer_last_tx_done(struct mhuv2 *mhu, in mhuv2_data_transfer_last_tx_done()
445 static int mhuv2_data_transfer_send_data(struct mhuv2 *mhu, in mhuv2_data_transfer_send_data()
500 static struct mbox_chan *get_irq_chan_comb(struct mhuv2 *mhu, u32 __iomem *reg) in get_irq_chan_comb()
540 struct mhuv2 *mhu = data; in mhuv2_sender_interrupt()
621 static struct mbox_chan *get_irq_chan_comb_rx(struct mhuv2 *mhu) in get_irq_chan_comb_rx()
645 static struct mbox_chan *get_irq_chan_stat_rx(struct mhuv2 *mhu) in get_irq_chan_stat_rx()
668 static struct mbox_chan *get_irq_chan_rx(struct mhuv2 *mhu) in get_irq_chan_rx()
678 struct mhuv2 *mhu = arg; in mhuv2_receiver_interrupt()
713 struct mhuv2 *mhu = mhu_from_mbox(chan->mbox); in mhuv2_sender_last_tx_done()
721 struct mhuv2 *mhu = mhu_from_mbox(chan->mbox); in mhuv2_sender_send_data()
732 struct mhuv2 *mhu = mhu_from_mbox(chan->mbox); in mhuv2_sender_startup()
742 struct mhuv2 *mhu = mhu_from_mbox(chan->mbox); in mhuv2_sender_shutdown()
758 struct mhuv2 *mhu = mhu_from_mbox(chan->mbox); in mhuv2_receiver_startup()
766 struct mhuv2 *mhu = mhu_from_mbox(chan->mbox); in mhuv2_receiver_shutdown()
795 struct mhuv2 *mhu = mhu_from_mbox(mbox); in mhuv2_mbox_of_xlate()
836 static int mhuv2_verify_protocol(struct mhuv2 *mhu) in mhuv2_verify_protocol()
872 static int mhuv2_allocate_channels(struct mhuv2 *mhu) in mhuv2_allocate_channels()
931 static int mhuv2_parse_channels(struct mhuv2 *mhu) in mhuv2_parse_channels()
966 static int mhuv2_tx_init(struct amba_device *adev, struct mhuv2 *mhu, in mhuv2_tx_init()
988 IRQF_ONESHOT, "mhuv2-tx", mhu); in mhuv2_tx_init()
1020 static int mhuv2_rx_init(struct amba_device *adev, struct mhuv2 *mhu, in mhuv2_rx_init()
1041 "mhuv2-rx", mhu); in mhuv2_rx_init()
1061 struct mhuv2 *mhu; in mhuv2_probe()
1076 if (of_device_is_compatible(np, "arm,mhuv2-tx")) in mhuv2_probe()
1078 else if (of_device_is_compatible(np, "arm,mhuv2-rx")) in mhuv2_probe()
1097 dev_err(dev, "failed to register ARM MHUv2 driver %d\n", ret); in mhuv2_probe()
1104 struct mhuv2 *mhu = amba_get_drvdata(adev); in mhuv2_remove()
1127 .name = "arm-mhuv2",
1136 MODULE_DESCRIPTION("ARM MHUv2 Driver");