diff options
-rw-r--r-- | drivers/staging/fsl_qbman/qman_config.c | 2 | ||||
-rw-r--r-- | drivers/staging/fsl_qbman/qman_driver.c | 23 | ||||
-rw-r--r-- | drivers/staging/fsl_qbman/qman_private.h | 1 |
3 files changed, 21 insertions, 5 deletions
diff --git a/drivers/staging/fsl_qbman/qman_config.c b/drivers/staging/fsl_qbman/qman_config.c index c924ab9..cfb41ef 100644 --- a/drivers/staging/fsl_qbman/qman_config.c +++ b/drivers/staging/fsl_qbman/qman_config.c @@ -646,6 +646,8 @@ static int __init fsl_qman_init(struct device_node *node) qman_ip_rev = QMAN_REV20; else if ((major == 3) && (minor == 0)) qman_ip_rev = QMAN_REV30; + else if ((major == 3) && (minor == 1)) + qman_ip_rev = QMAN_REV31; else { pr_warning("unknown Qman version, default to rev1.1\n"); qman_ip_rev = QMAN_REV11; diff --git a/drivers/staging/fsl_qbman/qman_driver.c b/drivers/staging/fsl_qbman/qman_driver.c index ac03892..4e85d4f 100644 --- a/drivers/staging/fsl_qbman/qman_driver.c +++ b/drivers/staging/fsl_qbman/qman_driver.c @@ -311,13 +311,26 @@ void qman_get_ip_revision(struct device_node *dn) ip_rev = QMAN_REV30; qman_portal_max = 25; } else if (of_device_is_compatible(dn, - "fsl,qman-portal-3.0.2")) { - ip_rev = QMAN_REV30; - qman_portal_max = 10; + "fsl,qman-portal-3.1.0")) { + ip_rev = QMAN_REV31; + qman_portal_max = 50; } else if (of_device_is_compatible(dn, - "fsl,qman-portal-3.0.3")) { - ip_rev = QMAN_REV30; + "fsl,qman-portal-3.1.1")) { + ip_rev = QMAN_REV31; + qman_portal_max = 25; + } else if (of_device_is_compatible(dn, + "fsl,qman-portal-3.1.2")) { + ip_rev = QMAN_REV31; qman_portal_max = 18; + } else if (of_device_is_compatible(dn, + "fsl,qman-portal-3.1.3")) { + ip_rev = QMAN_REV31; + qman_portal_max = 10; + } else { + pr_warn("unknown QMan version in portal node," + "default to rev1.1\n"); + ip_rev = QMAN_REV11; + qman_portal_max = 10; } if (!qman_ip_rev) { diff --git a/drivers/staging/fsl_qbman/qman_private.h b/drivers/staging/fsl_qbman/qman_private.h index b70a4d2..32f31e4 100644 --- a/drivers/staging/fsl_qbman/qman_private.h +++ b/drivers/staging/fsl_qbman/qman_private.h @@ -189,6 +189,7 @@ struct qm_portal_config { #define QMAN_REV12 0x0102 #define QMAN_REV20 0x0200 #define QMAN_REV30 0x0300 +#define QMAN_REV31 0x0301 extern u16 qman_ip_rev; /* 0 if uninitialised, otherwise QMAN_REVx */ extern u32 qman_clk; |