linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaro Koskinen <aaro.koskinen@iki.fi>
To: linux-mips@vger.kernel.org
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: [PATCH 2/5] MIPS: OCTEON: warn if deprecated link status is being used
Date: Tue,  5 Feb 2019 00:41:46 +0200	[thread overview]
Message-ID: <20190204224149.8139-3-aaro.koskinen@iki.fi> (raw)
In-Reply-To: <20190204224149.8139-1-aaro.koskinen@iki.fi>

Warn if deprecated link status is being used.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
 arch/mips/cavium-octeon/executive/cvmx-helper-board.c | 4 ++++
 arch/mips/cavium-octeon/executive/cvmx-helper.c       | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
index ab8362e04461..46ea54ea73ea 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
@@ -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;
 
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c
index 520c3bc66655..b695d134b60f 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
@@ -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;
-- 
2.17.0


  parent reply	other threads:[~2019-02-04 22:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 22:41 [PATCH 0/5] MIPS: OCTEON: avoid board-specific stuff in ethernet code Aaro Koskinen
2019-02-04 22:41 ` [PATCH 1/5] MIPS: OCTEON: add fixed-link nodes to in-kernel device tree Aaro Koskinen
2019-02-04 22:41 ` Aaro Koskinen [this message]
2019-02-04 22:41 ` [PATCH 3/5] MIPS: OCTEON: don't lie about interface type of CN3005 board Aaro Koskinen
2019-02-04 22:41 ` [PATCH 4/5] MIPS: OCTEON: delete board-specific link status Aaro Koskinen
2019-02-04 22:41 ` [PATCH 5/5] MIPS: OCTEON: program rx/tx-delay always from DT Aaro Koskinen
2019-02-08 18:03 ` [PATCH 0/5] MIPS: OCTEON: avoid board-specific stuff in ethernet code Paul Burton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190204224149.8139-3-aaro.koskinen@iki.fi \
    --to=aaro.koskinen@iki.fi \
    --cc=linux-mips@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).