[RFC PATCH v4 32/38] NTB: epf: Add an additional memory window (MW2) barno mapping on Renesas R-Car

Koichiro Den
2026-01-18T13:55:55Z

To enable remote eDMA mode on NTB transport, one additional memory
window is required. Since a single BAR can now be split into multiple
memory windows, add MW2 to BAR2 on R-Car.

For pci_epf_vntb configfs settings, users who want to use MW2 (e.g. to
enable remote eDMA mode for NTB transport as mentioned above) may
configure as follows:

$ echo 2 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/num_mws
$ echo 0xE0000 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw1
$ echo 0x20000 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw2
$ echo 0xE0000 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw2_offset
$ echo 2 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw1_bar
$ echo 2 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw2_bar

Signed-off-by: Koichiro Den <den@valinux.co.jp>
---
drivers/ntb/hw/epf/ntb_hw_epf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ntb/hw/epf/ntb_hw_epf.c b/drivers/ntb/hw/epf/ntb_hw_epf.c
index 2cefe46d2520..007c93e34398 100644
--- a/drivers/ntb/hw/epf/ntb_hw_epf.c
+++ b/drivers/ntb/hw/epf/ntb_hw_epf.c
@@ -843,7 +843,7 @@ static const enum pci_barno rcar_barno[NTB_BAR_NUM] = {
[BAR_PEER_SPAD] = BAR_0,
[BAR_DB] = BAR_4,
[BAR_MW1] = BAR_2,
- [BAR_MW2] = NO_BAR,
+ [BAR_MW2] = BAR_2,
[BAR_MW3] = NO_BAR,
[BAR_MW4] = NO_BAR,
};
--
2.51.0