From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Date: Thu, 26 Feb 2015 10:08:21 +0100 Subject: [U-Boot] [PATCH v3 09/12] tegra124: Add PSCI support for Tegra124 In-Reply-To: <27f92794c702079de414b7fd49c6934710cffdf1.1424247246.git.jan.kiszka@siemens.com> References: <27f92794c702079de414b7fd49c6934710cffdf1.1424247246.git.jan.kiszka@siemens.com> Message-ID: <20150226090819.GA27867@ulmo.nvidia.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 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 Thierry -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: