bus/fslmc: support scanning DPDMUX object
authorNipun Gupta <nipun.gupta@nxp.com>
Fri, 11 Jan 2019 12:24:52 +0000 (12:24 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 Jan 2019 16:44:29 +0000 (17:44 +0100)
Add support in bus and vfio to scan dpdmux type of objects

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
drivers/bus/fslmc/fslmc_bus.c
drivers/bus/fslmc/fslmc_vfio.c
drivers/bus/fslmc/rte_fslmc.h

index 565e014..fa15053 100644 (file)
@@ -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;
        }
index ce82a99..98768a4 100644 (file)
@@ -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
                         */
index cea5b78..5cfb245 100644 (file)
@@ -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,