aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Huttunen <[email protected]>2015-08-13 16:21:45 +0300
committerRalf Baechle <[email protected]>2015-09-03 12:08:11 +0200
commit31705376a2fd71f5c5b596fb2d3b2c6232a6268a (patch)
tree6b64d17d107d91a6c21d2b243ce37213c998bcd1
parent85847d8033b66c2f36e9a992ff3873fb10d72b80 (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 <[email protected]> Signed-off-by: Aaro Koskinen <[email protected]> Acked-by: David Daney <[email protected]> Cc: David Daney <[email protected]> Cc: [email protected] Cc: Janne Huttunen <[email protected]> Cc: Aaro Koskinen <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/10967/ Signed-off-by: Ralf Baechle <[email protected]>
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper-util.c12
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)
return port + 32;
case 3:
return port + 36;
+ case 4:
+ return port + 40;
+ case 5:
+ return port + 44;
}
return -1;
}
@@ -404,6 +408,10 @@ int cvmx_helper_get_interface_num(int ipd_port)
return 2;
else if (ipd_port < 40)
return 3;
+ else if (ipd_port < 44)
+ return 4;
+ else if (ipd_port < 48)
+ return 5;
else
cvmx_dprintf("cvmx_helper_get_interface_num: Illegal IPD "
"port number\n");
@@ -428,6 +436,10 @@ int cvmx_helper_get_interface_index_num(int ipd_port)
return ipd_port & 3;
else if (ipd_port < 40)
return ipd_port & 3;
+ else if (ipd_port < 44)
+ return ipd_port & 3;
+ else if (ipd_port < 48)
+ return ipd_port & 3;
else
cvmx_dprintf("cvmx_helper_get_interface_index_num: "
"Illegal IPD port number\n");