Skip to content

Commit

Permalink
MIPS: OCTEON: warn if deprecated link status is being used
Browse files Browse the repository at this point in the history
Warn if deprecated link status is being used.

Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Paul Burton <[email protected]>
Cc: [email protected]
  • Loading branch information
aakoskin authored and paulburton committed Feb 7, 2019
1 parent 565485b commit 2c0756d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/mips/cavium-octeon/executive/cvmx-helper-board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions arch/mips/cavium-octeon/executive/cvmx-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2c0756d

Please sign in to comment.