static int pccard_print_child(device_t dev, device_t child) { struct pccard_devinfo *devi = PCCARD_DEVINFO(child); struct resource_list *rl = &devi->resources; int retval = 0; retval += bus_print_child_header(dev, child); retval += printf(" at"); if (devi) { pccard_print_resources(rl, "port", SYS_RES_IOPORT, PCCARD_NPORT, "%#lx"); pccard_print_resources(rl, "iomem", SYS_RES_MEMORY, PCCARD_NMEM, "%#lx"); pccard_print_resources(rl, "irq", SYS_RES_IRQ, PCCARD_NIRQ, "%ld"); pccard_print_resources(rl, "drq", SYS_RES_DRQ, PCCARD_NDRQ, "%ld"); retval += printf(" slot %d", devi->slt->slotnum); } retval += bus_print_child_footer(dev, child); return (retval); }
static int pxa_smi_print_child(device_t dev, device_t child) { struct smi_ivars *smid; int retval; smid = (struct smi_ivars *)device_get_ivars(child); if (smid == NULL) { device_printf(dev, "unknown device: %s\n", device_get_nameunit(child)); return (0); } retval = 0; retval += bus_print_child_header(dev, child); retval += resource_list_print_type(&smid->smid_resources, "at mem", SYS_RES_MEMORY, "%#lx"); retval += resource_list_print_type(&smid->smid_resources, "irq", SYS_RES_IRQ, "%ld"); retval += bus_print_child_footer(dev, child); return (retval); }
static int nexus_print_child(device_t bus, device_t child) { int retval = 0; retval += bus_print_child_header(bus, child); retval += printf("\n"); return (retval); }
static int ata_macio_print_child(device_t dev, device_t child) { int retval = 0; retval += bus_print_child_header(dev, child); retval += bus_print_child_footer(dev, child); return (retval); }
static int ofwbus_print_child(device_t bus, device_t child) { int rv; rv = bus_print_child_header(bus, child); rv += ofwbus_print_res(device_get_ivars(child)); rv += bus_print_child_footer(bus, child); return (rv); }
static int nexus_print_child(device_t bus, device_t child) { int retval = 0; retval += bus_print_child_header(bus, child); retval += printf(" on motherboard\n"); /* XXX "motherboard", ick */ return (retval); }
static int ebus_print_child(device_t dev, device_t child) { int retval; retval = bus_print_child_header(dev, child); retval += ebus_print_res(device_get_ivars(child)); retval += bus_print_child_footer(dev, child); return (retval); }
static int dma_print_child(device_t dev, device_t child) { int rv; rv = bus_print_child_header(dev, child); rv += dma_print_res(device_get_ivars(child)); rv += bus_print_child_footer(dev, child); return (rv); }
static int canbus_print_child(device_t dev, device_t child) { int retval = 0; retval += bus_print_child_header(dev, child); retval += print_all_resources(child); retval += bus_print_child_footer(dev, child); return (retval); }
static int ata_cbus_print_child(device_t dev, device_t child) { struct ata_channel *ch = device_get_softc(child); int retval = 0; retval += bus_print_child_header(dev, child); retval += printf(" at bank %d", ch->unit); retval += bus_print_child_footer(dev, child); return retval; }
static int spibus_print_child(device_t dev, device_t child) { struct spibus_ivar *devi = SPIBUS_IVAR(child); int retval = 0; retval += bus_print_child_header(dev, child); retval += printf(" at cs %d", devi->cs); retval += bus_print_child_footer(dev, child); return (retval); }
static int simplebus_print_child(device_t bus, device_t child) { int rv; rv = bus_print_child_header(bus, child); rv += simplebus_print_res(device_get_ivars(child)); if (!ofw_bus_status_okay(child)) rv += printf(" disabled"); rv += bus_print_child_footer(bus, child); return (rv); }
static int pcf_print_child(device_t bus, device_t dev) { struct pcf_softc *pcf = (struct pcf_softc *)device_get_softc(bus); int retval = 0; retval += bus_print_child_header(bus, dev); retval += kprintf(" on %s addr 0x%x\n", device_get_nameunit(bus), (int)pcf->pcf_addr); return (retval); }
int ata_pci_print_child(device_t dev, device_t child) { int retval; retval = bus_print_child_header(dev, child); retval += printf(" at channel %d", (int)(intptr_t)device_get_ivars(child)); retval += bus_print_child_footer(dev, child); return (retval); }
static int xenbus_print_child(device_t dev, device_t child) { struct xenbus_device_ivars *ivars = device_get_ivars(child); int retval = 0; retval += bus_print_child_header(dev, child); retval += printf(" at %s", ivars->xd_node); retval += bus_print_child_footer(dev, child); return (retval); }
static int ocpbus_print_child(device_t dev, device_t child) { u_long size, start; int error, retval, rid; retval = bus_print_child_header(dev, child); rid = 0; while (1) { error = ocpbus_get_resource(dev, child, SYS_RES_MEMORY, rid, &start, &size); if (error) break; retval += (rid == 0) ? printf(" iomem ") : printf(","); retval += printf("%#lx", start); if (size > 1) retval += printf("-%#lx", start + size - 1); rid++; } /* * The SYS_RES_IOPORT resource of the PCIB has rid 1 because the * the SYS_RES_MEMORY resource related to the decoding window also * has rid 1. This is friendlier for the PCIB child... */ rid = 1; while (1) { error = ocpbus_get_resource(dev, child, SYS_RES_IOPORT, rid, &start, &size); if (error) break; retval += (rid == 1) ? printf(" ioport ") : printf(","); retval += printf("%#lx", start); if (size > 1) retval += printf("-%#lx", start + size - 1); rid++; } rid = 0; while (1) { error = ocpbus_get_resource(dev, child, SYS_RES_IRQ, rid, &start, &size); if (error) break; retval += (rid == 0) ? printf(" irq ") : printf(","); retval += printf("%ld", start); rid++; } retval += bus_print_child_footer(dev, child); return (retval); }
static int iicbus_print_child(device_t dev, device_t child) { struct iicbus_ivar *devi = IICBUS_IVAR(child); int retval = 0; retval += bus_print_child_header(dev, child); if (devi->addr != 0) retval += printf(" at addr %#x", devi->addr); retval += bus_print_child_footer(dev, child); return (retval); }
static int gic_v3_fdt_print_child(device_t bus, device_t child) { struct gic_v3_ofw_devinfo *di = device_get_ivars(child); struct resource_list *rl = &di->di_rl; int retval = 0; retval += bus_print_child_header(bus, child); retval += resource_list_print_type(rl, "mem", SYS_RES_MEMORY, "%#jx"); retval += bus_print_child_footer(bus, child); return (retval); }
int fhc_print_child(device_t dev, device_t child) { struct fhc_devinfo *fdi; int rv; fdi = device_get_ivars(child); rv = bus_print_child_header(dev, child); rv += resource_list_print_type(&fdi->fdi_rl, "mem", SYS_RES_MEMORY, "%#lx"); rv += bus_print_child_footer(dev, child); return (rv); }
static int gpiobus_print_child(device_t dev, device_t child) { struct gpiobus_ivar *devi = GPIOBUS_IVAR(child); int retval = 0; retval += bus_print_child_header(dev, child); retval += printf(" at pin(s) "); gpiobus_print_pins(devi); retval += bus_print_child_footer(dev, child); return (retval); }
static int apb_print_child(device_t bus, device_t child) { int retval = 0; retval += bus_print_child_header(bus, child); retval += apb_print_all_resources(child); if (device_get_flags(child)) retval += printf(" flags %#x", device_get_flags(child)); retval += printf(" on %s\n", device_get_nameunit(bus)); return (retval); }
static int legacy_print_child(device_t bus, device_t child) { struct legacy_device *atdev = DEVTOAT(child); int retval = 0; retval += bus_print_child_header(bus, child); if (atdev->lg_pcibus != -1) retval += printf(" pcibus %d", atdev->lg_pcibus); retval += printf(" on motherboard\n"); /* XXX "motherboard", ick */ return (retval); }
static int nexus_print_child(device_t bus, device_t child) { int retval = 0; retval += bus_print_child_header(bus, child); retval += nexus_print_all_resources(child); if (device_get_flags(child)) retval += printf(" flags %#x", device_get_flags(child)); retval += printf(" on motherboard\n"); /* XXX "motherboard", ick */ return (retval); }
static int qpi_print_child(device_t bus, device_t child) { struct qpi_device *qdev; int retval = 0; qdev = device_get_ivars(child); retval += bus_print_child_header(bus, child); if (qdev->qd_pcibus != -1) retval += printf(" pcibus %d", qdev->qd_pcibus); retval += bus_print_child_footer(bus, child); return (retval); }
static int smbus_print_child(device_t parent, device_t child) { struct smbus_ivar *devi; int retval; devi = device_get_ivars(child); retval = bus_print_child_header(parent, child); if (devi->addr != 0) retval += printf(" at addr 0x%x", devi->addr); retval += bus_print_child_footer(parent, child); return (retval); }
static int iicbus_print_child(device_t dev, device_t child) { struct iicbus_ivar *devi = IICBUS_IVAR(child); int retval = 0; retval += bus_print_child_header(dev, child); if (devi->addr != 0) retval += printf(" at addr %#x", devi->addr); resource_list_print_type(&devi->rl, "irq", SYS_RES_IRQ, "%jd"); retval += bus_print_child_footer(dev, child); return (retval); }
static int nexus_print_child(device_t bus, device_t child) { struct nexus_device *ndev = DEVTONX(child); int retval = 0; retval += bus_print_child_header(bus, child); retval += nexus_print_all_resources(child); if (ndev->nx_pcibus != -1) retval += kprintf(" pcibus %d", ndev->nx_pcibus); retval += kprintf(" on motherboard\n"); return (retval); }
int puc_bus_print_child(device_t dev, device_t child) { struct puc_port *port; int retval; port = device_get_ivars(child); retval = 0; retval += bus_print_child_header(dev, child); retval += printf(" at port %d", port->p_nr); retval += bus_print_child_footer(dev, child); return (retval); }
static int wiibus_print_child(device_t dev, device_t child) { struct wiibus_devinfo *dinfo = device_get_ivars(child); int retval = 0; retval += bus_print_child_header(dev, child); retval += resource_list_print_type(&dinfo->di_resources, "mem", SYS_RES_MEMORY, "%#lx"); retval += resource_list_print_type(&dinfo->di_resources, "irq", SYS_RES_IRQ, "%ld"); retval += bus_print_child_footer(dev, child); return (retval); }
static int sbus_print_child(device_t dev, device_t child) { struct sbus_devinfo *dinfo; struct resource_list *rl; int rv; dinfo = device_get_ivars(child); rl = &dinfo->sdi_rl; rv = bus_print_child_header(dev, child); rv += resource_list_print_type(rl, "mem", SYS_RES_MEMORY, "%#lx"); rv += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%ld"); rv += bus_print_child_footer(dev, child); return (rv); }