Commit 31705376 authored by Janne Huttunen's avatar Janne Huttunen Committed by Ralf Baechle

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: default avatarJanne Huttunen <janne.huttunen@nokia.com>
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@nokia.com>
Acked-by: default avatarDavid 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: default avatarRalf Baechle <ralf@linux-mips.org>
parent 85847d80
...@@ -382,6 +382,10 @@ int cvmx_helper_get_ipd_port(int interface, int port) ...@@ -382,6 +382,10 @@ int cvmx_helper_get_ipd_port(int interface, int port)
return port + 32; return port + 32;
case 3: case 3:
return port + 36; return port + 36;
case 4:
return port + 40;
case 5:
return port + 44;
} }
return -1; return -1;
} }
...@@ -404,6 +408,10 @@ int cvmx_helper_get_interface_num(int ipd_port) ...@@ -404,6 +408,10 @@ int cvmx_helper_get_interface_num(int ipd_port)
return 2; return 2;
else if (ipd_port < 40) else if (ipd_port < 40)
return 3; return 3;
else if (ipd_port < 44)
return 4;
else if (ipd_port < 48)
return 5;
else else
cvmx_dprintf("cvmx_helper_get_interface_num: Illegal IPD " cvmx_dprintf("cvmx_helper_get_interface_num: Illegal IPD "
"port number\n"); "port number\n");
...@@ -428,6 +436,10 @@ int cvmx_helper_get_interface_index_num(int ipd_port) ...@@ -428,6 +436,10 @@ int cvmx_helper_get_interface_index_num(int ipd_port)
return ipd_port & 3; return ipd_port & 3;
else if (ipd_port < 40) else if (ipd_port < 40)
return ipd_port & 3; return ipd_port & 3;
else if (ipd_port < 44)
return ipd_port & 3;
else if (ipd_port < 48)
return ipd_port & 3;
else else
cvmx_dprintf("cvmx_helper_get_interface_index_num: " cvmx_dprintf("cvmx_helper_get_interface_index_num: "
"Illegal IPD port number\n"); "Illegal IPD port number\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment