MIPS: OCTEON: warn if deprecated link status is being used
authorAaro Koskinen <aaro.koskinen@iki.fi>
Mon, 4 Feb 2019 22:41:46 +0000 (00:41 +0200)
committerPaul Burton <paul.burton@mips.com>
Thu, 7 Feb 2019 23:22:32 +0000 (15:22 -0800)
Warn if deprecated link status is being used.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
arch/mips/cavium-octeon/executive/cvmx-helper-board.c
arch/mips/cavium-octeon/executive/cvmx-helper.c

index ab8362e04461ef2fd95e54aa7778b56c4dfe8dfb..46ea54ea73ea617b2567d2de52606983e12eab9c 100644 (file)
@@ -31,6 +31,7 @@
  * network ports from the rest of the cvmx-helper files.
  */
 
+#include <linux/bug.h>
 #include <asm/octeon/octeon.h>
 #include <asm/octeon/cvmx-bootinfo.h>
 
@@ -210,6 +211,9 @@ cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port)
 {
        cvmx_helper_link_info_t result;
 
+       WARN(!octeon_is_simulation(),
+            "Using deprecated link status - please update your DT");
+
        /* Unless we fix it later, all links are defaulted to down */
        result.u64 = 0;
 
index 520c3bc6665531f1b7d9ad95a987d378f35ebcb6..b695d134b60fc2da5a480a525d0903ec80501d2e 100644 (file)
@@ -30,6 +30,7 @@
  * Helper functions for common, but complicated tasks.
  *
  */
+#include <linux/bug.h>
 #include <asm/octeon/octeon.h>
 
 #include <asm/octeon/cvmx-config.h>
@@ -1116,6 +1117,7 @@ cvmx_helper_link_info_t cvmx_helper_link_get(int ipd_port)
                if (index == 0)
                        result = __cvmx_helper_rgmii_link_get(ipd_port);
                else {
+                       WARN(1, "Using deprecated link status - please update your DT");
                        result.s.full_duplex = 1;
                        result.s.link_up = 1;
                        result.s.speed = 1000;