Lines Matching full:ipi
3 * Xilinx Inter Processor Interrupt(IPI) Mailbox Driver
15 #include <linux/mailbox/zynqmp-ipi-message.h>
23 /* IPI agent ID any */
26 /* indicate if ZynqMP IPI mailbox driver uses SMC calls or HVC calls */
30 /* Default IPI SMC function IDs */
39 /* IPI SMC Macros */
49 /* IPI mailbox status */
54 #define IPI_MB_CHNL_TX 0 /* IPI mailbox TX channel */
55 #define IPI_MB_CHNL_RX 1 /* IPI mailbox RX channel */
58 * struct zynqmp_ipi_mchan - Description of a Xilinx ZynqMP IPI mailbox channel
59 * @is_opened: indicate if the IPI channel is opened
78 * struct zynqmp_ipi_mbox - Description of a ZynqMP IPI mailbox
80 * @pdata: pointer to the IPI private data
82 * IPI mailbox
83 * @remote_id: remote IPI agent ID
86 * @irq: IPI agent interrupt ID
97 * struct zynqmp_ipi_pdata - Description of z ZynqMP IPI agent platform data.
100 * IPI agent
101 * @irq: IPI agent interrupt ID
102 * @method: IPI SMC or HVC is going to be used
103 * @local_id: local IPI agent ID
104 * @num_mboxes: number of mailboxes of this IPI agent
105 * @ipi_mboxes: IPI mailboxes of this IPI agent
118 .name = "zynqmp-ipi-mbox",
137 * zynqmp_ipi_interrupt - Interrupt handler for IPI notification
140 * @data: ZynqMP IPI mailbox platform data.
289 /* Kick IPI mailbox to send message */ in zynqmp_ipi_send_data()
310 * zynqmp_ipi_startup - Startup the IPI channel
329 /* If no channel has been opened, open the IPI mailbox */ in zynqmp_ipi_startup()
337 dev_err(dev, "SMC to open the IPI channel failed.\n"); in zynqmp_ipi_startup()
343 /* If it is RX channel, enable the IPI notification interrupt */ in zynqmp_ipi_startup()
354 * zynqmp_ipi_shutdown - Shutdown the IPI channel
376 /* Release IPI mailbox if no other channel is opened */ in zynqmp_ipi_shutdown()
386 /* ZynqMP IPI mailbox operations */
396 * zynqmp_ipi_of_xlate - Translate of phandle to IPI mailbox channel
422 { .compatible = "xlnx,zynqmp-ipi-mailbox" },
428 * zynqmp_ipi_mbox_get_buf_res - Get buffer resource from the IPI dev node
430 * @node: IPI mbox device child node
431 * @name: name of the IPI buffer
453 * zynqmp_ipi_mbox_dev_release() - release the existence of a ipi mbox dev
455 * @dev: the ipi mailbox device
466 * zynqmp_ipi_mbox_probe - probe IPI mailbox resource from device node
468 * @ipi_mbox: pointer to IPI mailbox private data structure
469 * @node: IPI mailbox device node
485 /* Initialize dev for IPI mailbox */ in zynqmp_ipi_mbox_probe()
495 dev_err(dev, "Failed to register ipi mbox dev.\n"); in zynqmp_ipi_mbox_probe()
508 dev_err(mdev, "Unable to map IPI buffer I/O memory\n"); in zynqmp_ipi_mbox_probe()
523 dev_err(mdev, "Unable to map IPI buffer I/O memory\n"); in zynqmp_ipi_mbox_probe()
545 dev_err(mdev, "Unable to map IPI buffer I/O memory\n"); in zynqmp_ipi_mbox_probe()
560 dev_err(mdev, "Unable to map IPI buffer I/O memory\n"); in zynqmp_ipi_mbox_probe()
574 /* Get the IPI remote agent ID */ in zynqmp_ipi_mbox_probe()
575 ret = of_property_read_u32(node, "xlnx,ipi-id", &ipi_mbox->remote_id); in zynqmp_ipi_mbox_probe()
577 dev_err(dev, "No IPI remote ID is specified.\n"); in zynqmp_ipi_mbox_probe()
603 "Registered ZynqMP IPI mbox with TX/RX channels.\n"); in zynqmp_ipi_mbox_probe()
608 * zynqmp_ipi_free_mboxes - Free IPI mailboxes devices
610 * @pdata: IPI private data
642 /* Get the IPI local agents ID */ in zynqmp_ipi_probe()
643 ret = of_property_read_u32(np, "xlnx,ipi-id", &pdata->local_id); in zynqmp_ipi_probe()
645 dev_err(dev, "No IPI local ID is specified.\n"); in zynqmp_ipi_probe()
666 /* IPI IRQ */ in zynqmp_ipi_probe()
702 .name = "zynqmp-ipi",
720 MODULE_DESCRIPTION("Xilinx ZynqMP IPI Mailbox driver");