From: Nipun Gupta <nipun.gu...@nxp.com>

Add support in bus and vfio to scan dpdmux type of objects

Signed-off-by: Nipun Gupta <nipun.gu...@nxp.com>
---
 drivers/bus/fslmc/fslmc_bus.c  | 5 ++++-
 drivers/bus/fslmc/fslmc_vfio.c | 2 ++
 drivers/bus/fslmc/rte_fslmc.h  | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 565e0148f..fa1505377 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -187,6 +187,8 @@ scan_one_fslmc_device(char *dev_name)
                dev->dev_type = DPAA2_MPORTAL;
        else if (!strncmp("dpdmai", t_ptr, 6))
                dev->dev_type = DPAA2_QDMA;
+       else if (!strncmp("dpdmux", t_ptr, 6))
+               dev->dev_type = DPAA2_MUX;
        else
                dev->dev_type = DPAA2_UNKNOWN;
 
@@ -245,7 +247,8 @@ rte_fslmc_parse(const char *name, void *addr)
            strncmp("dpio", t_ptr, 4) &&
            strncmp("dpci", t_ptr, 4) &&
            strncmp("dpmcp", t_ptr, 5) &&
-           strncmp("dpdmai", t_ptr, 6)) {
+           strncmp("dpdmai", t_ptr, 6) &&
+           strncmp("dpdmux", t_ptr, 6)) {
                DPAA2_BUS_ERR("Unknown or unsupported device");
                goto err_out;
        }
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index ce82a99f6..98768a46c 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -560,6 +560,7 @@ fslmc_process_iodevices(struct rte_dpaa2_device *dev)
        case DPAA2_IO:
        case DPAA2_CI:
        case DPAA2_BPOOL:
+       case DPAA2_MUX:
                TAILQ_FOREACH(object, &dpaa2_obj_list, next) {
                        if (dev->dev_type == object->dev_type)
                                object->create(dev_fd, &device_info,
@@ -691,6 +692,7 @@ fslmc_vfio_process_group(void)
                case DPAA2_IO:
                case DPAA2_CI:
                case DPAA2_BPOOL:
+               case DPAA2_MUX:
                        /* Call the object creation routine and remove the
                         * device entry from device list
                         */
diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h
index cea5b78f9..5cfb24505 100644
--- a/drivers/bus/fslmc/rte_fslmc.h
+++ b/drivers/bus/fslmc/rte_fslmc.h
@@ -66,6 +66,7 @@ enum rte_dpaa2_dev_type {
        DPAA2_CI,       /**< DPCI type device */
        DPAA2_MPORTAL,  /**< DPMCP type device */
        DPAA2_QDMA,     /**< DPDMAI type device */
+       DPAA2_MUX,      /**< DPDMUX type device */
        /* Unknown device placeholder */
        DPAA2_UNKNOWN,
        DPAA2_DEVTYPE_MAX,
-- 
2.17.1

Reply via email to