Skip to content

Commit

Permalink
MIPS: OCTEON: add interface & port definitions for D-Link DSR-1000N
Browse files Browse the repository at this point in the history
Add interface & port definitions for D-Link DSR-1000N.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: David Daney <ddaney.cavm@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/7219/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Aaro Koskinen authored and Ralf Baechle committed Aug 1, 2014
1 parent 8a1fbef commit 8bd70c6
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions arch/mips/cavium-octeon/executive/cvmx-helper-board.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,15 @@ int cvmx_helper_board_get_mii_address(int ipd_port)
return 7 - ipd_port;
else
return -1;
case CVMX_BOARD_TYPE_CUST_DSR1000N:
/*
* Port 2 connects to Broadcom PHY (B5081). Other ports (0-1)
* connect to a switch (BCM53115).
*/
if (ipd_port == 2)
return 8;
else
return -1;
}

/* Some unknown board. Somebody forgot to update this function... */
Expand Down Expand Up @@ -274,6 +283,18 @@ cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port)
return result;
}
break;
case CVMX_BOARD_TYPE_CUST_DSR1000N:
if (ipd_port == 0 || ipd_port == 1) {
/* Ports 0 and 1 connect to a switch (BCM53115). */
result.s.link_up = 1;
result.s.full_duplex = 1;
result.s.speed = 1000;
return result;
} else {
/* Port 2 uses a Broadcom PHY (B5081). */
is_broadcom_phy = 1;
}
break;
}

phy_addr = cvmx_helper_board_get_mii_address(ipd_port);
Expand Down

0 comments on commit 8bd70c6

Please sign in to comment.