Lines Matching refs:child
128 siba_read_ivar(device_t dev, device_t child, int index, uintptr_t *result)
135 dinfo = device_get_ivars(child);
192 siba_write_ivar(device_t dev, device_t child, int index, uintptr_t value)
198 dinfo = device_get_ivars(child);
236 siba_get_resource_list(device_t dev, device_t child)
238 struct siba_devinfo *dinfo = device_get_ivars(child);
244 siba_alloc_pmu(device_t dev, device_t child)
254 if (device_get_parent(child) != dev)
258 dinfo = device_get_ivars(child);
262 chipc = bhnd_retain_provider(child, BHND_SERVICE_CHIPC);
265 bhnd_release_provider(child, chipc, BHND_SERVICE_CHIPC);
273 if ((error = bhnd_generic_alloc_pmu(dev, child)))
290 pwrctl = bhnd_retain_provider(child, BHND_SERVICE_PWRCTL);
305 device_get_nameunit(child));
308 /* Update the child's PMU allocation state, and transfer ownership of
320 siba_release_pmu(device_t dev, device_t child)
327 if (device_get_parent(child) != dev)
331 dinfo = device_get_ivars(child);
336 panic("pmu over-release for %s", device_get_nameunit(child));
342 return (bhnd_generic_release_pmu(dev, child));
348 error = bhnd_pwrctl_request_clock(pwrctl, child,
355 /* Clean up the child's PMU state */
361 bhnd_release_provider(child, pwrctl, BHND_SERVICE_PWRCTL);
365 /* Clean up the child's PMU state */
379 siba_get_clock_latency(device_t dev, device_t child, bhnd_clock clock,
386 if (device_get_parent(child) != dev)
390 dinfo = device_get_ivars(child);
402 return (bhnd_generic_get_clock_latency(dev, child, clock,
434 siba_get_clock_freq(device_t dev, device_t child, bhnd_clock clock,
441 if (device_get_parent(child) != dev)
445 dinfo = device_get_ivars(child);
457 return (bhnd_generic_get_clock_freq(dev, child, clock, freq));
477 siba_request_ext_rsrc(device_t dev, device_t child, u_int rsrc)
482 if (device_get_parent(child) != dev)
486 dinfo = device_get_ivars(child);
498 return (bhnd_generic_request_ext_rsrc(dev, child, rsrc));
512 siba_release_ext_rsrc(device_t dev, device_t child, u_int rsrc)
517 if (device_get_parent(child) != dev)
521 dinfo = device_get_ivars(child);
533 return (bhnd_generic_release_ext_rsrc(dev, child, rsrc));
547 siba_request_clock(device_t dev, device_t child, bhnd_clock clock)
553 if (device_get_parent(child) != dev)
557 dinfo = device_get_ivars(child);
569 return (bhnd_generic_request_clock(dev, child, clock));
572 error = bhnd_pwrctl_request_clock(dinfo->pmu.pwrctl, child,
600 siba_enable_clocks(device_t dev, device_t child, uint32_t clocks)
605 if (device_get_parent(child) != dev)
609 dinfo = device_get_ivars(child);
621 return (bhnd_generic_enable_clocks(dev, child, clocks));
635 device_get_nameunit(child), clocks);
646 siba_read_iost(device_t dev, device_t child, uint16_t *iost)
651 error = bhnd_read_config(child, SIBA_CFG0_TMSTATEHIGH, &tmhigh, 4);
660 siba_read_ioctl(device_t dev, device_t child, uint16_t *ioctl)
665 if ((error = bhnd_read_config(child, SIBA_CFG0_TMSTATELOW, &ts_low, 4)))
673 siba_write_ioctl(device_t dev, device_t child, uint16_t value, uint16_t mask)
679 if (device_get_parent(child) != dev)
683 dinfo = device_get_ivars(child);
691 siba_write_target_state(child, dinfo, SIBA_CFG0_TMSTATELOW,
697 siba_is_hw_suspended(device_t dev, device_t child)
704 error = bhnd_read_config(child, SIBA_CFG0_TMSTATELOW, &ts_low, 4);
706 device_printf(child, "error reading HW reset state: %d\n",
728 siba_reset_hw(device_t dev, device_t child, uint16_t ioctl,
737 if (device_get_parent(child) != dev)
740 dinfo = device_get_ivars(child);
752 if ((error = bhnd_suspend_hw(child, reset_ioctl)))
763 siba_write_target_state(child, dinfo, SIBA_CFG0_TMSTATELOW,
768 siba_write_target_state(child, dinfo, SIBA_CFG0_TMSTATEHIGH,
775 siba_write_target_state(child, dinfo, SIBA_CFG0_IMSTATE, 0x0,
781 siba_write_target_state(child, dinfo, SIBA_CFG0_TMSTATELOW, 0x0,
786 siba_write_target_state(child, dinfo, SIBA_CFG0_TMSTATELOW, 0x0,
793 siba_suspend_hw(device_t dev, device_t child, uint16_t ioctl)
802 if (device_get_parent(child) != dev)
806 dinfo = device_get_ivars(child);
830 siba_write_target_state(child, dinfo, SIBA_CFG0_TMSTATELOW,
836 siba_write_target_state(child, dinfo, SIBA_CFG0_TMSTATELOW,
841 error = siba_wait_target_state(child, dinfo, SIBA_CFG0_TMSTATEHIGH,
851 siba_write_target_state(child, dinfo, SIBA_CFG0_IMSTATE,
855 error = siba_wait_target_state(child, dinfo, SIBA_CFG0_IMSTATE,
871 siba_write_target_state(child, dinfo, SIBA_CFG0_TMSTATELOW, ts_low,
879 siba_write_target_state(child, dinfo, SIBA_CFG0_IMSTATE, 0x0,
884 siba_write_target_state(child, dinfo, SIBA_CFG0_TMSTATELOW, 0x0,
896 error = bhnd_pwrctl_request_clock(dinfo->pmu.pwrctl, child,
901 device_printf(child, "failed to release clock request: "
914 siba_read_config(device_t dev, device_t child, bus_size_t offset, void *value,
921 if (device_get_parent(child) != dev)
925 dinfo = device_get_ivars(child);
953 siba_write_config(device_t dev, device_t child, bus_size_t offset,
961 if (device_get_parent(child) != dev)
965 dinfo = device_get_ivars(child);
990 siba_get_port_count(device_t dev, device_t child, bhnd_port_type type)
995 if (device_get_parent(child) != dev)
996 return (BHND_BUS_GET_PORT_COUNT(device_get_parent(dev), child,
999 dinfo = device_get_ivars(child);
1004 siba_get_region_count(device_t dev, device_t child, bhnd_port_type type,
1010 if (device_get_parent(child) != dev)
1011 return (BHND_BUS_GET_REGION_COUNT(device_get_parent(dev), child,
1014 dinfo = device_get_ivars(child);
1019 siba_get_port_rid(device_t dev, device_t child, bhnd_port_type port_type,
1027 if (device_get_parent(child) != dev)
1028 return (BHND_BUS_GET_PORT_RID(device_get_parent(dev), child,
1031 dinfo = device_get_ivars(child);
1048 siba_decode_port_rid(device_t dev, device_t child, int type, int rid,
1054 if (device_get_parent(child) != dev)
1055 return (BHND_BUS_DECODE_PORT_RID(device_get_parent(dev), child,
1058 dinfo = device_get_ivars(child);
1091 siba_get_region_addr(device_t dev, device_t child, bhnd_port_type port_type,
1099 if (device_get_parent(child) != dev) {
1100 return (BHND_BUS_GET_REGION_ADDR(device_get_parent(dev), child,
1104 dinfo = device_get_ivars(child);
1130 siba_get_intr_count(device_t dev, device_t child)
1135 if (device_get_parent(child) != dev)
1136 return (BHND_BUS_GET_INTR_COUNT(device_get_parent(dev), child));
1138 dinfo = device_get_ivars(child);
1152 siba_get_intr_ivec(device_t dev, device_t child, u_int intr, u_int *ivec)
1157 if (device_get_parent(child) != dev)
1158 return (BHND_BUS_GET_INTR_IVEC(device_get_parent(dev), child,
1162 if (intr >= siba_get_intr_count(dev, child))
1167 dinfo = device_get_ivars(child);
1209 /* Add to child's resource list */
1244 device_t child;
1246 child = device_add_child_ordered(dev, order, name, unit);
1247 if (child == NULL)
1251 device_delete_child(dev, child);
1255 device_set_ivars(child, dinfo);
1257 return (child);
1261 siba_child_deleted(device_t dev, device_t child)
1269 bhnd_generic_child_deleted(dev, child);
1272 if ((dinfo = device_get_ivars(child)) != NULL)
1273 siba_free_dinfo(dev, child, dinfo);
1275 device_set_ivars(child, NULL);
1311 * Add child devices for all discovered cores.
1321 device_t child;
1326 /* Add the child device */
1327 child = BUS_ADD_CHILD(dev, 0, NULL, -1);
1328 if (child == NULL) {
1333 children[i] = child;
1336 if ((dinfo = device_get_ivars(child)) == NULL) {
1341 if ((error = siba_init_dinfo(dev, child, dinfo, &cores[i])))
1346 if (bhnd_is_hw_disabled(child))
1347 device_disable(child);
1358 device_t child;
1360 child = children[i];
1363 if (bhnd_is_hw_disabled(child))
1366 dinfo = device_get_ivars(child);
1372 /* Issue bus callback for fully initialized child. */
1373 BHND_BUS_CHILD_ADDED(dev, child);