From patchwork Mon Sep 18 15:38:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 112932 Delivered-To: patches@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3805593qgf; Mon, 18 Sep 2017 08:38:51 -0700 (PDT) X-Received: by 10.223.151.55 with SMTP id r52mr9752114wrb.69.1505749131704; Mon, 18 Sep 2017 08:38:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505749131; cv=none; d=google.com; s=arc-20160816; b=Md41NPhwAkrznPV95G2foi8xstPeHf4Ab20Pxqy+uwWKYcZ35GTXtV82mw5tcMIcVS 3iD3H0MrgnSfxFDCn8qzTL8P6LpMPd01hl1VrzCEqdSbvA9N5lwkAmmhU7ryy/pYY5eD rFMxHHdLQ/qxLWRP1qdXjEepmE7Drb1AvYuUp4BOrIuDHl2pZ5+kjre6paE210WjIAOE nF87MTQjldExs1FB+bMDg6wqmxLCBSFcNMcRdBu/EymDnOxOh3SniasB9W/MPNulLy7x agKMVmXjBqU87BM8t5hz01Fa/Vf38CdiZqqpfPYWLUDR+pQodtsFIf+pLTLUsl6eotWg AiCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=/iyAT4RKUn5MO9fktn2AuX7evnCo3Afgm4z3End3cbc=; b=b8TAO9W53CFMdX89gyWC+K6dkz3LsqEMpB2Y8YPFaaXObEv9OOsqTusHJynX7Zrk7B R2K+ETvTrwgq/ad6xSl+NvBtq59obfKhwEbv+Stq3UaXFLCqRHbPdDR22LGD/ceuK2+S tGiEuVLZnbWfO1wQ15teInZvySLrkQ3Vz2bp404eruSwbsAz/GJg5tdPVG3eQWDC99/2 iJCExYAY+yjaeU60euxyLawC2jFRdTX4kXqqQfVpDrZrxU/eDqEhXd1RB5T8TJBiUyPM datiEkGmd0D+pZ2a31jtLQcPkiXufD5vIvEpbwa10JWWBJ4MJLeodRM0l9u1ifFPbsJ+ Hslw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=POnEz+aq; spf=pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=daniel.thompson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id y75sor2007346wme.41.2017.09.18.08.38.51 for (Google Transport Security); Mon, 18 Sep 2017 08:38:51 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=POnEz+aq; spf=pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=daniel.thompson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=/iyAT4RKUn5MO9fktn2AuX7evnCo3Afgm4z3End3cbc=; b=POnEz+aq2H6k5PUQ5swl1erUbrw7u6hZdtKdl+ZU0suLeq0XtY3oCpheyZKT9phTkj UtbySa7TLEbuiZISrLgcZta0sElCeY/xJBSXV16VTb9wGNsR1FqXPhbCir/BNoa5M9vr dh4NDMuUeB9704L9sUkwSqSeQ0PVN7blLc/PI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/iyAT4RKUn5MO9fktn2AuX7evnCo3Afgm4z3End3cbc=; b=YAV0w4PAmm753EVm3LEJv+1cO/NWRw6myM/QZnHAw47A5GVmOkbx3D3JouNfy64gfC XycYhNZC2+ShjsHD5qb+fffA37V14Z1pmRMvHtaUPGN4lemajjUHCVIrAkjeKWp6CEU+ nQx6ZADi6BXMrR3F8X4BzG6TTNWdU7hpe8WnTfYJolnGP6oh8rqQm/6WcU/XKKICvdQ2 4s6nn4SJpfWyH0pyPcWbUXXz+OyTKoM6EQmdZZrFjw1neZKxalls8gV6BxiLfepE2Mzc HS8VwXPbnn0LEpnAGhpm573iLwEC2grbFIPc4cX3X/0KUBHTb840efDXR/R5Y197JGOz bnaA== X-Gm-Message-State: AHPjjUiAJpsFgYfivIeYiwXAqLJ0XOaOYbpteRFCl4/NKJyQJlVHkHfg IQxiX85wwsv/E8u7INLRWa7LCJFC X-Google-Smtp-Source: AOwi7QCwlF0Y41p6qxI0tpEsoVgUNeRRO8958PUoTsE7uq5drMMd+opAJrBujBuMOTYt1qUs2AcVFA== X-Received: by 10.28.218.146 with SMTP id r140mr8530481wmg.14.1505749131147; Mon, 18 Sep 2017 08:38:51 -0700 (PDT) Return-Path: Received: from wychelm.lan (cpc87211-aztw31-2-0-cust196.18-1.cable.virginm.net. [82.46.60.197]) by smtp.gmail.com with ESMTPSA id k9sm8483431wrk.27.2017.09.18.08.38.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 08:38:50 -0700 (PDT) From: Daniel Thompson To: Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi Cc: Daniel Thompson , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, patches@linaro.org Subject: [PATCH] arm64: dts: foundation-v8: Enable PSCI mode Date: Mon, 18 Sep 2017 16:38:32 +0100 Message-Id: <20170918153832.16356-1-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.9.5 Currently if the Foundation model is running ARM Trusted Firmware then the kernel, which is configured to use spin tables, cannot start secondary processors or "power off" the simulation. Add a couple of labels to the include file, and introduce a new .dts file that uses these to override the enable-method. Signed-off-by: Daniel Thompson --- arch/arm64/boot/dts/arm/Makefile | 3 +- .../boot/dts/arm/foundation-v8-gicv3-psci.dts | 51 ++++++++++++++++++++++ arch/arm64/boot/dts/arm/foundation-v8.dtsi | 8 ++-- 3 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 arch/arm64/boot/dts/arm/foundation-v8-gicv3-psci.dts -- 2.9.5 Acked-by: Mark Rutland diff --git a/arch/arm64/boot/dts/arm/Makefile b/arch/arm64/boot/dts/arm/Makefile index 75cc2aa10101..c9ec88809f3d 100644 --- a/arch/arm64/boot/dts/arm/Makefile +++ b/arch/arm64/boot/dts/arm/Makefile @@ -1,4 +1,5 @@ -dtb-$(CONFIG_ARCH_VEXPRESS) += foundation-v8.dtb foundation-v8-gicv3.dtb +dtb-$(CONFIG_ARCH_VEXPRESS) += \ + foundation-v8.dtb foundation-v8-gicv3.dtb foundation-v8-gicv3-psci.dtb dtb-$(CONFIG_ARCH_VEXPRESS) += juno.dtb juno-r1.dtb juno-r2.dtb dtb-$(CONFIG_ARCH_VEXPRESS) += rtsm_ve-aemv8a.dtb dtb-$(CONFIG_ARCH_VEXPRESS) += vexpress-v2f-1xv7-ca53x2.dtb diff --git a/arch/arm64/boot/dts/arm/foundation-v8-gicv3-psci.dts b/arch/arm64/boot/dts/arm/foundation-v8-gicv3-psci.dts new file mode 100644 index 000000000000..94a249095104 --- /dev/null +++ b/arch/arm64/boot/dts/arm/foundation-v8-gicv3-psci.dts @@ -0,0 +1,51 @@ +/* + * ARM Ltd. + * + * ARMv8 Foundation model DTS (GICv3 configuration) + */ + +#include "foundation-v8.dtsi" + +/ { + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + }; + + gic: interrupt-controller@2f000000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + interrupt-controller; + reg = <0x0 0x2f000000 0x0 0x10000>, + <0x0 0x2f100000 0x0 0x200000>, + <0x0 0x2c000000 0x0 0x2000>, + <0x0 0x2c010000 0x0 0x2000>, + <0x0 0x2c02f000 0x0 0x2000>; + interrupts = <1 9 4>; + + its: its@2f020000 { + compatible = "arm,gic-v3-its"; + msi-controller; + reg = <0x0 0x2f020000 0x0 0x20000>; + }; + }; +}; + +&cpu0 { + enable-method = "psci"; +}; + +&cpu1 { + enable-method = "psci"; +}; + +&cpu2 { + enable-method = "psci"; +}; + +&cpu3 { + enable-method = "psci"; +}; diff --git a/arch/arm64/boot/dts/arm/foundation-v8.dtsi b/arch/arm64/boot/dts/arm/foundation-v8.dtsi index 8ecdd4331980..8c7f8c4f090a 100644 --- a/arch/arm64/boot/dts/arm/foundation-v8.dtsi +++ b/arch/arm64/boot/dts/arm/foundation-v8.dtsi @@ -28,7 +28,7 @@ #address-cells = <2>; #size-cells = <0>; - cpu@0 { + cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,armv8"; reg = <0x0 0x0>; @@ -36,7 +36,7 @@ cpu-release-addr = <0x0 0x8000fff8>; next-level-cache = <&L2_0>; }; - cpu@1 { + cpu1: cpu@1 { device_type = "cpu"; compatible = "arm,armv8"; reg = <0x0 0x1>; @@ -44,7 +44,7 @@ cpu-release-addr = <0x0 0x8000fff8>; next-level-cache = <&L2_0>; }; - cpu@2 { + cpu2: cpu@2 { device_type = "cpu"; compatible = "arm,armv8"; reg = <0x0 0x2>; @@ -52,7 +52,7 @@ cpu-release-addr = <0x0 0x8000fff8>; next-level-cache = <&L2_0>; }; - cpu@3 { + cpu3: cpu@3 { device_type = "cpu"; compatible = "arm,armv8"; reg = <0x0 0x3>;