[PATCH 0/4] PCI: endpoint: pci-epf-vntb: allow arbitrary BAR mapping

Jerome Brunet posted 4 patches 9 months, 1 week ago
There is a newer version of this series
drivers/ntb/hw/epf/ntb_hw_epf.c               | 108 ++++++++++----------
drivers/pci/endpoint/functions/pci-epf-vntb.c | 138 +++++++++++++++++++++++---
2 files changed, 181 insertions(+), 65 deletions(-)
[PATCH 0/4] PCI: endpoint: pci-epf-vntb: allow arbitrary BAR mapping
Posted by Jerome Brunet 9 months, 1 week ago
The patchset allows arbitrary BAR mapping for vNTB PCI endpoint function.

This was developed for the Renesas platform with requires a mapping that
was not possible before:
* BAR0 (1MB):  CTRL+SPAD
* BAR2 (1MB):  MW0
* BAR4 (256B): Doorbell

It is possible to setup the host side driver with mapping above without any
functional change but it makes to also arbitrary mapping there.

The patchset should not change anything for existing users.

Possible next steps:
- Align the NTB endpoint function: I'd be happy to propose something there
  but I would only be able to compile test it since I do not have the HW
  to test it.
- Expose BAR configuration in the CTRL registers: I've been doodling with
  the idea to add a few extra registers in the CTRL region to describe
  the BAR mapping of the other regions. That way, there would less chance
  for the 2 sides to become mis-aligned. I'm not certain it makes sense and
  would welcome others opinion on this :)

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
Jerome Brunet (4):
      PCI: endpoint: pci-epf-vntb: return an error code on bar init
      PCI: endpoint: pci-epf-vntb: align mw naming with config names
      PCI: endpoint: pci-epf-vntb: allow arbitrary BAR configuration
      NTB: epf: Allow arbitrary BAR mapping

 drivers/ntb/hw/epf/ntb_hw_epf.c               | 108 ++++++++++----------
 drivers/pci/endpoint/functions/pci-epf-vntb.c | 138 +++++++++++++++++++++++---
 2 files changed, 181 insertions(+), 65 deletions(-)
---
base-commit: 1fa7eab22df331bcc7942a9c0b4569bebc11593b
change-id: 20250505-pci-vntb-bar-mapping-3cc3ff624e76

Best regards,
-- 
Jerome