diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2014-06-28 16:34:10 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-08-01 18:06:43 -0400 |
commit | 8bd70c6af3a85193e4188fd3e7fbff0d5830fb78 (patch) | |
tree | 72cdd15f2d56061caa423cacd236f04685048b8f | |
parent | 8a1fbefaf1b84c435e6fa29d00e18f00b7d7199a (diff) |
MIPS: OCTEON: add interface & port definitions for D-Link DSR-1000N
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>
-rw-r--r-- | arch/mips/cavium-octeon/executive/cvmx-helper-board.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c index 6c871a5b50c8..5dfef84b9576 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c +++ b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c | |||
@@ -186,6 +186,15 @@ int cvmx_helper_board_get_mii_address(int ipd_port) | |||
186 | return 7 - ipd_port; | 186 | return 7 - ipd_port; |
187 | else | 187 | else |
188 | return -1; | 188 | return -1; |
189 | case CVMX_BOARD_TYPE_CUST_DSR1000N: | ||
190 | /* | ||
191 | * Port 2 connects to Broadcom PHY (B5081). Other ports (0-1) | ||
192 | * connect to a switch (BCM53115). | ||
193 | */ | ||
194 | if (ipd_port == 2) | ||
195 | return 8; | ||
196 | else | ||
197 | return -1; | ||
189 | } | 198 | } |
190 | 199 | ||
191 | /* Some unknown board. Somebody forgot to update this function... */ | 200 | /* Some unknown board. Somebody forgot to update this function... */ |
@@ -274,6 +283,18 @@ cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port) | |||
274 | return result; | 283 | return result; |
275 | } | 284 | } |
276 | break; | 285 | break; |
286 | case CVMX_BOARD_TYPE_CUST_DSR1000N: | ||
287 | if (ipd_port == 0 || ipd_port == 1) { | ||
288 | /* Ports 0 and 1 connect to a switch (BCM53115). */ | ||
289 | result.s.link_up = 1; | ||
290 | result.s.full_duplex = 1; | ||
291 | result.s.speed = 1000; | ||
292 | return result; | ||
293 | } else { | ||
294 | /* Port 2 uses a Broadcom PHY (B5081). */ | ||
295 | is_broadcom_phy = 1; | ||
296 | } | ||
297 | break; | ||
277 | } | 298 | } |
278 | 299 | ||
279 | phy_addr = cvmx_helper_board_get_mii_address(ipd_port); | 300 | phy_addr = cvmx_helper_board_get_mii_address(ipd_port); |