diff options
| author | Frank Li <[email protected]> | 2025-07-10 19:13:52 +0000 |
|---|---|---|
| committer | Bjorn Helgaas <[email protected]> | 2025-07-24 21:51:43 +0000 |
| commit | eff0c286aa916221a69126a43eee7c218d6f4011 (patch) | |
| tree | e024f5b08712dec8bb14d15431dd96fb37b32097 /drivers/pci/controller/dwc | |
| parent | PCI: endpoint: Add pci_epf_align_inbound_addr() helper for inbound address al... (diff) | |
| download | kernel-eff0c286aa916221a69126a43eee7c218d6f4011.tar.gz kernel-eff0c286aa916221a69126a43eee7c218d6f4011.zip | |
PCI: endpoint: pci-epf-test: Add doorbell test support
Add doorbell support by allocating a dedicated BAR using the
pci_epf_alloc_doorbell() API and mapping the Endpoint MSI controller
message data address to it. The data to be written in the message address
is stored in the 'pci_epf_test_reg::doorbell_data' register. Finally, the
RC can trigger doorbell in the Endpoint by writing the content of
'doorbell_data' register to the offset specified in 'doorbell_offset' of
the 'doorbell_bar' BAR.
Triggering of the doorbell is detected by pci_epf_test_doorbell_handler(),
which is bound to the doorbell IRQ. On successful completion,
STATUS_DOORBELL_SUCCESS status is set in the above mentioned handler.
To avoid breaking compatibility between host and endpoint, add two new
commands: COMMAND_ENABLE_DOORBELL and COMMAND_DISABLE_DOORBELL.
The doorbell is allocated when COMMAND_ENABLE_DOORBELL command is called
and destroyed when COMMAND_DISABLE_DOORBELL is called.
This doorbell feature only works when both RC and EP drivers support it.
If one of them doesn't support the feature, the testcase will fail.
Signed-off-by: Frank Li <[email protected]>
[mani: code cleanups and reworded commit message]
Signed-off-by: Manivannan Sadhasivam <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Tested-by: Niklas Cassel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'drivers/pci/controller/dwc')
0 files changed, 0 insertions, 0 deletions
