From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753682AbbCEXtA (ORCPT ); Thu, 5 Mar 2015 18:49:00 -0500 Received: from mail-ig0-f177.google.com ([209.85.213.177]:45585 "EHLO mail-ig0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751197AbbCEXsz (ORCPT ); Thu, 5 Mar 2015 18:48:55 -0500 Message-ID: <54F8EB64.403@gmail.com> Date: Thu, 05 Mar 2015 15:48:52 -0800 From: David Daney User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Aleksey Makarov CC: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, David Daney , Chandrakala Chavva , Ralf Baechle Subject: Re: [PATCH] MIPS: OCTEON: Use correct CSR to soft reset References: <1425567974-31912-1-git-send-email-aleksey.makarov@auriga.com> In-Reply-To: <1425567974-31912-1-git-send-email-aleksey.makarov@auriga.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/05/2015 07:06 AM, Aleksey Makarov wrote: > From: Chandrakala Chavva > > This fixes reboot for Octeon III boards > > Signed-off-by: Chandrakala Chavva > Signed-off-by: Aleksey Makarov Let's make a change to this patch... > --- > arch/mips/cavium-octeon/setup.c | 5 ++++- > arch/mips/include/asm/octeon/cvmx.h | 6 +++++- > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c > index 01130e9..73348af 100644 > --- a/arch/mips/cavium-octeon/setup.c > +++ b/arch/mips/cavium-octeon/setup.c > @@ -416,7 +416,10 @@ static void octeon_restart(char *command) > > mb(); > while (1) > - cvmx_write_csr(CVMX_CIU_SOFT_RST, 1); > + if (OCTEON_IS_OCTEON3()) > + cvmx_write_csr(CVMX_RST_SOFT_RST, 1); > + else > + cvmx_write_csr(CVMX_CIU_SOFT_RST, 1); > } > > > diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h > index 33db1c8..fb575d7 100644 > --- a/arch/mips/include/asm/octeon/cvmx.h > +++ b/arch/mips/include/asm/octeon/cvmx.h > @@ -66,6 +66,7 @@ enum cvmx_mips_space { > #include > #include > #include > +#include > > #include > #include > @@ -441,7 +442,10 @@ static inline void cvmx_reset_octeon(void) > union cvmx_ciu_soft_rst ciu_soft_rst; > ciu_soft_rst.u64 = 0; > ciu_soft_rst.s.soft_rst = 1; > - cvmx_write_csr(CVMX_CIU_SOFT_RST, ciu_soft_rst.u64); > + if (OCTEON_IS_OCTEON3()) > + cvmx_write_csr(CVMX_RST_SOFT_RST, ciu_soft_rst.u64); > + else > + cvmx_write_csr(CVMX_CIU_SOFT_RST, ciu_soft_rst.u64); > } cvmx_reset_octeon() is unused in the kernel. So instead of patching it up, remove it altogether, thus removing a little bit of ugliness from the world. David Daney