Lines Matching full:child
100 device_t child;
102 child = device_add_child_ordered(dev, order, name, unit);
103 if (child == NULL)
107 device_delete_child(dev, child);
111 device_set_ivars(child, dinfo);
113 return (child);
117 bcma_child_deleted(device_t dev, device_t child)
122 bhnd_generic_child_deleted(dev, child);
125 if ((dinfo = device_get_ivars(child)) != NULL)
126 bcma_free_dinfo(dev, child, dinfo);
128 device_set_ivars(child, NULL);
132 bcma_read_ivar(device_t dev, device_t child, int index, uintptr_t *result)
137 dinfo = device_get_ivars(child);
174 bcma_write_ivar(device_t dev, device_t child, int index, uintptr_t value)
178 dinfo = device_get_ivars(child);
199 bcma_get_resource_list(device_t dev, device_t child)
201 struct bcma_devinfo *dinfo = device_get_ivars(child);
206 bcma_read_iost(device_t dev, device_t child, uint16_t *iost)
211 if ((error = bhnd_read_config(child, BCMA_DMP_IOSTATUS, &value, 4)))
220 bcma_read_ioctl(device_t dev, device_t child, uint16_t *ioctl)
225 if ((error = bhnd_read_config(child, BCMA_DMP_IOCTRL, &value, 4)))
234 bcma_write_ioctl(device_t dev, device_t child, uint16_t value, uint16_t mask)
240 if (device_get_parent(child) != dev)
243 dinfo = device_get_ivars(child);
262 bcma_is_hw_suspended(device_t dev, device_t child)
269 error = bhnd_read_config(child, BCMA_DMP_RESETCTRL, &rst, 4);
271 device_printf(child, "error reading HW reset state: %d\n",
280 error = bhnd_read_ioctl(child, &ioctl);
282 device_printf(child, "error reading HW ioctl register: %d\n",
294 bcma_reset_hw(device_t dev, device_t child, uint16_t ioctl,
302 if (device_get_parent(child) != dev)
305 dinfo = device_get_ivars(child);
317 if ((error = bhnd_suspend_hw(child, reset_ioctl)))
327 if ((error = bhnd_write_ioctl(child, ioctl | clkflags, UINT16_MAX)))
331 if ((error = bcma_dmp_write_reset(child, dinfo, 0x0)))
335 error = bhnd_write_ioctl(child, 0x0, BHND_IOCTL_CLK_FORCE);
343 bcma_suspend_hw(device_t dev, device_t child, uint16_t ioctl)
350 if (device_get_parent(child) != dev)
353 dinfo = device_get_ivars(child);
365 if ((error = bcma_dmp_wait_reset(child, dinfo)))
369 if ((error = bcma_dmp_write_reset(child, dinfo, BCMA_DMP_RC_RESET)))
373 if ((error = bhnd_write_ioctl(child, ioctl, ~clkflags)))
380 bcma_read_config(device_t dev, device_t child, bus_size_t offset, void *value,
386 /* Must be a directly attached child core */
387 if (device_get_parent(child) != dev)
391 dinfo = device_get_ivars(child);
418 bcma_write_config(device_t dev, device_t child, bus_size_t offset,
424 /* Must be a directly attached child core */
425 if (device_get_parent(child) != dev)
429 dinfo = device_get_ivars(child);
456 bcma_get_port_count(device_t dev, device_t child, bhnd_port_type type)
461 if (device_get_parent(child) != dev)
462 return (BHND_BUS_GET_PORT_COUNT(device_get_parent(dev), child,
465 dinfo = device_get_ivars(child);
482 bcma_get_region_count(device_t dev, device_t child, bhnd_port_type type,
490 if (device_get_parent(child) != dev)
491 return (BHND_BUS_GET_REGION_COUNT(device_get_parent(dev), child,
494 dinfo = device_get_ivars(child);
507 bcma_get_port_rid(device_t dev, device_t child, bhnd_port_type port_type,
515 dinfo = device_get_ivars(child);
531 bcma_decode_port_rid(device_t dev, device_t child, int type, int rid,
539 dinfo = device_get_ivars(child);
573 bcma_get_region_addr(device_t dev, device_t child, bhnd_port_type port_type,
581 dinfo = device_get_ivars(child);
607 bcma_get_intr_count(device_t dev, device_t child)
612 if (device_get_parent(child) != dev)
613 return (BHND_BUS_GET_INTR_COUNT(device_get_parent(dev), child));
615 dinfo = device_get_ivars(child);
623 bcma_get_intr_ivec(device_t dev, device_t child, u_int intr, u_int *ivec)
629 if (device_get_parent(child) != dev) {
630 return (BHND_BUS_GET_INTR_IVEC(device_get_parent(dev), child,
634 dinfo = device_get_ivars(child);
662 device_t child;
679 /* Add the child device */
680 child = BUS_ADD_CHILD(bus, 0, NULL, DEVICE_UNIT_ANY);
681 if (child == NULL) {
687 dinfo = device_get_ivars(child);
688 if ((error = bcma_init_dinfo(bus, child, dinfo, corecfg)))
696 if (bhnd_is_hw_disabled(child))
697 device_disable(child);
699 /* Issue bus callback for fully initialized child. */
700 BHND_BUS_CHILD_ADDED(bus, child);