aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c
diff options
context:
space:
mode:
authorJanne Huttunen <janne.huttunen@nokia.com>2015-08-13 16:21:36 +0300
committerRalf Baechle <ralf@linux-mips.org>2015-09-03 12:08:09 +0200
commit4397564542c18d2fee904b1e2c09ae15a871d853 (patch)
tree2d46ff8e14098dbedaa34f6c4367fd35137bf347 /arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c
parentMIPS: Octeon: Support all PIP input ports on CN68XX (diff)
downloadlinux-dev-4397564542c18d2fee904b1e2c09ae15a871d853.tar.xz
linux-dev-4397564542c18d2fee904b1e2c09ae15a871d853.zip
MIPS: Octeon: Configure XAUI pkinds
Configure the pkinds of XAUI interfaces on Octeon models that have them. This simple configuration uses 1:1 mapping between the PIP input port number and the selected pkind. 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/10971/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to '')
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c b/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c
index 323a784f7071..a56ee590de1f 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c
@@ -124,6 +124,13 @@ int __cvmx_helper_xaui_enable(int interface)
union cvmx_gmxx_tx_int_en gmx_tx_int_en;
union cvmx_pcsxx_int_en_reg pcsx_int_en_reg;
+ /* Setup PKND */
+ if (octeon_has_feature(OCTEON_FEATURE_PKND)) {
+ gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(0, interface));
+ gmx_cfg.s.pknd = cvmx_helper_get_ipd_port(interface, 0);
+ cvmx_write_csr(CVMX_GMXX_PRTX_CFG(0, interface), gmx_cfg.u64);
+ }
+
/* (1) Interface has already been enabled. */
/* (2) Disable GMX. */