Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1234979imm; Wed, 6 Jun 2018 12:36:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJVw1YcL6Dt/mpjBEoC4PRNLszin2wmG4juwfbgfVJ5ABzgtaDgZpB9WarXp5vKkuNwJVl6 X-Received: by 2002:a63:7f1b:: with SMTP id a27-v6mr3725776pgd.410.1528313774521; Wed, 06 Jun 2018 12:36:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528313774; cv=none; d=google.com; s=arc-20160816; b=zxmtfV5Z25CuFzeJiveMOW+4IrVgtyjxBrkBvmJAge+aWaM2eERwVgzryxaTtw6Hfg 7yw6OUx26I8YqhwcGo54k13Iq9N/OBFnaR2+J0pvzAbte78cZfCjTNvTfvlA+8P1DC25 AcYuOCp8Lu1eFTa6aj4i5YHzqrVYdElX/u69OD6iMWDGIp2o1aLTsRvsDGFZ+3vlePFD wwwbESqX8PbJB5FiioAPRS3vXCEzR3N3CbDAbE/LuqG1vLYMn0Fiwn+D+B7sBNZKVhYo 7fXgL8t+8f7VOwd4sKBwScBVur/c+I5RGJ3DQIdvAf82ToC4/6zHJxqwFxPBz7Ar1aqr FrEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=ar1zwWmYDaBkweOHohfsGT4IC0cuNJBmC79u94NdzdM=; b=FeH/vrA/2k6KXM5Syd31pRjE+JHTvM8t+WifAjyxg9BJMFTsGebXCkIzjLBXFnAtfo p87FeHXCTqxO8e2pqvhE0Ct728DAh96qGyG2lpLHi0z4zQmci2CIsw1Hd2V43wXnrzHX cNAFhqzdFXoTUPW94p5xHZWGivG2say3UsvDlmPjDKtfwl76tYpdh4CdlY+1ZiX/DoFW PnmVHweoxktV5v4t682eFRdx56OzG9/udBfgEVIKsyFAOGCgMyDlIfE8aOA7TZ6kKk/+ fsHSANYeBq01MLj606j1/7l2BlJTukqaVTcsx6/QFlmXGxfXHQqfiRYcIZwaCynQPZNm GupQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NkAfCS7w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u198-v6si29429509pgb.136.2018.06.06.12.36.00; Wed, 06 Jun 2018 12:36:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NkAfCS7w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752304AbeFFTfc (ORCPT + 99 others); Wed, 6 Jun 2018 15:35:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:51260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752026AbeFFTfa (ORCPT ); Wed, 6 Jun 2018 15:35:30 -0400 Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 32A5620896; Wed, 6 Jun 2018 19:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528313730; bh=Ct5k/HUiU5haBAKv3IQkbF68t2oDifAfXOJfdHwZKCw=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=NkAfCS7wA9zsq0pEHpQVyhf+7J0fPHsujW5UKOZY621+oZM5MoKiyrYdNZAu+R575 oeZPvl5X69CFb8oqpglYK+/Apc+GovWHirj/qJDZe60E1e3So/F6IHYyUsFUEBa6xK DbjvvapFmfdVvLFKMQeOgXsTIPS5YkKGAAjFRbtg= Received: by mail-it0-f45.google.com with SMTP id 76-v6so9726319itx.4; Wed, 06 Jun 2018 12:35:30 -0700 (PDT) X-Gm-Message-State: APt69E0b7ScLNtIMYVxCqw2XPr2JFt3+OtFFbDt/VFc2RobgycMxiJtf pnHNAoxTZBAcS/LqguTlNGpI1UlABDwblLUQiw== X-Received: by 2002:a24:534e:: with SMTP id n75-v6mr4029605itb.138.1528313729525; Wed, 06 Jun 2018 12:35:29 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:5505:0:0:0:0:0 with HTTP; Wed, 6 Jun 2018 12:35:08 -0700 (PDT) In-Reply-To: References: <1528198148-23308-1-git-send-email-michel.pollet@bp.renesas.com> <1528198148-23308-3-git-send-email-michel.pollet@bp.renesas.com> <0481173f-6384-98d6-707c-89dc5ef103f0@gmail.com> From: Rob Herring Date: Wed, 6 Jun 2018 14:35:08 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 2/3] arm: shmobile: Add the R9A06G032 SMP enabler driver To: Frank Rowand Cc: Michel Pollet , "linux-renesas-soc@vger.kernel.org" , Simon Horman , Michel Pollet , Mark Rutland , Phil Edworthy , Florian Fainelli , Rajendra Nayak , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Stefan Wahren , Magnus Damm , Russell King , Douglas Anderson , Chen-Yu Tsai , Carlo Caione , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Frank Rowand , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 6, 2018 at 2:30 PM, Frank Rowand wrote: > Hi Michel, > > On 06/05/18 23:36, Michel Pollet wrote: >> Hi Frank, >> >> On 05 June 2018 18:34, Frank wrote: >>> On 06/05/18 04:28, Michel Pollet wrote: >>>> The Renesas R9A06G032 second CA7 is parked in a ROM pen at boot time, >>>> it requires a special enable method to get it started. >>>> >>>> Signed-off-by: Michel Pollet >>>> --- >>>> arch/arm/mach-shmobile/Makefile | 1 + >>>> arch/arm/mach-shmobile/smp-r9a06g032.c | 79 >>>> ++++++++++++++++++++++++++++++++++ >>>> 2 files changed, 80 insertions(+) >>>> create mode 100644 arch/arm/mach-shmobile/smp-r9a06g032.c >>>> >>>> diff --git a/arch/arm/mach-shmobile/Makefile >>>> b/arch/arm/mach-shmobile/Makefile index 1939f52..d7fc98f 100644 >>>> --- a/arch/arm/mach-shmobile/Makefile >>>> +++ b/arch/arm/mach-shmobile/Makefile >>>> @@ -34,6 +34,7 @@ smp-$(CONFIG_ARCH_SH73A0)+= smp-sh73a0.o >>> headsmp-scu.o platsmp-scu.o >>>> smp-$(CONFIG_ARCH_R8A7779)+= smp-r8a7779.o headsmp-scu.o >>> platsmp-scu.o >>>> smp-$(CONFIG_ARCH_R8A7790)+= smp-r8a7790.o >>>> smp-$(CONFIG_ARCH_R8A7791)+= smp-r8a7791.o >>>> +smp-$(CONFIG_ARCH_R9A06G032)+= smp-r9a06g032.o >>>> smp-$(CONFIG_ARCH_EMEV2)+= smp-emev2.o headsmp-scu.o >>> platsmp-scu.o >>>> >>>> # PM objects >>>> diff --git a/arch/arm/mach-shmobile/smp-r9a06g032.c >>>> b/arch/arm/mach-shmobile/smp-r9a06g032.c >>>> new file mode 100644 >>>> index 0000000..cd40e6e >>>> --- /dev/null >>>> +++ b/arch/arm/mach-shmobile/smp-r9a06g032.c >>>> @@ -0,0 +1,79 @@ >>>> +// SPDX-License-Identifier: GPL-2.0 >>>> +/* >>>> + * R9A06G032 Second CA7 enabler. >>>> + * >>>> + * Copyright (C) 2018 Renesas Electronics Europe Limited >>>> + * >>>> + * Michel Pollet , >>> >>>> + * Derived from action,s500-smp >>>> + */ >>>> + >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> + >>>> +/* >>>> + * The second CPU is parked in ROM at boot time. It requires waking >>>> +it after >>>> + * writing an address into the BOOTADDR register of sysctrl. >>>> + * >>>> + * So the default value of the "cpu-release-addr" corresponds to >>> BOOTADDR... >>>> + * >>>> + * *However* the BOOTADDR register is not available when the kernel >>>> + * starts in NONSEC mode. >>>> + * >>>> + * So for NONSEC mode, the bootloader re-parks the second CPU into a >>>> +pen >>>> + * in SRAM, and changes the "cpu-release-addr" of linux's DT to a >>>> +SRAM address, >>>> + * which is not restricted. >>> >>> The binding document for cpu-release-addr does not have a definition for 32 >>> bit arm. The existing definition is only 64 bit arm. Please add the definition >>> for 32 bit arm to patch 1. >> >> Hmmm I do find a definition in >> Documentation/devicetree/bindings/arm/cpus.txt -- just under where I >> added my 'enable-method' -- And it is already used as 32 bits in at least >> arch/arm/boot/dts/stih407-family.dtsi. > > From cpus.txt: > > - cpu-release-addr > Usage: required for systems that have an "enable-method" > property value of "spin-table". > Value type: > Definition: > # On ARM v8 64-bit systems must be a two cell > property identifying a 64-bit zero-initialised > memory location. > > The definition specifies a two cell property for 64-bit systems. > > Please add to the definition that cpu-release-addr is a one cell property > for 32-bit systems. Actually, this is all already documented in the DT spec and it is always 2 cells[1]. We should perhaps just remove whatever is duplicated from the spec. Rob [1] ``cpu-release-addr`` | SD | ```` The cpu-release-addr property is required for cpu nodes that have an enable-method property value of ``"spin-table"``. The value specifies the physical address of a spin table entry that releases a secondary CPU from its spin loop.