svn commit: r205723 - in head/sys/ia64: ia64 include

Marcel Moolenaar marcel at FreeBSD.org
Sat Mar 27 03:15:34 UTC 2010


Author: marcel
Date: Sat Mar 27 03:15:34 2010
New Revision: 205723
URL: http://svn.freebsd.org/changeset/base/205723

Log:
  Remove nx_pcibus from the nexus resource. Nexus is not involved
  with PCI busses. Remove nexus_read_ivar() and nexus_write_ivar()
  to give default behaviour. Remove <machine/nexusvar.h> as well,
  because there's nothing in it that's being used.

Deleted:
  head/sys/ia64/include/nexusvar.h
Modified:
  head/sys/ia64/ia64/nexus.c

Modified: head/sys/ia64/ia64/nexus.c
==============================================================================
--- head/sys/ia64/ia64/nexus.c	Sat Mar 27 02:42:35 2010	(r205722)
+++ head/sys/ia64/ia64/nexus.c	Sat Mar 27 03:15:34 2010	(r205723)
@@ -56,7 +56,6 @@
 
 #include <machine/efi.h>
 #include <machine/intr.h>
-#include <machine/nexusvar.h>
 #include <machine/pmap.h>
 #include <machine/resource.h>
 #include <machine/vmparam.h>
@@ -73,7 +72,6 @@
 static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device");
 struct nexus_device {
 	struct resource_list	nx_resources;
-	int			nx_pcibus;
 };
 
 #define DEVTONX(dev)	((struct nexus_device *)device_get_ivars(dev))
@@ -87,8 +85,6 @@ static device_t nexus_add_child(device_t
 				int unit);
 static	struct resource *nexus_alloc_resource(device_t, device_t, int, int *,
 					      u_long, u_long, u_long, u_int);
-static	int nexus_read_ivar(device_t, device_t, int, uintptr_t *);
-static	int nexus_write_ivar(device_t, device_t, int, uintptr_t);
 static	int nexus_activate_resource(device_t, device_t, int, int,
 				    struct resource *);
 static	int nexus_deactivate_resource(device_t, device_t, int, int,
@@ -123,8 +119,6 @@ static device_method_t nexus_methods[] =
 	/* Bus interface */
 	DEVMETHOD(bus_print_child,	nexus_print_child),
 	DEVMETHOD(bus_add_child,	nexus_add_child),
-	DEVMETHOD(bus_read_ivar,	nexus_read_ivar),
-	DEVMETHOD(bus_write_ivar,	nexus_write_ivar),
 	DEVMETHOD(bus_alloc_resource,	nexus_alloc_resource),
 	DEVMETHOD(bus_release_resource,	nexus_release_resource),
 	DEVMETHOD(bus_activate_resource, nexus_activate_resource),
@@ -215,8 +209,6 @@ nexus_print_child(device_t bus, device_t
 	retval += resource_list_print_type(rl, "port", SYS_RES_IOPORT, "%#lx");
 	retval += resource_list_print_type(rl, "iomem", SYS_RES_MEMORY, "%#lx");
 	retval += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%ld");
-	if (ndev->nx_pcibus != -1)
-		retval += printf(" pcibus %d", ndev->nx_pcibus);
 	if (device_get_flags(child))
 		retval += printf(" flags %#x", device_get_flags(child));
 	retval += printf(" on motherboard\n");	/* XXX "motherboard", ick */
@@ -234,7 +226,6 @@ nexus_add_child(device_t bus, int order,
 	if (!ndev)
 		return(0);
 	resource_list_init(&ndev->nx_resources);
-	ndev->nx_pcibus = -1;
 
 	child = device_add_child_ordered(bus, order, name, unit); 
 
@@ -244,37 +235,6 @@ nexus_add_child(device_t bus, int order,
 	return(child);
 }
 
-static int
-nexus_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
-{
-	struct	nexus_device *ndev = DEVTONX(child);
-
-	switch (which) {
-	case NEXUS_IVAR_PCIBUS:
-		*result = ndev->nx_pcibus;
-		break;
-	default:
-		return ENOENT;
-	}
-	return 0;
-}
-	
-
-static int
-nexus_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
-{
-	struct	nexus_device *ndev = DEVTONX(child);
-
-	switch (which) {
-	case NEXUS_IVAR_PCIBUS:
-		ndev->nx_pcibus = value;
-		break;
-	default:
-		return ENOENT;
-	}
-	return 0;
-}
-
 
 /*
  * Allocate a resource on behalf of child.  NB: child is usually going to be a


More information about the svn-src-head mailing list