diff options
author | Priyanka Jain <priyanka.jain@nxp.com> | 2016-12-07 12:04:05 +0530 |
---|---|---|
committer | York Sun <york.sun@nxp.com> | 2016-12-15 11:57:05 -0800 |
commit | 8e62f1ee03c82ad285a4e2245e25fc348320749e (patch) | |
tree | c3b641d318ed92f03158da5deaf41f6907bfcf01 /drivers/net/fsl-mc/dpio/qbman_private.h | |
parent | 4002eab2c2bdbcb730620a12dafab32298c48135 (diff) |
driver: fsl-mc: qbman: Add QBMAN 4.1 support
LS2080A SoC family has QBMAN ver 4.0 whereas newer
SoCs like LS2088A, LS1088A has QBMAN ver 4.1
QBMAN ver 4.0 and ver 4.1 supports dqrr size as 4 and 8 respectively.
Add support of
to check QBMAN version based on SoC SVR
update dqrr_size accordingly
update code to support larger dqrr_size
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'drivers/net/fsl-mc/dpio/qbman_private.h')
-rw-r--r-- | drivers/net/fsl-mc/dpio/qbman_private.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/fsl-mc/dpio/qbman_private.h b/drivers/net/fsl-mc/dpio/qbman_private.h index f1f16b828b..73bbae373e 100644 --- a/drivers/net/fsl-mc/dpio/qbman_private.h +++ b/drivers/net/fsl-mc/dpio/qbman_private.h @@ -11,6 +11,7 @@ #include <linux/types.h> #include <asm/atomic.h> #include <malloc.h> +#include <asm/arch/soc.h> #include <fsl-mc/fsl_qbman_base.h> #define QBMAN_CHECKING @@ -166,4 +167,22 @@ static inline void dcbz(void *ptr) #define lwsync() +void qbman_version(u32 *major, u32 *minor) +{ + u32 svr_dev_id; + + /* + * LS2080A SoC and its personalities has qbman cotroller version 4.0 + * New SoCs like LS2088A, LS1088A has qbman conroller version 4.1 + */ + svr_dev_id = get_svr() >> 16; + if (svr_dev_id == SVR_DEV_LS2080A) { + *major = 4; + *minor = 0; + } else { + *major = 4; + *minor = 1; + } +} + #include "qbman_sys.h" |