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