]> git.sur5r.net Git - u-boot/blobdiff - drivers/net/fsl-mc/dpio/qbman_private.h
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / drivers / net / fsl-mc / dpio / qbman_private.h
index 2d2556b7556e47d25718d9b59aa0f13a8dcbdaad..ded11a643ea32d6cd421750cc6b8ac38eba5f9f0 100644 (file)
@@ -1,7 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Copyright (C) 2014 Freescale Semiconductor
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /* Perform extra checking */
@@ -9,8 +8,9 @@
 #include <errno.h>
 #include <asm/io.h>
 #include <linux/types.h>
-#include <linux/compat.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 +166,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();
+       if (IS_SVR_DEV(svr_dev_id, SVR_DEV(SVR_LS2080A))) {
+               *major = 4;
+               *minor = 0;
+       } else {
+               *major = 4;
+               *minor = 1;
+       }
+}
+
 #include "qbman_sys.h"