Lines Matching full:ipi
3 * Xilinx Inter Processor Interrupt(IPI) Mailbox Driver
17 #include <linux/mailbox/zynqmp-ipi-message.h>
24 /* IPI agent ID any */
27 /* indicate if ZynqMP IPI mailbox driver uses SMC calls or HVC calls */
31 /* Default IPI SMC function IDs */
40 /* IPI SMC Macros */
50 /* IPI mailbox status */
55 #define IPI_MB_CHNL_TX 0 /* IPI mailbox TX channel */
56 #define IPI_MB_CHNL_RX 1 /* IPI mailbox RX channel */
58 /* IPI Message Buffer Information */
75 * struct zynqmp_ipi_mchan - Description of a Xilinx ZynqMP IPI mailbox channel
76 * @is_opened: indicate if the IPI channel is opened
99 * struct zynqmp_ipi_mbox - Description of a ZynqMP IPI mailbox
101 * @pdata: pointer to the IPI private data
103 * IPI mailbox
104 * @remote_id: remote IPI agent ID
107 * @setup_ipi_fn: Function Pointer to set up IPI Channels
119 * struct zynqmp_ipi_pdata - Description of z ZynqMP IPI agent platform data.
122 * IPI agent
123 * @irq: IPI agent interrupt ID
124 * @method: IPI SMC or HVC is going to be used
125 * @local_id: local IPI agent ID
127 * @num_mboxes: number of mailboxes of this IPI agent
128 * @ipi_mboxes: IPI mailboxes of this IPI agent
144 .name = "zynqmp-ipi-mbox",
163 * zynqmp_ipi_interrupt - Interrupt handler for IPI notification
166 * @data: ZynqMP IPI mailbox platform data.
325 /* Kick IPI mailbox to send message */ in zynqmp_ipi_send_data()
346 * zynqmp_ipi_startup - Startup the IPI channel
365 /* If no channel has been opened, open the IPI mailbox */ in zynqmp_ipi_startup()
373 dev_err(dev, "SMC to open the IPI channel failed.\n"); in zynqmp_ipi_startup()
379 /* If it is RX channel, enable the IPI notification interrupt */ in zynqmp_ipi_startup()
390 * zynqmp_ipi_shutdown - Shutdown the IPI channel
412 /* Release IPI mailbox if no other channel is opened */ in zynqmp_ipi_shutdown()
422 /* ZynqMP IPI mailbox operations */
432 * zynqmp_ipi_of_xlate - Translate of phandle to IPI mailbox channel
458 * zynqmp_ipi_mbox_get_buf_res - Get buffer resource from the IPI dev node
460 * @node: IPI mbox device child node
461 * @name: name of the IPI buffer
483 * zynqmp_ipi_mbox_dev_release() - release the existence of a ipi mbox dev
485 * @dev: the ipi mailbox device
496 * zynqmp_ipi_mbox_probe - probe IPI mailbox resource from device node
498 * @ipi_mbox: pointer to IPI mailbox private data structure
499 * @node: IPI mailbox device node
512 /* Initialize dev for IPI mailbox */ in zynqmp_ipi_mbox_probe()
522 dev_err(dev, "Failed to register ipi mbox dev.\n"); in zynqmp_ipi_mbox_probe()
528 /* Get the IPI remote agent ID */ in zynqmp_ipi_mbox_probe()
529 ret = of_property_read_u32(node, "xlnx,ipi-id", &ipi_mbox->remote_id); in zynqmp_ipi_mbox_probe()
531 dev_err(dev, "No IPI remote ID is specified.\n"); in zynqmp_ipi_mbox_probe()
537 dev_err(dev, "Failed to set up IPI Buffers.\n"); in zynqmp_ipi_mbox_probe()
563 "Registered ZynqMP IPI mbox with TX/RX channels.\n"); in zynqmp_ipi_mbox_probe()
568 * zynqmp_ipi_setup - set up IPI Buffers for classic flow
570 * @ipi_mbox: pointer to IPI mailbox private data structure
571 * @node: IPI mailbox device node
573 * This will be used to set up IPI Buffers for ZynqMP SOC if user
580 * This will be invoked with compatible string "xlnx,zynqmp-ipi-mailbox".
603 dev_err(mdev, "Unable to map IPI buffer I/O memory\n"); in zynqmp_ipi_setup()
618 dev_err(mdev, "Unable to map IPI buffer I/O memory\n"); in zynqmp_ipi_setup()
640 dev_err(mdev, "Unable to map IPI buffer I/O memory\n"); in zynqmp_ipi_setup()
655 dev_err(mdev, "Unable to map IPI buffer I/O memory\n"); in zynqmp_ipi_setup()
676 * @ipi_mbox: pointer to IPI mailbox private data structure
677 * @node: IPI mailbox device node
700 * This is because each buffered IPI's corresponding msg buffers in versal_ipi_setup()
701 * are reserved for use by other buffered IPI's. in versal_ipi_setup()
715 /* Validate that IPI IDs is within IPI Message buffer space. */ in versal_ipi_setup()
718 "Invalid IPI Message buffer values: %x %x\n", in versal_ipi_setup()
727 dev_err(mdev, "Unable to map IPI buffer I/O memory\n"); in versal_ipi_setup()
735 dev_err(mdev, "Unable to map IPI buffer I/O memory\n"); in versal_ipi_setup()
743 dev_err(mdev, "Unable to map IPI buffer I/O memory\n"); in versal_ipi_setup()
751 dev_err(mdev, "Unable to map IPI buffer I/O memory\n"); in versal_ipi_setup()
881 * zynqmp_ipi_free_mboxes - Free IPI mailboxes devices
883 * @pdata: IPI private data
926 /* Get the IPI local agents ID */ in zynqmp_ipi_probe()
927 ret = of_property_read_u32(np, "xlnx,ipi-id", &pdata->local_id); in zynqmp_ipi_probe()
929 dev_err(dev, "No IPI local ID is specified.\n"); in zynqmp_ipi_probe()
936 "Mbox Compatible String is missing IPI Setup fn.\n"); in zynqmp_ipi_probe()
966 * IPI system IRQ. in zynqmp_ipi_probe()
1006 { .compatible = "xlnx,zynqmp-ipi-mailbox",
1009 { .compatible = "xlnx,versal-ipi-mailbox",
1020 .name = "zynqmp-ipi",
1038 MODULE_DESCRIPTION("Xilinx ZynqMP IPI Mailbox driver");