Example #1
0
static int
ata_iobus_probe(device_t dev)
{
	char *type = iobus_get_name(dev);

	if (strncmp(type, "ata", 3) != 0)
		return (ENXIO);

	device_set_desc(dev, "PSIM ATA Controller");
	return (0);
}
Example #2
0
static int
uart_iobus_probe(device_t dev)
{
	struct uart_softc *sc;
	char *type;

	type = iobus_get_name(dev);
	if (strncmp(type, "com", 3) != 0)
		return (ENXIO);

	sc = device_get_softc(dev);
	sc->sc_class = &uart_ns8250_class;

	device_set_desc(dev, "PSIM serial port");
	return (uart_bus_probe(dev, 0, 0, 0, 0));
}
Example #3
0
static int
openpic_iobus_probe(device_t dev)
{
	struct openpic_softc *sc;
	char *name;

	name = iobus_get_name(dev);
	if (strcmp(name, "interrupt-controller") != 0)
		return (ENXIO);

	/*
	 * The description was already printed out in the nexus
	 * probe, so don't do it again here
	 */
	device_set_desc(dev, OPENPIC_DEVSTR);

	sc = device_get_softc(dev);
	sc->sc_psim = 1;

	return (0);
}