Garbage-collect __PCI_DEV_FUNCORDER.
This commit is contained in:
parent
d50107af75
commit
11fa11094e
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pci_machdep.h,v 1.1 2001/12/11 00:18:22 uwe Exp $ */
|
||||
/* $NetBSD: pci_machdep.h,v 1.2 2002/05/15 18:37:54 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Matthew R. Green
|
||||
|
@ -41,7 +41,6 @@
|
|||
* have a PCI-to-PCI bridge)???
|
||||
*/
|
||||
#define __PCI_BUS_DEVORDER
|
||||
#define __PCI_DEV_FUNCORDER
|
||||
#endif /* 0 */
|
||||
|
||||
|
||||
|
@ -92,9 +91,6 @@ void pci_attach_hook(struct device *, struct device *,
|
|||
#ifdef __PCI_BUS_DEVORDER
|
||||
int pci_bus_devorder(pci_chipset_tag_t, int, char *);
|
||||
#endif
|
||||
#ifdef __PCI_DEV_FUNCORDER
|
||||
int pci_dev_funcorder(pci_chipset_tag_t, int, int, char *);
|
||||
#endif
|
||||
int pci_bus_maxdevs(pci_chipset_tag_t, int);
|
||||
pcitag_t pci_make_tag(pci_chipset_tag_t, int, int, int);
|
||||
void pci_decompose_tag(pci_chipset_tag_t, pcitag_t,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pci_machdep.c,v 1.28 2002/05/15 17:40:11 thorpej Exp $ */
|
||||
/* $NetBSD: pci_machdep.c,v 1.29 2002/05/15 18:37:55 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000 Matthew R. Green
|
||||
|
@ -151,62 +151,6 @@ pci_bus_devorder(pc, busno, devs)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef __PCI_DEV_FUNCORDER
|
||||
int
|
||||
pci_dev_funcorder(pc, busno, device, funcs)
|
||||
pci_chipset_tag_t pc;
|
||||
int busno;
|
||||
int device;
|
||||
char *funcs;
|
||||
{
|
||||
struct ofw_pci_register reg;
|
||||
int node, len, i = 0;
|
||||
#ifdef DEBUG
|
||||
char name[80];
|
||||
#endif
|
||||
|
||||
node = pc->curnode;
|
||||
#ifdef DEBUG
|
||||
if (sparc_pci_debug & SPDB_PROBE) {
|
||||
OF_getprop(node, "name", &name, sizeof(name));
|
||||
printf("pci_bus_funcorder: curnode %x %s\n", node, name);
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* Initially, curnode is the root of the pci tree. As we
|
||||
* attach bridges, curnode should be set to that of the bridge.
|
||||
*
|
||||
* Note this search is almost exactly the same as pci_bus_devorder()'s,
|
||||
* except that we limit the search to only those with a matching
|
||||
* "device" number.
|
||||
*/
|
||||
for (node = OF_child(node); node; node = OF_peer(node)) {
|
||||
len = OF_getproplen(node, "reg");
|
||||
if (len < sizeof(reg))
|
||||
continue;
|
||||
if (OF_getprop(node, "reg", (void *)®, sizeof(reg)) != len)
|
||||
panic("pci_probe_bus: OF_getprop len botch");
|
||||
|
||||
if (device != OFW_PCI_PHYS_HI_DEVICE(reg.phys_hi))
|
||||
continue;
|
||||
|
||||
funcs[i++] = OFW_PCI_PHYS_HI_FUNCTION(reg.phys_hi);
|
||||
#ifdef DEBUG
|
||||
if (sparc_pci_debug & SPDB_PROBE) {
|
||||
OF_getprop(node, "name", &name, sizeof(name));
|
||||
printf("pci_bus_funcorder: adding %x %s\n", node, name);
|
||||
}
|
||||
#endif
|
||||
if (i == 8)
|
||||
break;
|
||||
}
|
||||
if (i < 8)
|
||||
funcs[i] = -1;
|
||||
|
||||
return i;
|
||||
}
|
||||
#endif
|
||||
|
||||
pcitag_t
|
||||
pci_make_tag(pc, b, d, f)
|
||||
pci_chipset_tag_t pc;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pci_machdep.h,v 1.10 2002/05/15 17:40:12 thorpej Exp $ */
|
||||
/* $NetBSD: pci_machdep.h,v 1.11 2002/05/15 18:37:55 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Matthew R. Green
|
||||
|
@ -35,7 +35,6 @@
|
|||
* We want to contro both device & function probe order.
|
||||
*/
|
||||
#define __PCI_BUS_DEVORDER
|
||||
#undef __PCI_DEV_FUNCORDER
|
||||
|
||||
/*
|
||||
* Forward declarations.
|
||||
|
@ -79,9 +78,6 @@ void pci_attach_hook(struct device *, struct device *,
|
|||
#ifdef __PCI_BUS_DEVORDER
|
||||
int pci_bus_devorder(pci_chipset_tag_t, int, char *);
|
||||
#endif
|
||||
#ifdef __PCI_DEV_FUNCORDER
|
||||
int pci_dev_funcorder(pci_chipset_tag_t, int, int, char *);
|
||||
#endif
|
||||
int pci_bus_maxdevs(pci_chipset_tag_t, int);
|
||||
pcitag_t pci_make_tag(pci_chipset_tag_t, int, int, int);
|
||||
void pci_decompose_tag(pci_chipset_tag_t, pcitag_t, int *, int *,
|
||||
|
|
Loading…
Reference in New Issue