common/octeontx: move mbox to common folder
[dpdk.git] / drivers / event / octeontx / ssovf_evdev.c
index a108607..649ee79 100644 (file)
@@ -49,7 +49,7 @@ ssovf_mbox_dev_info(struct ssovf_mbox_dev_info *info)
        hdr.vfid = 0;
 
        memset(info, 0, len);
-       return octeontx_ssovf_mbox_send(&hdr, NULL, 0, info, len);
+       return octeontx_mbox_send(&hdr, NULL, 0, info, len);
 }
 
 struct ssovf_mbox_getwork_wait {
@@ -69,7 +69,7 @@ ssovf_mbox_getwork_tmo_set(uint32_t timeout_ns)
        hdr.vfid = 0;
 
        tmo_set.wait_ns = timeout_ns;
-       ret = octeontx_ssovf_mbox_send(&hdr, &tmo_set, len, NULL, 0);
+       ret = octeontx_mbox_send(&hdr, &tmo_set, len, NULL, 0);
        if (ret)
                ssovf_log_err("Failed to set getwork timeout(%d)", ret);
 
@@ -99,7 +99,7 @@ ssovf_mbox_priority_set(uint8_t queue, uint8_t prio)
        grp.affinity = 0xff;
        grp.priority = prio / 32; /* Normalize to 0 to 7 */
 
-       ret = octeontx_ssovf_mbox_send(&hdr, &grp, len, NULL, 0);
+       ret = octeontx_mbox_send(&hdr, &grp, len, NULL, 0);
        if (ret)
                ssovf_log_err("Failed to set grp=%d prio=%d", queue, prio);
 
@@ -125,7 +125,7 @@ ssovf_mbox_timeout_ticks(uint64_t ns, uint64_t *tmo_ticks)
 
        memset(&ns2iter, 0, len);
        ns2iter.wait_ns = ns;
-       ret = octeontx_ssovf_mbox_send(&hdr, &ns2iter, len, &ns2iter, len);
+       ret = octeontx_mbox_send(&hdr, &ns2iter, len, &ns2iter, len);
        if (ret < 0 || (ret != len)) {
                ssovf_log_err("Failed to get tmo ticks ns=%"PRId64"", ns);
                return -EIO;
@@ -276,7 +276,7 @@ ssovf_port_setup(struct rte_eventdev *dev, uint8_t port_id,
                return -ENOMEM;
        }
 
-       ws->base = octeontx_ssovf_bar(OCTEONTX_SSO_HWS, port_id, 0);
+       ws->base = ssovf_bar(OCTEONTX_SSO_HWS, port_id, 0);
        if (ws->base == NULL) {
                rte_free(ws);
                ssovf_log_err("Failed to get hws base addr port=%d", port_id);
@@ -290,7 +290,7 @@ ssovf_port_setup(struct rte_eventdev *dev, uint8_t port_id,
        ws->port = port_id;
 
        for (q = 0; q < edev->nb_event_queues; q++) {
-               ws->grps[q] = octeontx_ssovf_bar(OCTEONTX_SSO_GROUP, q, 2);
+               ws->grps[q] = ssovf_bar(OCTEONTX_SSO_GROUP, q, 2);
                if (ws->grps[q] == NULL) {
                        rte_free(ws);
                        ssovf_log_err("Failed to get grp%d base addr", q);
@@ -531,7 +531,7 @@ ssovf_start(struct rte_eventdev *dev)
                /* Consume all the events through HWS0 */
                ssows_flush_events(dev->data->ports[0], i);
 
-               base = octeontx_ssovf_bar(OCTEONTX_SSO_GROUP, i, 0);
+               base = ssovf_bar(OCTEONTX_SSO_GROUP, i, 0);
                base += SSO_VHGRP_QCTL;
                ssovf_write64(1, base); /* Enable SSO group */
        }
@@ -559,7 +559,7 @@ ssovf_stop(struct rte_eventdev *dev)
                /* Consume all the events through HWS0 */
                ssows_flush_events(dev->data->ports[0], i);
 
-               base = octeontx_ssovf_bar(OCTEONTX_SSO_GROUP, i, 0);
+               base = ssovf_bar(OCTEONTX_SSO_GROUP, i, 0);
                base += SSO_VHGRP_QCTL;
                ssovf_write64(0, base); /* Disable SSO group */
        }
@@ -621,7 +621,7 @@ static const struct rte_eventdev_ops ssovf_ops = {
 static int
 ssovf_vdev_probe(struct rte_vdev_device *vdev)
 {
-       struct octeontx_ssovf_info oinfo;
+       struct ssovf_info oinfo;
        struct ssovf_mbox_dev_info info;
        struct ssovf_evdev *edev;
        struct rte_eventdev *eventdev;
@@ -679,7 +679,7 @@ ssovf_vdev_probe(struct rte_vdev_device *vdev)
                return 0;
        }
 
-       ret = octeontx_ssovf_info(&oinfo);
+       ret = ssovf_info(&oinfo);
        if (ret) {
                ssovf_log_err("Failed to probe and validate ssovfs %d", ret);
                goto error;