From: "Steven J. Hill" <Steven.Hill@xxxxxxxxxx> Values for CVMX_CIU_FUSE register was incorrect for some platforms. Signed-off-by: Steven J. Hill <steven.hill@xxxxxxxxxx> --- arch/mips/include/asm/octeon/cvmx-ciu-defs.h | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/asm/octeon/cvmx-ciu-defs.h b/arch/mips/include/asm/octeon/cvmx-ciu-defs.h index af9164b..f955607 100644 --- a/arch/mips/include/asm/octeon/cvmx-ciu-defs.h +++ b/arch/mips/include/asm/octeon/cvmx-ciu-defs.h @@ -4,7 +4,7 @@ * Contact: support@xxxxxxxxxxxxxxxxxx * This file is part of the OCTEON SDK * - * Copyright (c) 2003-2012 Cavium Networks + * Copyright (c) 2003-2018 Cavium, Inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, Version 2, as @@ -43,7 +43,31 @@ #define CVMX_CIU_EN2_PPX_IP4(offset) (CVMX_ADD_IO_SEG(0x000107000000A400ull) + ((offset) & 15) * 8) #define CVMX_CIU_EN2_PPX_IP4_W1C(offset) (CVMX_ADD_IO_SEG(0x000107000000CC00ull) + ((offset) & 15) * 8) #define CVMX_CIU_EN2_PPX_IP4_W1S(offset) (CVMX_ADD_IO_SEG(0x000107000000AC00ull) + ((offset) & 15) * 8) -#define CVMX_CIU_FUSE (CVMX_ADD_IO_SEG(0x0001070000000728ull)) +#define CVMX_CIU_FUSE CVMX_CIU_FUSE_FUNC() +static inline uint64_t CVMX_CIU_FUSE_FUNC(void) +{ + switch(cvmx_get_octeon_family() & OCTEON_FAMILY_MASK) { + case OCTEON_CN30XX: + case OCTEON_CN31XX: + case OCTEON_CN38XX: + case OCTEON_CN50XX: + case OCTEON_CN52XX: + case OCTEON_CN56XX: + case OCTEON_CN58XX: + case OCTEON_CN61XX: + case OCTEON_CN63XX: + case OCTEON_CN66XX: + case OCTEON_CN68XX: + case OCTEON_CN70XX: + case OCTEON_CNF71XX: + default: + return CVMX_ADD_IO_SEG(0x0001070000000728ull); + case OCTEON_CN73XX: + case OCTEON_CN78XX: + case OCTEON_CNF75XX: + return CVMX_ADD_IO_SEG(0x00010100000001A0ull); + } +} #define CVMX_CIU_GSTOP (CVMX_ADD_IO_SEG(0x0001070000000710ull)) #define CVMX_CIU_INT33_SUM0 (CVMX_ADD_IO_SEG(0x0001070000000110ull)) #define CVMX_CIU_INTX_EN0(offset) (CVMX_ADD_IO_SEG(0x0001070000000200ull) + ((offset) & 63) * 16) -- 2.1.4