Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jun 2005 00:32:43 GMT
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 77947 for review
Message-ID:  <200506040032.j540WhDE095518@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=77947

Change 77947 by marcel@marcel_nfs on 2005/06/04 00:31:52

	o  Also match the i815 GMCH
	o  Allocate the resources

Affected files ...

.. //depot/projects/tty/sys/dev/vtc/hw/gmch/gmch.h#3 edit
.. //depot/projects/tty/sys/dev/vtc/hw/gmch/gmch_bus_pci.c#3 edit

Differences ...

==== //depot/projects/tty/sys/dev/vtc/hw/gmch/gmch.h#3 (text+ko) ====

@@ -35,6 +35,12 @@
 {
 	device_t	gmch_dev;
 	dev_t		gmch_node;
+
+	bus_space_handle_t gmch_fb_bsh;
+	bus_space_tag_t	gmch_fb_bst;
+
+	bus_space_handle_t gmch_reg_bsh;
+	bus_space_tag_t	gmch_reg_bst;
 };
 
 extern devclass_t gmch_devclass;

==== //depot/projects/tty/sys/dev/vtc/hw/gmch/gmch_bus_pci.c#3 (text+ko) ====

@@ -42,6 +42,7 @@
 #include <dev/vtc/hw/gmch/gmch.h>
 
 #define	PCI_VENDOR_INTEL	0x8086
+#define	PCI_DEVICE_I815		0x1132
 #define	PCI_DEVICE_I830M	0x3577
 
 static int gmch_pci_attach(device_t dev);
@@ -63,7 +64,26 @@
 static int
 gmch_pci_attach(device_t dev)
 {
+	struct gmch_softc *sc;
+	struct resource *res;
+	int rid;
+
+	sc = device_get_softc(dev);
 
+	rid = 0x10;
+	res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
+	if (res == NULL)
+		return (ENXIO);
+	sc->gmch_fb_bsh = rman_get_bushandle(res);
+	sc->gmch_fb_bst = rman_get_bustag(res);
+
+	rid = 0x14;
+	res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
+	if (res == NULL)
+		return (ENXIO);
+	sc->gmch_reg_bsh = rman_get_bushandle(res);
+	sc->gmch_reg_bst = rman_get_bustag(res);
+
 	return (gmch_attach(dev));
 }
 
@@ -77,6 +97,9 @@
 		return (ENXIO);
 
 	switch (pci_get_device(dev)) {
+	case PCI_DEVICE_I815:
+		device_set_desc(dev, "82815/EM/EP/P Internal GUI Accelerator");
+		break;
 	case PCI_DEVICE_I830M:
 		device_set_desc(dev, "82830M/MG Integrated Graphics Device");
 		break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506040032.j540WhDE095518>