diff options
author | Janne Huttunen <janne.huttunen@nokia.com> | 2015-08-13 09:21:45 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-09-03 06:08:11 -0400 |
commit | 31705376a2fd71f5c5b596fb2d3b2c6232a6268a (patch) | |
tree | 6b64d17d107d91a6c21d2b243ce37213c998bcd1 | |
parent | 85847d8033b66c2f36e9a992ff3873fb10d72b80 (diff) |
MIPS: Octeon: Support interfaces 4 and 5
Add the support for mapping between interface/port numbers and IPD port
numbers also for the additional interfaces some Octeon II models have.
Signed-off-by: Janne Huttunen <janne.huttunen@nokia.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Acked-by: David Daney <david.daney@cavium.com>
Cc: David Daney <ddaney.cavm@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: Janne Huttunen <janne.huttunen@nokia.com>
Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org
Patchwork: https://patchwork.linux-mips.org/patch/10967/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/cavium-octeon/executive/cvmx-helper-util.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-util.c b/arch/mips/cavium-octeon/executive/cvmx-helper-util.c index 402959605276..b45b2975746d 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-helper-util.c +++ b/arch/mips/cavium-octeon/executive/cvmx-helper-util.c | |||
@@ -382,6 +382,10 @@ int cvmx_helper_get_ipd_port(int interface, int port) | |||
382 | return port + 32; | 382 | return port + 32; |
383 | case 3: | 383 | case 3: |
384 | return port + 36; | 384 | return port + 36; |
385 | case 4: | ||
386 | return port + 40; | ||
387 | case 5: | ||
388 | return port + 44; | ||
385 | } | 389 | } |
386 | return -1; | 390 | return -1; |
387 | } | 391 | } |
@@ -404,6 +408,10 @@ int cvmx_helper_get_interface_num(int ipd_port) | |||
404 | return 2; | 408 | return 2; |
405 | else if (ipd_port < 40) | 409 | else if (ipd_port < 40) |
406 | return 3; | 410 | return 3; |
411 | else if (ipd_port < 44) | ||
412 | return 4; | ||
413 | else if (ipd_port < 48) | ||
414 | return 5; | ||
407 | else | 415 | else |
408 | cvmx_dprintf("cvmx_helper_get_interface_num: Illegal IPD " | 416 | cvmx_dprintf("cvmx_helper_get_interface_num: Illegal IPD " |
409 | "port number\n"); | 417 | "port number\n"); |
@@ -428,6 +436,10 @@ int cvmx_helper_get_interface_index_num(int ipd_port) | |||
428 | return ipd_port & 3; | 436 | return ipd_port & 3; |
429 | else if (ipd_port < 40) | 437 | else if (ipd_port < 40) |
430 | return ipd_port & 3; | 438 | return ipd_port & 3; |
439 | else if (ipd_port < 44) | ||
440 | return ipd_port & 3; | ||
441 | else if (ipd_port < 48) | ||
442 | return ipd_port & 3; | ||
431 | else | 443 | else |
432 | cvmx_dprintf("cvmx_helper_get_interface_index_num: " | 444 | cvmx_dprintf("cvmx_helper_get_interface_index_num: " |
433 | "Illegal IPD port number\n"); | 445 | "Illegal IPD port number\n"); |