Lines Matching full:mhuv3
3 * ARM Message Handling Unit Version 3 (MHUv3) driver.
25 /* ====== MHUv3 Registers ====== */
224 /* ====== MHUv3 data structures ====== */
249 struct mhuv3;
252 * struct mhuv3_protocol_ops - MHUv3 operations
268 int (*rx_startup)(struct mhuv3 *mhu, struct mbox_chan *chan);
269 void (*rx_shutdown)(struct mhuv3 *mhu, struct mbox_chan *chan);
270 void *(*read_data)(struct mhuv3 *mhu, struct mbox_chan *chan);
271 void (*rx_complete)(struct mhuv3 *mhu, struct mbox_chan *chan);
272 void (*tx_startup)(struct mhuv3 *mhu, struct mbox_chan *chan);
273 void (*tx_shutdown)(struct mhuv3 *mhu, struct mbox_chan *chan);
274 int (*last_tx_done)(struct mhuv3 *mhu, struct mbox_chan *chan);
275 int (*send_data)(struct mhuv3 *mhu, struct mbox_chan *chan, void *arg);
279 * struct mhuv3_mbox_chan_priv - MHUv3 channel private information
295 * struct mhuv3_extension - MHUv3 extension descriptor
314 struct mbox_chan *(*mbox_of_xlate)(struct mhuv3 *mhu,
317 void (*combined_irq_setup)(struct mhuv3 *mhu);
318 int (*channels_init)(struct mhuv3 *mhu);
319 struct mbox_chan *(*chan_from_comb_irq_get)(struct mhuv3 *mhu);
326 * struct mhuv3 - MHUv3 mailbox controller data
330 * @major: MHUv3 controller architectural major version.
331 * @minor: MHUv3 controller architectural minor version.
332 * @implem: MHUv3 controller IIDR implementer.
333 * @rev: MHUv3 controller IIDR revision.
334 * @var: MHUv3 controller IIDR variant.
335 * @prod_id: MHUv3 controller IIDR product_id.
338 * @ctrl: A reference to the MHUv3 control page for this block.
344 struct mhuv3 { struct
364 #define mhu_from_mbox(_mbox) container_of(_mbox, struct mhuv3, mbox) argument
366 typedef int (*mhuv3_extension_initializer)(struct mhuv3 *mhu);
370 static void mhuv3_doorbell_tx_startup(struct mhuv3 *mhu, struct mbox_chan *chan) in mhuv3_doorbell_tx_startup()
378 static void mhuv3_doorbell_tx_shutdown(struct mhuv3 *mhu, struct mbox_chan *chan) in mhuv3_doorbell_tx_shutdown()
394 static int mhuv3_doorbell_rx_startup(struct mhuv3 *mhu, struct mbox_chan *chan) in mhuv3_doorbell_rx_startup()
404 static void mhuv3_doorbell_rx_shutdown(struct mhuv3 *mhu, in mhuv3_doorbell_rx_shutdown()
413 static void mhuv3_doorbell_rx_complete(struct mhuv3 *mhu, struct mbox_chan *chan) in mhuv3_doorbell_rx_complete()
421 static int mhuv3_doorbell_last_tx_done(struct mhuv3 *mhu, in mhuv3_doorbell_last_tx_done()
442 static int mhuv3_doorbell_send_data(struct mhuv3 *mhu, struct mbox_chan *chan, in mhuv3_doorbell_send_data()
475 struct mhuv3 *mhu = mhu_from_mbox(chan->mbox); in mhuv3_sender_last_tx_done()
483 struct mhuv3 *mhu = mhu_from_mbox(chan->mbox); in mhuv3_sender_send_data()
494 struct mhuv3 *mhu = mhu_from_mbox(chan->mbox); in mhuv3_sender_startup()
505 struct mhuv3 *mhu = mhu_from_mbox(chan->mbox); in mhuv3_sender_shutdown()
521 struct mhuv3 *mhu = mhu_from_mbox(chan->mbox); in mhuv3_receiver_startup()
529 struct mhuv3 *mhu = mhu_from_mbox(chan->mbox); in mhuv3_receiver_shutdown()
537 "Trying to transmit on a MBX MHUv3 frame\n"); in mhuv3_receiver_send_data()
543 dev_err(chan->mbox->dev, "Trying to Tx poll on a MBX MHUv3 frame\n"); in mhuv3_receiver_last_tx_done()
554 static struct mbox_chan *mhuv3_dbe_mbox_of_xlate(struct mhuv3 *mhu, in mhuv3_dbe_mbox_of_xlate()
571 static void mhuv3_dbe_combined_irq_setup(struct mhuv3 *mhu) in mhuv3_dbe_combined_irq_setup()
595 static int mhuv3_dbe_channels_init(struct mhuv3 *mhu) in mhuv3_dbe_channels_init()
626 static bool mhuv3_dbe_doorbell_lookup(struct mhuv3 *mhu, unsigned int channel, in mhuv3_dbe_doorbell_lookup()
673 static struct mbox_chan *mhuv3_dbe_chan_from_comb_irq_get(struct mhuv3 *mhu) in mhuv3_dbe_chan_from_comb_irq_get()
706 static int mhuv3_dbe_init(struct mhuv3 *mhu) in mhuv3_dbe_init()
738 static int mhuv3_fce_init(struct mhuv3 *mhu) in mhuv3_fce_init()
751 static int mhuv3_fe_init(struct mhuv3 *mhu) in mhuv3_fe_init()
770 static int mhuv3_initialize_channels(struct device *dev, struct mhuv3 *mhu) in mhuv3_initialize_channels()
791 struct mhuv3 *mhu = mhu_from_mbox(mbox); in mhuv3_mbox_of_xlate()
809 struct mhuv3 *mhu = data; in mhu_frame_cleanup_actions()
814 static int mhuv3_frame_init(struct mhuv3 *mhu, void __iomem *regs) in mhuv3_frame_init()
877 struct mhuv3 *mhu = arg; in mhuv3_pbx_comb_interrupt()
915 struct mhuv3 *mhu = arg; in mhuv3_mbx_comb_interrupt()
972 static int mhuv3_setup_pbx(struct mhuv3 *mhu) in mhuv3_setup_pbx()
983 IRQF_ONESHOT, "mhuv3-pbx", mhu); in mhuv3_setup_pbx()
995 dev_dbg(dev, "MHUv3 PBX IRQs initialized.\n"); in mhuv3_setup_pbx()
1008 static int mhuv3_setup_mbx(struct mhuv3 *mhu) in mhuv3_setup_mbx()
1021 "mhuv3-mbx", mhu); in mhuv3_setup_mbx()
1029 dev_dbg(dev, "MHUv3 MBX IRQs initialized.\n"); in mhuv3_setup_mbx()
1034 static int mhuv3_irqs_init(struct mhuv3 *mhu, struct platform_device *pdev) in mhuv3_irqs_init()
1053 struct mhuv3 *mhu; in mhuv3_probe()
1081 "Failed to register ARM MHUv3 driver\n"); in mhuv3_probe()
1087 { .compatible = "arm,mhuv3", .data = NULL },
1094 .name = "arm-mhuv3-mailbox",
1102 MODULE_DESCRIPTION("ARM MHUv3 Driver");