mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
![Abhyuday Godhasara](/assets/img/avatar_default.png)
Xilinx event management driver provides an interface to subscribe or unsubscribe for the event/callback supported by firmware. An agent can use this driver to register for Error Event, Device Event and Suspend callback. This driver only allows one agent per event to do registration. Driver will return an error in case of multiple registration for the same event. This driver gets notification from firmware through TF-A as SGI. During initialization, event manager driver register handler for SGI used for notification. It also provides SGI number info to TF-A by using IOCTL_REGISTER_SGI call to TF-A. After receiving notification from firmware, the driver makes an SMC call to TF-A to get IPI data. From the IPI data provided by TF-A, event manager identified the cause of event and forward that event/callback notification to the respective subscribed driver. After this, in case of Error Event, driver performs unregistration as firmware expecting from agent to do re-registration if the agent wants to get notified on the second occurrence of an error event. Add new IOCTL id IOCTL_REGISTER_SGI = 25 which is used to register SGI on TF-A. Older firmware doesn't have all required support for event handling which is required by the event manager driver. So add check for the register notifier version in the event manager driver. Xilinx event management driver provides support to subscribe for multiple error events with the use of Event Mask in a single call of xlnx_register_event(). Agent driver can provide 'Event' parameter value as ORed of multiple event masks to register single callback for multiple events. For example, to register callback for event=0x1 and event=0x2 for the given node, agent can provide event=0x3 (0x1 | 0x2). It is not possible to register multiple events for different nodes in a single registration call. Also provide support to receive multiple error events as in single notification from firmware and then forward it to subscribed drivers via registered callback one by one. Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Tejas Patel <tejas.patel@xilinx.com> Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com> Link: https://lore.kernel.org/r/20211129070216.30253-2-abhyuday.godhasara@xilinx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
38 lines
1.1 KiB
Text
38 lines
1.1 KiB
Text
# SPDX-License-Identifier: GPL-2.0
|
|
menu "Xilinx SoC drivers"
|
|
|
|
config ZYNQMP_POWER
|
|
bool "Enable Xilinx Zynq MPSoC Power Management driver"
|
|
depends on PM && ZYNQMP_FIRMWARE
|
|
default y
|
|
select MAILBOX
|
|
select ZYNQMP_IPI_MBOX
|
|
help
|
|
Say yes to enable power management support for ZyqnMP SoC.
|
|
This driver uses firmware driver as an interface for power
|
|
management request to firmware. It registers isr to handle
|
|
power management callbacks from firmware. It registers mailbox client
|
|
to handle power management callbacks from firmware.
|
|
|
|
If in doubt, say N.
|
|
|
|
config ZYNQMP_PM_DOMAINS
|
|
bool "Enable Zynq MPSoC generic PM domains"
|
|
default y
|
|
depends on PM && ZYNQMP_FIRMWARE
|
|
select PM_GENERIC_DOMAINS
|
|
help
|
|
Say yes to enable device power management through PM domains
|
|
If in doubt, say N.
|
|
|
|
config XLNX_EVENT_MANAGER
|
|
bool "Enable Xilinx Event Management Driver"
|
|
depends on ZYNQMP_FIRMWARE
|
|
default ZYNQMP_FIRMWARE
|
|
help
|
|
Say yes to enable event management support for Xilinx.
|
|
This driver uses firmware driver as an interface for event/power
|
|
management request to firmware.
|
|
|
|
If in doubt, say N.
|
|
endmenu
|