[OpenBIOS] [PATCH 3/8] pci: create new ob_pci_bridge_node based upon ob_pci_bus_node
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Sun Jun 11 12:00:32 CEST 2017
These two types of node will need to have slightly differing behaviours moving
forwards.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
drivers/pci.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/pci.c b/drivers/pci.c
index 2a59a75..a442695 100644
--- a/drivers/pci.c
+++ b/drivers/pci.c
@@ -49,6 +49,7 @@
/* DECLARE data structures for the nodes. */
DECLARE_UNNAMED_NODE( ob_pci_bus_node, INSTALL_OPEN, 2*sizeof(int) );
+DECLARE_UNNAMED_NODE( ob_pci_bridge_node, INSTALL_OPEN, 2*sizeof(int) );
DECLARE_UNNAMED_NODE( ob_pci_simple_node, 0, 2*sizeof(int) );
DECLARE_UNNAMED_NODE( ob_pci_empty_node, 0, 2*sizeof(int) );
@@ -400,6 +401,15 @@ NODE_METHODS(ob_pci_bus_node) = {
{ "pci-map-in", ob_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_map_in },
+};
+
NODE_METHODS(ob_pci_simple_node) = {
{ "open", ob_pci_open },
{ "close", ob_pci_close },
@@ -1405,7 +1415,7 @@ static void ob_configure_pci_device(const char* parent_path,
switch (class) {
case PCI_BASE_CLASS_BRIDGE:
if (subclass != PCI_SUBCLASS_BRIDGE_HOST) {
- REGISTER_NAMED_NODE_PHANDLE(ob_pci_bus_node, config.path, phandle);
+ REGISTER_NAMED_NODE_PHANDLE(ob_pci_bridge_node, config.path, phandle);
}
break;
default:
--
1.7.10.4
More information about the OpenBIOS
mailing list