Author: blueswirl Date: 2009-03-22 17:49:34 +0100 (Sun, 22 Mar 2009) New Revision: 481
Modified: trunk/openbios-devel/drivers/pci.c Log: Fix PPC nographic mode
Modified: trunk/openbios-devel/drivers/pci.c =================================================================== --- trunk/openbios-devel/drivers/pci.c 2009-03-19 17:51:02 UTC (rev 480) +++ trunk/openbios-devel/drivers/pci.c 2009-03-22 16:49:34 UTC (rev 481) @@ -36,7 +36,8 @@
/* 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;
@@ -156,7 +157,7 @@ push_str(buf); }
-NODE_METHODS(ob_pci_node) = { +NODE_METHODS(ob_pci_bus_node) = { { NULL, ob_pci_initialize }, { "open", ob_pci_open }, { "close", ob_pci_close }, @@ -164,6 +165,12 @@ { "encode-unit", ob_pci_encode_unit }, };
+NODE_METHODS(ob_pci_simple_node) = { + { NULL, ob_pci_initialize }, + { "open", ob_pci_open }, + { "close", ob_pci_close }, +}; + static void pci_set_bus_range(const pci_config_t *config) { phandle_t dev = get_cur_dev(); @@ -737,7 +744,12 @@ #endif 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);