[OpenBIOS] [PATCH 07/16] pci: Modify PCI display devices so that open and close words are not created automatically during initialisation.

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Sun Mar 10 17:50:37 CET 2013


This is because the work needs to be done by the "is-install" word as per the
IEEE1275 specification.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
 openbios-devel/drivers/pci.c |    8 ++++++++
 openbios-devel/drivers/pci.h |    1 +
 2 files changed, 9 insertions(+)

diff --git a/openbios-devel/drivers/pci.c b/openbios-devel/drivers/pci.c
index d6c5e51..009b974 100644
--- a/openbios-devel/drivers/pci.c
+++ b/openbios-devel/drivers/pci.c
@@ -44,6 +44,7 @@
 
 DECLARE_UNNAMED_NODE( ob_pci_bus_node, INSTALL_OPEN, 2*sizeof(int) );
 DECLARE_UNNAMED_NODE( ob_pci_simple_node, INSTALL_OPEN, 2*sizeof(int) );
+DECLARE_UNNAMED_NODE( ob_pci_empty_node, 0, 2*sizeof(int) );
 
 const pci_arch_t *arch;
 
@@ -342,6 +343,10 @@ NODE_METHODS(ob_pci_simple_node) = {
 	{ "close",		ob_pci_close		},
 };
 
+NODE_METHODS(ob_pci_empty_node) = {
+	{ NULL,			ob_pci_initialize	}
+};
+
 static void pci_set_bus_range(const pci_config_t *config)
 {
 	phandle_t dev = find_dev(config->path);
@@ -1230,6 +1235,9 @@ static void ob_configure_pci_device(const char* parent_path,
             REGISTER_NAMED_NODE_PHANDLE(ob_pci_bus_node, config.path, phandle);
         }
         break;
+    case PCI_CLASS_DISPLAY:
+	REGISTER_NAMED_NODE_PHANDLE(ob_pci_empty_node, config.path, phandle);
+	break;
     default:
         REGISTER_NAMED_NODE_PHANDLE(ob_pci_simple_node, config.path, phandle);
         break;
diff --git a/openbios-devel/drivers/pci.h b/openbios-devel/drivers/pci.h
index 0f6ae1f..ab8f184 100644
--- a/openbios-devel/drivers/pci.h
+++ b/openbios-devel/drivers/pci.h
@@ -27,6 +27,7 @@
 
 
 #define PCI_REVISION_ID 	0x08    /* Revision ID */
+#define PCI_CLASS_DISPLAY	0x03
 #define PCI_CLASS_PROG		0x09
 #define PCI_CLASS_DEVICE	0x0a
 #define PCI_CACHE_LINE_SIZE     0x0c    /* 8 bits */
-- 
1.7.10.4




More information about the OpenBIOS mailing list