Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43975645 authored by Janne Huttunen's avatar Janne Huttunen Committed by Ralf Baechle
Browse files

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: 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/10971/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent fce0af1d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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. */