diff options
author | Tom Rini <trini@konsulko.com> | 2016-12-16 17:46:36 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-12-16 17:46:36 (GMT) |
commit | b5178a1f2468d5e9b1066e7d08757c1164727e4c (patch) | |
tree | 59ba300f55720cc86874c2ad25646ec09a9f2675 /drivers/net/fsl-mc/dpio/qbman_private.h | |
parent | be72591bcd644df7e16afdd12ec258693693422f (diff) | |
parent | c151cb5b516e609a0846bd392d6207a77b66a7ff (diff) | |
download | u-boot-b5178a1f2468d5e9b1066e7d08757c1164727e4c.tar.xz |
Merge git://git.denx.de/u-boot-fsl-qoriq
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 f1f16b8..73bbae3 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" |