diff options
author | Haiying Wang <Haiying.Wang@freescale.com> | 2013-03-28 18:59:04 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-04-16 16:20:53 (GMT) |
commit | ab098f24f69f2385f41ca1deb8d908abcdcc677b (patch) | |
tree | 04025b23327fce0dcd5ba7349a61c7b910351e74 | |
parent | 62eca8b446c66508b955994355a30e3f8260b25a (diff) | |
download | linux-fsl-qoriq-ab098f24f69f2385f41ca1deb8d908abcdcc677b.tar.xz |
fsl_qman: Add QMan3.1 reversion support
The QMan revision on both T4240 and B4860 rev2 silicon is 3.1, and both T2080
and T1040 also have QMan rev3.1. Update the qman driver to support rev3.1.
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Change-Id: I7ea2149f982023cd5f99729df6c6b61cba46b668
Reviewed-on: http://git.am.freescale.net:8181/1261
Reviewed-by: Thorpe Geoff-R01361 <Geoff.Thorpe@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
-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; |