parent
20374ef157
commit
b2458ad433
@ -0,0 +1,42 @@
|
||||
Index: /trunk/openbios-devel/drivers/pci.c
|
||||
===================================================================
|
||||
--- /trunk/openbios-devel/drivers/pci.c (revision 449)
|
||||
+++ /trunk/openbios-devel/drivers/pci.c (revision 481)
|
||||
@@ -37,5 +37,6 @@
|
||||
/* DECLARE data structures for the nodes. */
|
||||
|
||||
-DECLARE_UNNAMED_NODE( ob_pci_node, INSTALL_OPEN, 2*sizeof(int) );
|
||||
+DECLARE_UNNAMED_NODE( ob_pci_bus_node, INSTALL_OPEN, 2*sizeof(int) );
|
||||
+DECLARE_UNNAMED_NODE( ob_pci_simple_node, INSTALL_OPEN, 2*sizeof(int) );
|
||||
|
||||
const pci_arch_t *arch;
|
||||
@@ -157,5 +158,5 @@
|
||||
}
|
||||
|
||||
-NODE_METHODS(ob_pci_node) = {
|
||||
+NODE_METHODS(ob_pci_bus_node) = {
|
||||
{ NULL, ob_pci_initialize },
|
||||
{ "open", ob_pci_open },
|
||||
@@ -163,4 +164,10 @@
|
||||
{ "decode-unit", ob_pci_decode_unit },
|
||||
{ "encode-unit", ob_pci_encode_unit },
|
||||
+};
|
||||
+
|
||||
+NODE_METHODS(ob_pci_simple_node) = {
|
||||
+ { NULL, ob_pci_initialize },
|
||||
+ { "open", ob_pci_open },
|
||||
+ { "close", ob_pci_close },
|
||||
};
|
||||
|
||||
@@ -738,5 +745,10 @@
|
||||
config.dev = addr & 0x00FFFFFF;
|
||||
|
||||
- REGISTER_NAMED_NODE(ob_pci_node, config.path);
|
||||
+ if (class == PCI_BASE_CLASS_BRIDGE &&
|
||||
+ (subclass == PCI_SUBCLASS_BRIDGE_HOST ||
|
||||
+ subclass == PCI_SUBCLASS_BRIDGE_PCI))
|
||||
+ REGISTER_NAMED_NODE(ob_pci_bus_node, config.path);
|
||||
+ else
|
||||
+ REGISTER_NAMED_NODE(ob_pci_simple_node, config.path);
|
||||
|
||||
activate_device(config.path);
|
Loading…
Reference in new issue