From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Date: Thu, 26 Feb 2015 12:48:47 +0100 Subject: [U-Boot] [PATCH v3 09/12] tegra124: Add PSCI support for Tegra124 In-Reply-To: <20150226090819.GA27867@ulmo.nvidia.com> References: <27f92794c702079de414b7fd49c6934710cffdf1.1424247246.git.jan.kiszka@siemens.com> <20150226090819.GA27867@ulmo.nvidia.com> Message-ID: <54EF081F.1050806@siemens.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 2015-02-26 10:08, Thierry Reding wrote: > On Wed, Feb 18, 2015 at 09:14:03AM +0100, Jan Kiszka wrote: > [...] >> +ENTRY(psci_cpu_off) >> + bl psci_cpu_off_common >> + >> + mrc p15, 0, r1, c0, c0, 5 @ MPIDR >> + and r1, r1, #7 @ number of CPUs in cluster >> + >> + get_csr_reg r1, r2, r3 >> + >> + ldr r6, =TEGRA_FLOW_CTRL_BASE >> + mov r5, #(CSR_ENABLE) >> + add r5, r1, lsl #CSR_WAIT_WFI_SHIFT > > This puts the wrong value into the WAIT_WFI field. The value of that > field is supposed to be a mask, not the index of the CPU. I've used this > to fix it: > > mov r4, #(1 << CSR_WAIT_WFI_SHIFT) > add r5, r4, lsl r1 > > With that fixed I see that with CPU hotplugging the power partition for > the CPU that's taken offline is gated. To verify: > > # cat /sys/kernel/debug/powergate > # echo 0 > /sys/devices/system/cpu/cpu1/online > # cat /sys/kernel/debug/powergate Ah, good catch. Will include your fix. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux