Lines Matching +full:irqs +full:- +full:map +full:- +full:range
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright © 2021-2022 Dmitry Salychev
112 if (dinfo->portal) in dpaa2_rc_detach()
113 dpaa2_mcp_free_portal(dinfo->portal); in dpaa2_rc_detach()
130 sc->dev = dev; in dpaa2_rc_attach()
131 sc->unit = device_get_unit(dev); in dpaa2_rc_attach()
133 if (sc->unit == 0) { in dpaa2_rc_attach()
155 dinfo->pdev = pdev; in dpaa2_rc_attach()
156 dinfo->dev = dev; in dpaa2_rc_attach()
157 dinfo->dtype = DPAA2_DEV_RC; in dpaa2_rc_attach()
158 dinfo->portal = NULL; in dpaa2_rc_attach()
161 error = dpaa2_mcp_init_portal(&dinfo->portal, mcsc->res[0], in dpaa2_rc_attach()
162 &mcsc->map[0], DPAA2_PORTAL_DEF); in dpaa2_rc_attach()
195 return (&dinfo->resources); in dpaa2_rc_get_resource_list()
209 rl = &dinfo->resources; in dpaa2_rc_delete_resource()
214 if (rle->res) { in dpaa2_rc_delete_resource()
215 if (rman_get_flags(rle->res) & RF_ACTIVE || in dpaa2_rc_delete_resource()
219 type, rid, rman_get_start(rle->res)); in dpaa2_rc_delete_resource()
235 rl = &dinfo->resources; in dpaa2_rc_alloc_multi_resource()
238 * By default, software portal interrupts are message-based, that is, in dpaa2_rc_alloc_multi_resource()
276 rl = &dinfo->resources; in dpaa2_rc_release_resource()
288 rl = &dinfo->resources; in dpaa2_rc_child_deleted()
292 if (rle->res) { in dpaa2_rc_child_deleted()
293 if (rman_get_flags(rle->res) & RF_ACTIVE || in dpaa2_rc_child_deleted()
294 resource_list_busy(rl, rle->type, rle->rid)) { in dpaa2_rc_child_deleted()
297 rle->type, rle->rid, in dpaa2_rc_child_deleted()
298 rman_get_start(rle->res)); in dpaa2_rc_child_deleted()
299 bus_release_resource(child, rle->type, rle->rid, in dpaa2_rc_child_deleted()
300 rle->res); in dpaa2_rc_child_deleted()
302 resource_list_unreserve(rl, rcdev, child, rle->type, in dpaa2_rc_child_deleted()
303 rle->rid); in dpaa2_rc_child_deleted()
319 rl = &dinfo->resources; in dpaa2_rc_child_detached()
323 if (dinfo->msi.msi_alloc != 0) { in dpaa2_rc_child_detached()
325 dinfo->msi.msi_alloc); in dpaa2_rc_child_detached()
366 KASSERT(dinfo->msi.msi_alloc > 0, in dpaa2_rc_setup_intr()
370 * Ask our parent to map the MSI and give us the address and in dpaa2_rc_setup_intr()
389 rid, dpaa2_ttos(dinfo->dtype), in dpaa2_rc_setup_intr()
393 dinfo->msi.msi_handlers++; in dpaa2_rc_setup_intr()
423 rle = resource_list_find(&dinfo->resources, SYS_RES_IRQ, rid); in dpaa2_rc_teardown_intr()
424 if (rle->res != irq) in dpaa2_rc_teardown_intr()
426 dinfo->msi.msi_handlers--; in dpaa2_rc_teardown_intr()
440 struct resource_list *rl = &dinfo->resources; in dpaa2_rc_print_child()
449 /* Print DPAA2-specific resources. */ in dpaa2_rc_print_child()
455 retval += printf(" at %s (id=%u)", dpaa2_ttos(dinfo->dtype), dinfo->id); in dpaa2_rc_print_child()
464 * Pseudo-PCI interface.
479 int error, actual, i, run, irqs[32]; in dpaa2_rc_alloc_msi() local
486 if (rcinfo->dtype != DPAA2_DEV_RC) in dpaa2_rc_alloc_msi()
490 if (dinfo->msi.msi_alloc != 0) in dpaa2_rc_alloc_msi()
494 actual = min(*count, dinfo->msi.msi_msgnum); in dpaa2_rc_alloc_msi()
506 actual, irqs); in dpaa2_rc_alloc_msi()
518 * the irqs[] array, so add new resources starting at rid 1. in dpaa2_rc_alloc_msi()
521 resource_list_add(&dinfo->resources, SYS_RES_IRQ, i + 1, in dpaa2_rc_alloc_msi()
522 irqs[i], irqs[i], 1); in dpaa2_rc_alloc_msi()
526 device_printf(child, "using IRQ %d for MSI\n", irqs[0]); in dpaa2_rc_alloc_msi()
531 * we are in a range. in dpaa2_rc_alloc_msi()
533 device_printf(child, "using IRQs %d", irqs[0]); in dpaa2_rc_alloc_msi()
537 if (irqs[i] == irqs[i - 1] + 1) { in dpaa2_rc_alloc_msi()
542 /* Finish previous range. */ in dpaa2_rc_alloc_msi()
544 printf("-%d", irqs[i - 1]); in dpaa2_rc_alloc_msi()
548 /* Start new range. */ in dpaa2_rc_alloc_msi()
549 printf(",%d", irqs[i]); in dpaa2_rc_alloc_msi()
552 /* Unfinished range? */ in dpaa2_rc_alloc_msi()
554 printf("-%d", irqs[actual - 1]); in dpaa2_rc_alloc_msi()
560 dinfo->msi.msi_alloc = actual; in dpaa2_rc_alloc_msi()
561 dinfo->msi.msi_handlers = 0; in dpaa2_rc_alloc_msi()
577 int i, irqs[32]; in dpaa2_rc_release_msi() local
580 if (rcinfo->dtype != DPAA2_DEV_RC) in dpaa2_rc_release_msi()
584 if (dinfo->msi.msi_alloc == 0) in dpaa2_rc_release_msi()
586 KASSERT(dinfo->msi.msi_alloc <= 32, in dpaa2_rc_release_msi()
590 if (dinfo->msi.msi_handlers > 0) in dpaa2_rc_release_msi()
592 for (i = 0; i < dinfo->msi.msi_alloc; i++) { in dpaa2_rc_release_msi()
593 rle = resource_list_find(&dinfo->resources, SYS_RES_IRQ, i + 1); in dpaa2_rc_release_msi()
595 if (rle->res != NULL) in dpaa2_rc_release_msi()
597 irqs[i] = rle->start; in dpaa2_rc_release_msi()
601 PCIB_RELEASE_MSI(device_get_parent(rcdev), child, dinfo->msi.msi_alloc, in dpaa2_rc_release_msi()
602 irqs); in dpaa2_rc_release_msi()
603 for (i = 0; i < dinfo->msi.msi_alloc; i++) in dpaa2_rc_release_msi()
604 resource_list_delete(&dinfo->resources, SYS_RES_IRQ, i + 1); in dpaa2_rc_release_msi()
607 dinfo->msi.msi_alloc = 0; in dpaa2_rc_release_msi()
619 return (dinfo->msi.msi_msgnum); in dpaa2_rc_msi_count()
628 if (rcinfo->dtype != DPAA2_DEV_RC) in dpaa2_rc_get_id()
651 *major = cmd->params[0] >> 32; in dpaa2_rc_mng_get_version()
652 *minor = cmd->params[1] & 0xFFFFFFFF; in dpaa2_rc_mng_get_version()
653 *rev = cmd->params[0] & 0xFFFFFFFF; in dpaa2_rc_mng_get_version()
671 *pvr = cmd->params[0] >> 32; in dpaa2_rc_mng_get_soc_version()
672 *svr = cmd->params[0] & 0xFFFFFFFF; in dpaa2_rc_mng_get_soc_version()
690 *cont_id = cmd->params[0] & 0xFFFFFFFF; in dpaa2_rc_mng_get_container_id()
706 cmd->params[0] = cont_id; in dpaa2_rc_open()
710 hdr = (struct dpaa2_cmd_header *) &cmd->header; in dpaa2_rc_open()
711 *token = hdr->token; in dpaa2_rc_open()
740 *obj_count = (uint32_t)(cmd->params[0] >> 32); in dpaa2_rc_get_obj_count()
769 cmd->params[0] = obj_idx; in dpaa2_rc_get_obj()
773 pobj = (struct dpaa2_obj_resp *) &cmd->params[0]; in dpaa2_rc_get_obj()
774 obj->id = pobj->id; in dpaa2_rc_get_obj()
775 obj->vendor = pobj->vendor; in dpaa2_rc_get_obj()
776 obj->irq_count = pobj->irq_count; in dpaa2_rc_get_obj()
777 obj->reg_count = pobj->reg_count; in dpaa2_rc_get_obj()
778 obj->state = pobj->state; in dpaa2_rc_get_obj()
779 obj->ver_major = pobj->ver_major; in dpaa2_rc_get_obj()
780 obj->ver_minor = pobj->ver_minor; in dpaa2_rc_get_obj()
781 obj->flags = pobj->flags; in dpaa2_rc_get_obj()
782 obj->type = dpaa2_stot((const char *) pobj->type); in dpaa2_rc_get_obj()
783 memcpy(obj->label, pobj->label, sizeof(pobj->label)); in dpaa2_rc_get_obj()
787 if (obj->type == DPAA2_DEV_NOTYPE) in dpaa2_rc_get_obj()
824 args = (struct get_obj_desc_args *) &cmd->params[0]; in dpaa2_rc_get_obj_descriptor()
825 args->obj_id = obj_id; in dpaa2_rc_get_obj_descriptor()
826 memcpy(args->type, type, min(strlen(type) + 1, TYPE_LEN_MAX)); in dpaa2_rc_get_obj_descriptor()
830 pobj = (struct dpaa2_obj_resp *) &cmd->params[0]; in dpaa2_rc_get_obj_descriptor()
831 obj->id = pobj->id; in dpaa2_rc_get_obj_descriptor()
832 obj->vendor = pobj->vendor; in dpaa2_rc_get_obj_descriptor()
833 obj->irq_count = pobj->irq_count; in dpaa2_rc_get_obj_descriptor()
834 obj->reg_count = pobj->reg_count; in dpaa2_rc_get_obj_descriptor()
835 obj->state = pobj->state; in dpaa2_rc_get_obj_descriptor()
836 obj->ver_major = pobj->ver_major; in dpaa2_rc_get_obj_descriptor()
837 obj->ver_minor = pobj->ver_minor; in dpaa2_rc_get_obj_descriptor()
838 obj->flags = pobj->flags; in dpaa2_rc_get_obj_descriptor()
839 obj->type = dpaa2_stot((const char *) pobj->type); in dpaa2_rc_get_obj_descriptor()
840 memcpy(obj->label, pobj->label, sizeof(pobj->label)); in dpaa2_rc_get_obj_descriptor()
844 if (obj->type == DPAA2_DEV_NOTYPE) in dpaa2_rc_get_obj_descriptor()
868 pattr = (struct dpaa2_rc_attr *) &cmd->params[0]; in dpaa2_rc_get_attributes()
869 attr->cont_id = pattr->cont_id; in dpaa2_rc_get_attributes()
870 attr->portal_id = pattr->portal_id; in dpaa2_rc_get_attributes()
871 attr->options = pattr->options; in dpaa2_rc_get_attributes()
872 attr->icid = pattr->icid; in dpaa2_rc_get_attributes()
913 if (!portal->rc_api_major && !portal->rc_api_minor) { in dpaa2_rc_get_obj_region()
918 portal->rc_api_major = api_major; in dpaa2_rc_get_obj_region()
919 portal->rc_api_minor = api_minor; in dpaa2_rc_get_obj_region()
921 api_major = portal->rc_api_major; in dpaa2_rc_get_obj_region()
922 api_minor = portal->rc_api_minor; in dpaa2_rc_get_obj_region()
941 args = (struct obj_region_args *) &cmd->params[0]; in dpaa2_rc_get_obj_region()
942 args->obj_id = obj_id; in dpaa2_rc_get_obj_region()
943 args->reg_idx = reg_idx; in dpaa2_rc_get_obj_region()
944 memcpy(args->type, type, min(strlen(type) + 1, TYPE_LEN_MAX)); in dpaa2_rc_get_obj_region()
948 resp = (struct obj_region *) &cmd->params[0]; in dpaa2_rc_get_obj_region()
949 reg->base_paddr = resp->base_paddr; in dpaa2_rc_get_obj_region()
950 reg->base_offset = resp->base_offset; in dpaa2_rc_get_obj_region()
951 reg->size = resp->size; in dpaa2_rc_get_obj_region()
952 reg->flags = resp->flags; in dpaa2_rc_get_obj_region()
953 reg->type = resp->type & 0xFu; in dpaa2_rc_get_obj_region()
975 resp = (struct rc_api_version *) &cmd->params[0]; in dpaa2_rc_get_api_version()
976 *major = resp->major; in dpaa2_rc_get_api_version()
977 *minor = resp->minor; in dpaa2_rc_get_api_version()
1016 args = (struct set_obj_irq_args *) &cmd->params[0]; in dpaa2_rc_set_obj_irq()
1017 args->irq_idx = irq_idx; in dpaa2_rc_set_obj_irq()
1018 args->addr = addr; in dpaa2_rc_set_obj_irq()
1019 args->data = data; in dpaa2_rc_set_obj_irq()
1020 args->irq_usr = irq_usr; in dpaa2_rc_set_obj_irq()
1021 args->obj_id = obj_id; in dpaa2_rc_set_obj_irq()
1022 memcpy(args->type, type, min(strlen(type) + 1, TYPE_LEN_MAX)); in dpaa2_rc_set_obj_irq()
1053 args = (struct get_conn_args *) &cmd->params[0]; in dpaa2_rc_get_conn()
1054 args->ep1_id = ep1_desc->obj_id; in dpaa2_rc_get_conn()
1055 args->ep1_ifid = ep1_desc->if_id; in dpaa2_rc_get_conn()
1057 strncpy(args->ep1_type, dpaa2_ttos(ep1_desc->type), 16); in dpaa2_rc_get_conn()
1061 resp = (struct get_conn_resp *) &cmd->params[0]; in dpaa2_rc_get_conn()
1062 ep2_desc->obj_id = resp->ep2_id; in dpaa2_rc_get_conn()
1063 ep2_desc->if_id = resp->ep2_ifid; in dpaa2_rc_get_conn()
1064 ep2_desc->type = dpaa2_stot((const char *) resp->ep2_type); in dpaa2_rc_get_conn()
1066 *link_stat = resp->link_stat; in dpaa2_rc_get_conn()
1083 cmd->params[0] = dpni_id; in dpaa2_rc_ni_open()
1086 hdr = (struct dpaa2_cmd_header *) &cmd->header; in dpaa2_rc_ni_open()
1087 *token = hdr->token; in dpaa2_rc_ni_open()
1138 *major = cmd->params[0] & 0xFFFFU; in dpaa2_rc_ni_get_api_version()
1139 *minor = (cmd->params[0] >> 16) & 0xFFFFU; in dpaa2_rc_ni_get_api_version()
1188 resp = (struct ni_attr *) &cmd->params[0]; in dpaa2_rc_ni_get_attributes()
1190 attr->options = resp->options; in dpaa2_rc_ni_get_attributes()
1191 attr->wriop_ver = resp->wriop_ver; in dpaa2_rc_ni_get_attributes()
1193 attr->entries.fs = resp->fs_entries; in dpaa2_rc_ni_get_attributes()
1194 attr->entries.mac = resp->mac_entries; in dpaa2_rc_ni_get_attributes()
1195 attr->entries.vlan = resp->vlan_entries; in dpaa2_rc_ni_get_attributes()
1196 attr->entries.qos = resp->qos_entries; in dpaa2_rc_ni_get_attributes()
1198 attr->num.queues = resp->num_queues; in dpaa2_rc_ni_get_attributes()
1199 attr->num.rx_tcs = resp->num_rx_tcs; in dpaa2_rc_ni_get_attributes()
1200 attr->num.tx_tcs = resp->num_tx_tcs; in dpaa2_rc_ni_get_attributes()
1201 attr->num.channels = resp->num_channels; in dpaa2_rc_ni_get_attributes()
1202 attr->num.cgs = resp->num_cgs; in dpaa2_rc_ni_get_attributes()
1204 attr->key_size.fs = resp->fs_key_size; in dpaa2_rc_ni_get_attributes()
1205 attr->key_size.qos = resp->qos_key_size; in dpaa2_rc_ni_get_attributes()
1233 args = (struct set_buf_layout_args *) &cmd->params[0]; in dpaa2_rc_ni_set_buf_layout()
1234 args->queue_type = (uint8_t) bl->queue_type; in dpaa2_rc_ni_set_buf_layout()
1235 args->options = bl->options; in dpaa2_rc_ni_set_buf_layout()
1236 args->params = 0; in dpaa2_rc_ni_set_buf_layout()
1237 args->priv_data_size = bl->pd_size; in dpaa2_rc_ni_set_buf_layout()
1238 args->data_align = bl->fd_align; in dpaa2_rc_ni_set_buf_layout()
1239 args->head_room = bl->head_size; in dpaa2_rc_ni_set_buf_layout()
1240 args->tail_room = bl->tail_size; in dpaa2_rc_ni_set_buf_layout()
1242 args->params |= bl->pass_timestamp ? 1U : 0U; in dpaa2_rc_ni_set_buf_layout()
1243 args->params |= bl->pass_parser_result ? 2U : 0U; in dpaa2_rc_ni_set_buf_layout()
1244 args->params |= bl->pass_frame_status ? 4U : 0U; in dpaa2_rc_ni_set_buf_layout()
1245 args->params |= bl->pass_sw_opaque ? 8U : 0U; in dpaa2_rc_ni_set_buf_layout()
1262 *offset = cmd->params[0] & 0xFFFFU; in dpaa2_rc_ni_get_tx_data_offset()
1279 mac[0] = (cmd->params[0] >> 56) & 0xFFU; in dpaa2_rc_ni_get_port_mac_addr()
1280 mac[1] = (cmd->params[0] >> 48) & 0xFFU; in dpaa2_rc_ni_get_port_mac_addr()
1281 mac[2] = (cmd->params[0] >> 40) & 0xFFU; in dpaa2_rc_ni_get_port_mac_addr()
1282 mac[3] = (cmd->params[0] >> 32) & 0xFFU; in dpaa2_rc_ni_get_port_mac_addr()
1283 mac[4] = (cmd->params[0] >> 24) & 0xFFU; in dpaa2_rc_ni_get_port_mac_addr()
1284 mac[5] = (cmd->params[0] >> 16) & 0xFFU; in dpaa2_rc_ni_get_port_mac_addr()
1303 args = (struct set_prim_mac_args *) &cmd->params[0]; in dpaa2_rc_ni_set_prim_mac_addr()
1305 args->mac[i - 1] = mac[ETHER_ADDR_LEN - i]; in dpaa2_rc_ni_set_prim_mac_addr()
1326 resp = (struct get_prim_mac_resp *) &cmd->params[0]; in dpaa2_rc_ni_get_prim_mac_addr()
1328 mac[ETHER_ADDR_LEN - i] = resp->mac[i - 1]; in dpaa2_rc_ni_get_prim_mac_addr()
1351 args = (struct link_cfg_args *) &cmd->params[0]; in dpaa2_rc_ni_set_link_cfg()
1352 args->rate = cfg->rate; in dpaa2_rc_ni_set_link_cfg()
1353 args->options = cfg->options; in dpaa2_rc_ni_set_link_cfg()
1354 args->adv_speeds = cfg->adv_speeds; in dpaa2_rc_ni_set_link_cfg()
1379 resp = (struct link_cfg_resp *) &cmd->params[0]; in dpaa2_rc_ni_get_link_cfg()
1380 cfg->rate = resp->rate; in dpaa2_rc_ni_get_link_cfg()
1381 cfg->options = resp->options; in dpaa2_rc_ni_get_link_cfg()
1382 cfg->adv_speeds = resp->adv_speeds; in dpaa2_rc_ni_get_link_cfg()
1411 resp = (struct link_state_resp *) &cmd->params[0]; in dpaa2_rc_ni_get_link_state()
1412 state->options = resp->options; in dpaa2_rc_ni_get_link_state()
1413 state->adv_speeds = resp->advert; in dpaa2_rc_ni_get_link_state()
1414 state->sup_speeds = resp->supported; in dpaa2_rc_ni_get_link_state()
1415 state->rate = resp->rate; in dpaa2_rc_ni_get_link_state()
1417 state->link_up = resp->flags & 0x1u ? true : false; in dpaa2_rc_ni_get_link_state()
1418 state->state_valid = resp->flags & 0x2u ? true : false; in dpaa2_rc_ni_get_link_state()
1443 args = (struct qos_table_args *) &cmd->params[0]; in dpaa2_rc_ni_set_qos_table()
1444 args->default_tc = tbl->default_tc; in dpaa2_rc_ni_set_qos_table()
1445 args->kcfg_busaddr = tbl->kcfg_busaddr; in dpaa2_rc_ni_set_qos_table()
1447 args->options |= tbl->discard_on_miss ? 1U : 0U; in dpaa2_rc_ni_set_qos_table()
1448 args->options |= tbl->keep_entries ? 2U : 0U; in dpaa2_rc_ni_set_qos_table()
1472 uint8_t pool_as; /* assigning: 0 - QPRI, 1 - QDBIN */ in dpaa2_rc_ni_set_pools()
1484 args = (struct set_pools_args *) &cmd->params[0]; in dpaa2_rc_ni_set_pools()
1485 args->pools_num = cfg->pools_num < DPAA2_NI_MAX_POOLS in dpaa2_rc_ni_set_pools()
1486 ? cfg->pools_num : DPAA2_NI_MAX_POOLS; in dpaa2_rc_ni_set_pools()
1487 for (uint32_t i = 0; i < args->pools_num; i++) { in dpaa2_rc_ni_set_pools()
1488 args->bp_obj_id[i] = cfg->pools[i].bp_obj_id; in dpaa2_rc_ni_set_pools()
1489 args->buf_sz[i] = cfg->pools[i].buf_sz; in dpaa2_rc_ni_set_pools()
1490 args->backup_pool_mask |= (cfg->pools[i].backup_flag & 1) << i; in dpaa2_rc_ni_set_pools()
1511 args = (struct err_behavior_args *) &cmd->params[0]; in dpaa2_rc_ni_set_err_behavior()
1512 args->err_mask = cfg->err_mask; in dpaa2_rc_ni_set_err_behavior()
1514 args->flags |= cfg->set_err_fas ? 0x10u : 0u; in dpaa2_rc_ni_set_err_behavior()
1515 args->flags |= ((uint8_t) cfg->action) & 0x0Fu; in dpaa2_rc_ni_set_err_behavior()
1552 args = (struct get_queue_args *) &cmd->params[0]; in dpaa2_rc_ni_get_queue()
1553 args->queue_type = (uint8_t) cfg->type; in dpaa2_rc_ni_get_queue()
1554 args->tc = cfg->tc; in dpaa2_rc_ni_get_queue()
1555 args->idx = cfg->idx; in dpaa2_rc_ni_get_queue()
1556 args->chan_id = cfg->chan_id; in dpaa2_rc_ni_get_queue()
1560 resp = (struct get_queue_resp *) &cmd->params[0]; in dpaa2_rc_ni_get_queue()
1562 cfg->dest_id = resp->dest_id; in dpaa2_rc_ni_get_queue()
1563 cfg->priority = resp->priority; in dpaa2_rc_ni_get_queue()
1564 cfg->flow_ctx = resp->flc; in dpaa2_rc_ni_get_queue()
1565 cfg->user_ctx = resp->user_ctx; in dpaa2_rc_ni_get_queue()
1566 cfg->fqid = resp->fqid; in dpaa2_rc_ni_get_queue()
1567 cfg->qdbin = resp->qdbin; in dpaa2_rc_ni_get_queue()
1568 cfg->cgid = resp->cgid; in dpaa2_rc_ni_get_queue()
1570 cfg->dest_type = (enum dpaa2_ni_dest_type) resp->flags & 0x0Fu; in dpaa2_rc_ni_get_queue()
1571 cfg->cgid_valid = (resp->flags & 0x20u) > 0u ? true : false; in dpaa2_rc_ni_get_queue()
1572 cfg->stash_control = (resp->flags & 0x40u) > 0u ? true : false; in dpaa2_rc_ni_get_queue()
1573 cfg->hold_active = (resp->flags & 0x80u) > 0u ? true : false; in dpaa2_rc_ni_get_queue()
1606 args = (struct set_queue_args *) &cmd->params[0]; in dpaa2_rc_ni_set_queue()
1607 args->queue_type = (uint8_t) cfg->type; in dpaa2_rc_ni_set_queue()
1608 args->tc = cfg->tc; in dpaa2_rc_ni_set_queue()
1609 args->idx = cfg->idx; in dpaa2_rc_ni_set_queue()
1610 args->options = cfg->options; in dpaa2_rc_ni_set_queue()
1611 args->dest_id = cfg->dest_id; in dpaa2_rc_ni_set_queue()
1612 args->priority = cfg->priority; in dpaa2_rc_ni_set_queue()
1613 args->flc = cfg->flow_ctx; in dpaa2_rc_ni_set_queue()
1614 args->user_ctx = cfg->user_ctx; in dpaa2_rc_ni_set_queue()
1615 args->cgid = cfg->cgid; in dpaa2_rc_ni_set_queue()
1616 args->chan_id = cfg->chan_id; in dpaa2_rc_ni_set_queue()
1618 args->flags |= (uint8_t)(cfg->dest_type & 0x0Fu); in dpaa2_rc_ni_set_queue()
1619 args->flags |= cfg->stash_control ? 0x40u : 0u; in dpaa2_rc_ni_set_queue()
1620 args->flags |= cfg->hold_active ? 0x80u : 0u; in dpaa2_rc_ni_set_queue()
1643 args = (struct get_qdid_args *) &cmd->params[0]; in dpaa2_rc_ni_get_qdid()
1644 args->queue_type = (uint8_t) type; in dpaa2_rc_ni_get_qdid()
1648 resp = (struct get_qdid_resp *) &cmd->params[0]; in dpaa2_rc_ni_get_qdid()
1649 *qdid = resp->qdid; in dpaa2_rc_ni_get_qdid()
1673 args = (struct add_mac_args *) &cmd->params[0]; in dpaa2_rc_ni_add_mac_addr()
1675 args->mac[i - 1] = mac[ETHER_ADDR_LEN - i]; in dpaa2_rc_ni_add_mac_addr()
1696 args = (struct rem_mac_args *) &cmd->params[0]; in dpaa2_rc_ni_remove_mac_addr()
1698 args->mac[i - 1] = mac[ETHER_ADDR_LEN - i]; in dpaa2_rc_ni_remove_mac_addr()
1717 args = (struct clear_mac_filters_args *) &cmd->params[0]; in dpaa2_rc_ni_clear_mac_filters()
1718 args->flags |= rm_uni ? 0x1 : 0x0; in dpaa2_rc_ni_clear_mac_filters()
1719 args->flags |= rm_multi ? 0x2 : 0x0; in dpaa2_rc_ni_clear_mac_filters()
1738 args = (struct set_mfl_args *) &cmd->params[0]; in dpaa2_rc_ni_set_mfl()
1739 args->length = length; in dpaa2_rc_ni_set_mfl()
1760 args = (struct set_ofl_args *) &cmd->params[0]; in dpaa2_rc_ni_set_offload()
1761 args->ofl_type = (uint8_t) ofl_type; in dpaa2_rc_ni_set_offload()
1762 args->config = en ? 1u : 0u; in dpaa2_rc_ni_set_offload()
1782 args = (struct set_irq_mask_args *) &cmd->params[0]; in dpaa2_rc_ni_set_irq_mask()
1783 args->mask = mask; in dpaa2_rc_ni_set_irq_mask()
1784 args->irq_idx = irq_idx; in dpaa2_rc_ni_set_irq_mask()
1804 args = (struct set_irq_enable_args *) &cmd->params[0]; in dpaa2_rc_ni_set_irq_enable()
1805 args->en = en ? 1u : 0u; in dpaa2_rc_ni_set_irq_enable()
1806 args->irq_idx = irq_idx; in dpaa2_rc_ni_set_irq_enable()
1830 args = (struct get_irq_stat_args *) &cmd->params[0]; in dpaa2_rc_ni_get_irq_status()
1831 args->status = *status; in dpaa2_rc_ni_get_irq_status()
1832 args->irq_idx = irq_idx; in dpaa2_rc_ni_get_irq_status()
1836 resp = (struct get_irq_stat_resp *) &cmd->params[0]; in dpaa2_rc_ni_get_irq_status()
1837 *status = resp->status; in dpaa2_rc_ni_get_irq_status()
1857 args = (struct set_uni_promisc_args *) &cmd->params[0]; in dpaa2_rc_ni_set_uni_promisc()
1858 args->en = en ? 1u : 0u; in dpaa2_rc_ni_set_uni_promisc()
1878 args = (struct set_multi_promisc_args *) &cmd->params[0]; in dpaa2_rc_ni_set_multi_promisc()
1879 args->en = en ? 1u : 0u; in dpaa2_rc_ni_set_multi_promisc()
1903 args = (struct get_statistics_args *) &cmd->params[0]; in dpaa2_rc_ni_get_statistics()
1904 args->page = page; in dpaa2_rc_ni_get_statistics()
1905 args->param = param; in dpaa2_rc_ni_get_statistics()
1909 resp = (struct get_statistics_resp *) &cmd->params[0]; in dpaa2_rc_ni_get_statistics()
1911 cnt[i] = resp->cnt[i]; in dpaa2_rc_ni_get_statistics()
1937 args = (struct set_rx_tc_dist_args *) &cmd->params[0]; in dpaa2_rc_ni_set_rx_tc_dist()
1938 args->dist_size = dist_size; in dpaa2_rc_ni_set_rx_tc_dist()
1939 args->tc = tc; in dpaa2_rc_ni_set_rx_tc_dist()
1940 args->ma_dm = ((uint8_t) dist_mode) & 0x0Fu; in dpaa2_rc_ni_set_rx_tc_dist()
1941 args->key_cfg_iova = key_cfg_buf; in dpaa2_rc_ni_set_rx_tc_dist()
1957 cmd->params[0] = dpio_id; in dpaa2_rc_io_open()
1960 hdr = (struct dpaa2_cmd_header *) &cmd->header; in dpaa2_rc_io_open()
1961 *token = hdr->token; in dpaa2_rc_io_open()
2035 pattr = (struct dpaa2_io_attr *) &cmd->params[0]; in dpaa2_rc_io_get_attributes()
2037 attr->swp_ce_paddr = pattr->swp_ce_paddr; in dpaa2_rc_io_get_attributes()
2038 attr->swp_ci_paddr = pattr->swp_ci_paddr; in dpaa2_rc_io_get_attributes()
2039 attr->swp_version = pattr->swp_version; in dpaa2_rc_io_get_attributes()
2040 attr->swp_clk = pattr->swp_clk; in dpaa2_rc_io_get_attributes()
2041 attr->id = pattr->id; in dpaa2_rc_io_get_attributes()
2042 attr->swp_id = pattr->swp_id; in dpaa2_rc_io_get_attributes()
2043 attr->priors_num = pattr->priors_num; in dpaa2_rc_io_get_attributes()
2044 attr->chan_mode = (enum dpaa2_io_chan_mode) in dpaa2_rc_io_get_attributes()
2045 pattr->chan_mode; in dpaa2_rc_io_get_attributes()
2067 args = (struct set_irq_mask_args *) &cmd->params[0]; in dpaa2_rc_io_set_irq_mask()
2068 args->mask = mask; in dpaa2_rc_io_set_irq_mask()
2069 args->irq_idx = irq_idx; in dpaa2_rc_io_set_irq_mask()
2094 args = (struct get_irq_stat_args *) &cmd->params[0]; in dpaa2_rc_io_get_irq_status()
2095 args->status = *status; in dpaa2_rc_io_get_irq_status()
2096 args->irq_idx = irq_idx; in dpaa2_rc_io_get_irq_status()
2100 resp = (struct get_irq_stat_resp *) &cmd->params[0]; in dpaa2_rc_io_get_irq_status()
2101 *status = resp->status; in dpaa2_rc_io_get_irq_status()
2123 args = (struct set_irq_enable_args *) &cmd->params[0]; in dpaa2_rc_io_set_irq_enable()
2124 args->en = en ? 1u : 0u; in dpaa2_rc_io_set_irq_enable()
2125 args->irq_idx = irq_idx; in dpaa2_rc_io_set_irq_enable()
2148 args = (struct add_static_dq_chan_args *) &cmd->params[0]; in dpaa2_rc_io_add_static_dq_chan()
2149 args->dpcon_id = dpcon_id; in dpaa2_rc_io_add_static_dq_chan()
2153 resp = (struct add_static_dq_chan_resp *) &cmd->params[0]; in dpaa2_rc_io_add_static_dq_chan()
2154 *chan_idx = resp->chan_idx; in dpaa2_rc_io_add_static_dq_chan()
2171 cmd->params[0] = dpbp_id; in dpaa2_rc_bp_open()
2174 hdr = (struct dpaa2_cmd_header *) &cmd->header; in dpaa2_rc_bp_open()
2175 *token = hdr->token; in dpaa2_rc_bp_open()
2242 pattr = (struct dpaa2_bp_attr *) &cmd->params[0]; in dpaa2_rc_bp_get_attributes()
2243 attr->id = pattr->id; in dpaa2_rc_bp_get_attributes()
2244 attr->bpid = pattr->bpid; in dpaa2_rc_bp_get_attributes()
2261 cmd->params[0] = dpmac_id; in dpaa2_rc_mac_open()
2264 hdr = (struct dpaa2_cmd_header *) &cmd->header; in dpaa2_rc_mac_open()
2265 *token = hdr->token; in dpaa2_rc_mac_open()
2310 args = (struct mdio_read_args *) &cmd->params[0]; in dpaa2_rc_mac_mdio_read()
2311 args->phy = phy; in dpaa2_rc_mac_mdio_read()
2312 args->reg = reg; in dpaa2_rc_mac_mdio_read()
2313 args->clause = 0; in dpaa2_rc_mac_mdio_read()
2317 *val = cmd->params[0] & 0xFFFF; in dpaa2_rc_mac_mdio_read()
2339 args = (struct mdio_write_args *) &cmd->params[0]; in dpaa2_rc_mac_mdio_write()
2340 args->phy = phy; in dpaa2_rc_mac_mdio_write()
2341 args->reg = reg; in dpaa2_rc_mac_mdio_write()
2342 args->val = val; in dpaa2_rc_mac_mdio_write()
2343 args->clause = 0; in dpaa2_rc_mac_mdio_write()
2360 mac[0] = (cmd->params[0] >> 56) & 0xFFU; in dpaa2_rc_mac_get_addr()
2361 mac[1] = (cmd->params[0] >> 48) & 0xFFU; in dpaa2_rc_mac_get_addr()
2362 mac[2] = (cmd->params[0] >> 40) & 0xFFU; in dpaa2_rc_mac_get_addr()
2363 mac[3] = (cmd->params[0] >> 32) & 0xFFU; in dpaa2_rc_mac_get_addr()
2364 mac[4] = (cmd->params[0] >> 24) & 0xFFU; in dpaa2_rc_mac_get_addr()
2365 mac[5] = (cmd->params[0] >> 16) & 0xFFU; in dpaa2_rc_mac_get_addr()
2405 resp = (struct mac_attr_resp *) &cmd->params[0]; in dpaa2_rc_mac_get_attributes()
2406 attr->id = resp->id; in dpaa2_rc_mac_get_attributes()
2407 attr->max_rate = resp->max_rate; in dpaa2_rc_mac_get_attributes()
2408 attr->eth_if = resp->eth_if; in dpaa2_rc_mac_get_attributes()
2409 attr->link_type = resp->link_type; in dpaa2_rc_mac_get_attributes()
2435 args = (struct mac_set_link_args *) &cmd->params[0]; in dpaa2_rc_mac_set_link_state()
2436 args->options = state->options; in dpaa2_rc_mac_set_link_state()
2437 args->rate = state->rate; in dpaa2_rc_mac_set_link_state()
2438 args->supported = state->supported; in dpaa2_rc_mac_set_link_state()
2439 args->advert = state->advert; in dpaa2_rc_mac_set_link_state()
2441 args->flags |= state->up ? 0x1u : 0u; in dpaa2_rc_mac_set_link_state()
2442 args->flags |= state->state_valid ? 0x2u : 0u; in dpaa2_rc_mac_set_link_state()
2463 args = (struct set_irq_mask_args *) &cmd->params[0]; in dpaa2_rc_mac_set_irq_mask()
2464 args->mask = mask; in dpaa2_rc_mac_set_irq_mask()
2465 args->irq_idx = irq_idx; in dpaa2_rc_mac_set_irq_mask()
2486 args = (struct set_irq_enable_args *) &cmd->params[0]; in dpaa2_rc_mac_set_irq_enable()
2487 args->en = en ? 1u : 0u; in dpaa2_rc_mac_set_irq_enable()
2488 args->irq_idx = irq_idx; in dpaa2_rc_mac_set_irq_enable()
2513 args = (struct get_irq_stat_args *) &cmd->params[0]; in dpaa2_rc_mac_get_irq_status()
2514 args->status = *status; in dpaa2_rc_mac_get_irq_status()
2515 args->irq_idx = irq_idx; in dpaa2_rc_mac_get_irq_status()
2519 resp = (struct get_irq_stat_resp *) &cmd->params[0]; in dpaa2_rc_mac_get_irq_status()
2520 *status = resp->status; in dpaa2_rc_mac_get_irq_status()
2537 cmd->params[0] = dpcon_id; in dpaa2_rc_con_open()
2540 hdr = (struct dpaa2_cmd_header *) &cmd->header; in dpaa2_rc_con_open()
2541 *token = hdr->token; in dpaa2_rc_con_open()
2611 resp = (struct con_attr_resp *) &cmd->params[0]; in dpaa2_rc_con_get_attributes()
2612 attr->id = resp->id; in dpaa2_rc_con_get_attributes()
2613 attr->chan_id = resp->chan_id; in dpaa2_rc_con_get_attributes()
2614 attr->prior_num = resp->prior_num; in dpaa2_rc_con_get_attributes()
2637 args = (struct set_notif_args *) &cmd->params[0]; in dpaa2_rc_con_set_notif()
2638 args->dpio_id = cfg->dpio_id; in dpaa2_rc_con_set_notif()
2639 args->prior = cfg->prior; in dpaa2_rc_con_set_notif()
2640 args->ctx = cfg->qman_ctx; in dpaa2_rc_con_set_notif()
2663 args = (struct mcp_create_args *) &cmd->params[0]; in dpaa2_rc_mcp_create()
2664 args->portal_id = portal_id; in dpaa2_rc_mcp_create()
2665 args->options = options; in dpaa2_rc_mcp_create()
2669 resp = (struct mcp_create_resp *) &cmd->params[0]; in dpaa2_rc_mcp_create()
2670 *dpmcp_id = resp->dpmcp_id; in dpaa2_rc_mcp_create()
2688 args = (struct mcp_destroy_args *) &cmd->params[0]; in dpaa2_rc_mcp_destroy()
2689 args->dpmcp_id = dpmcp_id; in dpaa2_rc_mcp_destroy()
2705 cmd->params[0] = dpmcp_id; in dpaa2_rc_mcp_open()
2708 hdr = (struct dpaa2_cmd_header *) &cmd->header; in dpaa2_rc_mcp_open()
2709 *token = hdr->token; in dpaa2_rc_mcp_open()
2743 device_t rcdev = sc->dev; in dpaa2_rc_discover()
2744 device_t child = sc->dev; in dpaa2_rc_discover()
2766 rc = DPAA2_CMD_MNG_GET_CONTAINER_ID(rcdev, child, &cmd, &sc->cont_id); in dpaa2_rc_discover()
2773 device_printf(rcdev, "Resource container ID: %u\n", sc->cont_id); in dpaa2_rc_discover()
2777 rc = DPAA2_CMD_RC_OPEN(rcdev, child, &cmd, sc->cont_id, &rc_token); in dpaa2_rc_discover()
2780 "error=%d\n", __func__, sc->cont_id, rc); in dpaa2_rc_discover()
2788 "cont_id=%u, error=%d\n", __func__, sc->cont_id, rc); in dpaa2_rc_discover()
2799 "container: cont_id=%u, error=%d\n", __func__, sc->cont_id, in dpaa2_rc_discover()
2809 rcinfo->id = dprc_attr.cont_id; in dpaa2_rc_discover()
2810 rcinfo->portal_id = dprc_attr.portal_id; in dpaa2_rc_discover()
2811 rcinfo->icid = dprc_attr.icid; in dpaa2_rc_discover()
2816 * TODO: Discover DPAA2 objects on-demand. in dpaa2_rc_discover()
2895 rcdev = sc->dev; in dpaa2_rc_add_child()
2898 switch (obj->type) { in dpaa2_rc_add_child()
2908 dev = device_add_child(rcdev, devclass, -1); in dpaa2_rc_add_child()
2911 "object: type=%s, id=%u\n", __func__, dpaa2_ttos(obj->type), in dpaa2_rc_add_child()
2912 obj->id); in dpaa2_rc_add_child()
2921 "for: type=%s, id=%u\n", __func__, dpaa2_ttos(obj->type), in dpaa2_rc_add_child()
2922 obj->id); in dpaa2_rc_add_child()
2927 dinfo->pdev = rcdev; in dpaa2_rc_add_child()
2928 dinfo->dev = dev; in dpaa2_rc_add_child()
2929 dinfo->id = obj->id; in dpaa2_rc_add_child()
2930 dinfo->dtype = obj->type; in dpaa2_rc_add_child()
2931 dinfo->portal = NULL; in dpaa2_rc_add_child()
2933 dinfo->icid = rcinfo->icid; in dpaa2_rc_add_child()
2934 dinfo->portal_id = rcinfo->portal_id; in dpaa2_rc_add_child()
2936 dinfo->msi.msi_msgnum = obj->irq_count; in dpaa2_rc_add_child()
2937 dinfo->msi.msi_alloc = 0; in dpaa2_rc_add_child()
2938 dinfo->msi.msi_handlers = 0; in dpaa2_rc_add_child()
2941 resource_list_init(&dinfo->resources); in dpaa2_rc_add_child()
2943 /* Add DPAA2-specific resources to the resource list. */ in dpaa2_rc_add_child()
2944 for (; res_spec && res_spec->type != -1; res_spec++) { in dpaa2_rc_add_child()
2945 if (res_spec->type < DPAA2_DEV_MC) in dpaa2_rc_add_child()
2946 continue; /* Skip non-DPAA2 resource. */ in dpaa2_rc_add_child()
2947 rid = res_spec->rid; in dpaa2_rc_add_child()
2950 if (res_spec->type == DPAA2_DEV_IO && dpio_n >= mp_ncpus) { in dpaa2_rc_add_child()
2954 if (res_spec->type == DPAA2_DEV_CON && dpcon_n >= mp_ncpus) { in dpaa2_rc_add_child()
2959 error = dpaa2_rc_add_res(rcdev, dev, res_spec->type, &rid, in dpaa2_rc_add_child()
2960 res_spec->flags); in dpaa2_rc_add_child()
2965 if (res_spec->type == DPAA2_DEV_IO) in dpaa2_rc_add_child()
2967 if (res_spec->type == DPAA2_DEV_CON) in dpaa2_rc_add_child()
2998 rcdev = sc->dev; in dpaa2_rc_add_managed_child()
2999 child = sc->dev; in dpaa2_rc_add_managed_child()
3002 switch (obj->type) { in dpaa2_rc_add_managed_child()
3034 dev = device_add_child(rcdev, devclass, -1); in dpaa2_rc_add_managed_child()
3037 "object: type=%s, id=%u\n", __func__, dpaa2_ttos(obj->type), in dpaa2_rc_add_managed_child()
3038 obj->id); in dpaa2_rc_add_managed_child()
3047 "for: type=%s, id=%u\n", __func__, dpaa2_ttos(obj->type), in dpaa2_rc_add_managed_child()
3048 obj->id); in dpaa2_rc_add_managed_child()
3053 dinfo->pdev = rcdev; in dpaa2_rc_add_managed_child()
3054 dinfo->dev = dev; in dpaa2_rc_add_managed_child()
3055 dinfo->id = obj->id; in dpaa2_rc_add_managed_child()
3056 dinfo->dtype = obj->type; in dpaa2_rc_add_managed_child()
3057 dinfo->portal = NULL; in dpaa2_rc_add_managed_child()
3059 dinfo->icid = rcinfo->icid; in dpaa2_rc_add_managed_child()
3060 dinfo->portal_id = rcinfo->portal_id; in dpaa2_rc_add_managed_child()
3062 dinfo->msi.msi_msgnum = obj->irq_count; in dpaa2_rc_add_managed_child()
3063 dinfo->msi.msi_alloc = 0; in dpaa2_rc_add_managed_child()
3064 dinfo->msi.msi_handlers = 0; in dpaa2_rc_add_managed_child()
3067 resource_list_init(&dinfo->resources); in dpaa2_rc_add_managed_child()
3070 for (uint8_t i = 0; i < obj->reg_count; i++) { in dpaa2_rc_add_managed_child()
3071 error = DPAA2_CMD_RC_GET_OBJ_REGION(rcdev, child, cmd, obj->id, in dpaa2_rc_add_managed_child()
3072 i, obj->type, ®); in dpaa2_rc_add_managed_child()
3076 __func__, dpaa2_ttos(obj->type), obj->id, i, error); in dpaa2_rc_add_managed_child()
3081 end = reg.base_paddr + reg.base_offset + reg.size - 1; in dpaa2_rc_add_managed_child()
3083 resource_list_add(&dinfo->resources, SYS_RES_MEMORY, i, start, in dpaa2_rc_add_managed_child()
3087 /* Add DPAA2-specific resources to the resource list. */ in dpaa2_rc_add_managed_child()
3088 for (; res_spec && res_spec->type != -1; res_spec++) { in dpaa2_rc_add_managed_child()
3089 if (res_spec->type < DPAA2_DEV_MC) in dpaa2_rc_add_managed_child()
3090 continue; /* Skip non-DPAA2 resource. */ in dpaa2_rc_add_managed_child()
3091 rid = res_spec->rid; in dpaa2_rc_add_managed_child()
3093 error = dpaa2_rc_add_res(rcdev, dev, res_spec->type, &rid, in dpaa2_rc_add_managed_child()
3094 res_spec->flags); in dpaa2_rc_add_managed_child()
3105 dpaa2_ttos(obj->type), obj->id, error); in dpaa2_rc_add_managed_child()
3131 rc = DPAA2_CMD_RC_OPEN(rcdev, child, &cmd, rcinfo->id, in dpaa2_rc_configure_irq()
3139 rc = DPAA2_CMD_RC_SET_OBJ_IRQ(rcdev, child, &cmd, rid - 1, addr, in dpaa2_rc_configure_irq()
3140 data, rid, dinfo->id, dinfo->dtype); in dpaa2_rc_configure_irq()
3179 args = (struct enable_irq_args *) &cmd->params[0]; in dpaa2_rc_enable_irq()
3180 args->irq_idx = irq_idx; in dpaa2_rc_enable_irq()
3181 args->enable = enable == 0u ? 0u : 1u; in dpaa2_rc_enable_irq()
3200 hdr = (struct dpaa2_cmd_header *) &cmd->header; in dpaa2_rc_exec_cmd()
3201 hdr->cmdid = cmdid; in dpaa2_rc_exec_cmd()
3202 hdr->status = DPAA2_CMD_STAT_READY; in dpaa2_rc_exec_cmd()
3218 if (hdr->status != DPAA2_CMD_STAT_OK) { in dpaa2_rc_exec_cmd()
3220 return (int)(hdr->status); in dpaa2_rc_exec_cmd()
3236 bus_write_8(mcp->map, sizeof(uint64_t) * i, cmd->params[i-1]); in dpaa2_rc_send_cmd()
3238 bus_barrier(mcp->map, 0, sizeof(struct dpaa2_cmd), in dpaa2_rc_send_cmd()
3242 bus_write_8(mcp->map, 0, cmd->header); in dpaa2_rc_send_cmd()
3260 val = bus_read_8(mcp->map, 0); in dpaa2_rc_wait_for_cmd()
3262 if (hdr->status != DPAA2_CMD_STAT_READY) { in dpaa2_rc_wait_for_cmd()
3273 cmd->header = val; in dpaa2_rc_wait_for_cmd()
3275 cmd->params[i-1] = in dpaa2_rc_wait_for_cmd()
3276 bus_read_8(mcp->map, i * sizeof(uint64_t)); in dpaa2_rc_wait_for_cmd()
3284 * @brief Reserve a DPAA2-specific device of the given devtype for the child.
3301 dpaa2_ttos(dinfo->dtype), dinfo->id); in dpaa2_rc_add_res()
3311 dpaa2_ttos(devtype), *rid, dpaa2_ttos(dinfo->dtype), in dpaa2_rc_add_res()
3312 dinfo->id); in dpaa2_rc_add_res()
3319 resource_list_add(&dinfo->resources, devtype, *rid, in dpaa2_rc_add_res()
3323 res = resource_list_reserve(&dinfo->resources, rcdev, child, devtype, in dpaa2_rc_add_res()
3329 dpaa2_ttos(dinfo->dtype), dinfo->id); in dpaa2_rc_add_res()
3339 dpaa2_ttos(devtype), *rid, dpaa2_ttos(dinfo->dtype), in dpaa2_rc_add_res()
3340 dinfo->id); in dpaa2_rc_add_res()
3358 if (rle->type == type) { in dpaa2_rc_print_type()
3359 dinfo = device_get_ivars((device_t) rle->start); in dpaa2_rc_print_type()
3363 dpaa2_ttos(dinfo->dtype)); in dpaa2_rc_print_type()
3365 if (dinfo->id == prev_id + 1) { in dpaa2_rc_print_type()
3368 retval += printf("-"); in dpaa2_rc_print_type()
3381 retval += printf("%u", dinfo->id); in dpaa2_rc_print_type()
3382 prev_id = dinfo->id; in dpaa2_rc_print_type()
3398 memset(cmd->params, 0, sizeof(cmd->params[0]) * in dpaa2_rc_reset_cmd_params()
3410 if (cinfo == NULL || dinfo == NULL || dinfo->dtype != DPAA2_DEV_RC) in dpaa2_rc_select_portal()
3412 return (cinfo->portal != NULL ? cinfo->portal : dinfo->portal); in dpaa2_rc_select_portal()
3438 /* Pseudo-PCI interface */