Ejemplo n.º 1
0
void
device_register(device_t dev, void *aux)
{
	device_t isaboot, pciboot;

	isaboot = device_isa_register(dev, aux);
	pciboot = device_pci_register(dev, aux);

	if (isaboot == NULL && pciboot == NULL)
		return;

	if (booted_device != NULL) {
		/* XXX should be a panic() */
		dmatch(__func__, dev);
	} else
		booted_device = (isaboot != NULL) ? isaboot : pciboot;
}
void
device_register(device_t dev, void *aux)
{
	device_t isaboot, pciboot;

	isaboot = device_isa_register(dev, aux);
	pciboot = device_pci_register(dev, aux);

	if (isaboot == NULL && pciboot == NULL)
		return;

	if (booted_device != NULL) {
		/* XXX should be a panic() */
		printf("WARNING: double match for boot device (%s, %s)\n",
		    device_xname(booted_device), device_xname(dev));
	} else
		booted_device = (isaboot != NULL) ? isaboot : pciboot;
}
Ejemplo n.º 3
0
void
device_register(device_t dev, void *aux)
{
#if NPCI > 0
	device_t parent = device_parent(dev);

	if (parent != NULL && device_is_a(parent, "pci"))
		device_pci_register(dev, aux);
#endif

	if (bootdev_data == NULL) {
		/*
		 * There is no hope.
		 */
		return;
	}
	if (platform.device_register)
		(*platform.device_register)(dev, aux);
}