[OpenBIOS] [PATCH 5/8] pci: implement ob_pci_bridge_map_in() for PCI-PCI bridge nodes
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Sun Jun 11 12:00:34 CEST 2017
As indicated by the IEEE-1275 PCI bindings, PCI-PCI bridges should call
call the map-in method of the parent.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
drivers/pci.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/pci.c b/drivers/pci.c
index 07eca8a..e203aa4 100644
--- a/drivers/pci.c
+++ b/drivers/pci.c
@@ -401,13 +401,22 @@ NODE_METHODS(ob_pci_bus_node) = {
{ "pci-map-in", ob_pci_bus_map_in },
};
+/* ( pci-addr.lo pci-addr.mid pci-addr.hi size -- virt ) */
+
+static void
+ob_pci_bridge_map_in(int *idx)
+{
+ /* As per the IEEE-1275 PCI specification, chain up to the parent */
+ call_parent_method("pci-map-in");
+}
+
NODE_METHODS(ob_pci_bridge_node) = {
{ NULL, ob_pci_initialize },
{ "open", ob_pci_open },
{ "close", ob_pci_close },
{ "decode-unit", ob_pci_decode_unit },
{ "encode-unit", ob_pci_encode_unit },
- { "pci-map-in", ob_pci_bus_map_in },
+ { "pci-map-in", ob_pci_bridge_map_in },
};
NODE_METHODS(ob_pci_simple_node) = {
--
1.7.10.4
More information about the OpenBIOS
mailing list