MIPS: OCTEON: cvmx_gmxx_inf_mode: use oldest forward compatible definition
authorAaro Koskinen <aaro.koskinen@iki.fi>
Tue, 4 Dec 2018 20:12:19 +0000 (22:12 +0200)
committerPaul Burton <paul.burton@mips.com>
Tue, 4 Dec 2018 23:55:30 +0000 (15:55 -0800)
Use oldest forward compatible definition.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
arch/mips/cavium-octeon/executive/cvmx-helper.c
arch/mips/cavium-octeon/executive/cvmx-interrupt-rsl.c

index c635a5ace83b46f6c66bdc9cb89ff9807732a776..d2251bb1f3697c14c3ecbfd9b3259a6deed551f2 100644 (file)
@@ -218,7 +218,7 @@ static cvmx_helper_interface_mode_t __cvmx_get_mode_octeon2(int interface)
        mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface));
 
        if (OCTEON_IS_MODEL(OCTEON_CN63XX)) {
-               switch (mode.cn63xx.mode) {
+               switch (mode.cn61xx.mode) {
                case 0:
                        return CVMX_HELPER_INTERFACE_MODE_SGMII;
                case 1:
@@ -342,7 +342,7 @@ cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int interface)
        mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface));
 
        if (OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN52XX)) {
-               switch (mode.cn56xx.mode) {
+               switch (mode.cn52xx.mode) {
                case 0:
                        return CVMX_HELPER_INTERFACE_MODE_DISABLED;
                case 1:
index fa327ec891cd0c4d80075b132fa25e5c5a17b061..d23f46736dd6d7e760be3797193848322cc6521e 100644 (file)
@@ -84,7 +84,7 @@ void __cvmx_interrupt_gmxx_enable(int interface)
 
        if (OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN52XX)) {
                if (mode.s.en) {
-                       switch (mode.cn56xx.mode) {
+                       switch (mode.cn52xx.mode) {
                        case 1: /* XAUI */
                                num_ports = 1;
                                break;