| 975d076d | 23-Jan-2021 |
Samuel Holland <samuel@sholland.org> |
allwinner: psci: Drop .pwr_domain_pwr_down_wfi callback
When operating on the local cpu, sunxi_cpu_power_off_self() only "arms" the ARISC to perform the power-off process; the SCP waits for the CPU
allwinner: psci: Drop .pwr_domain_pwr_down_wfi callback
When operating on the local cpu, sunxi_cpu_power_off_self() only "arms" the ARISC to perform the power-off process; the SCP waits for the CPU to enter WFI before acutally powering it off. Since this matches the expected split between .pwr_domain_off and .pwr_domain_pwr_down_wfi, we can move the sunxi_cpu_power_off_self() call to sunxi_pwr_domain_off(). Since that change makes sunxi_pwr_down_wfi() equivalent to the default implementation, the callback is no longer needed.
Change-Id: I7d65f66c550d1c69fa5e9945affd7a25b3d3ef42 Signed-off-by: Samuel Holland <samuel@sholland.org>
show more ...
|
| a1d349be | 24-Jan-2021 |
Samuel Holland <samuel@sholland.org> |
allwinner: Separate code to power off self and other CPUs
Currently, sunxi_cpu_off() has two separate code paths: one for the local CPU, and one for other CPUs. Let's split them in to two functions.
allwinner: Separate code to power off self and other CPUs
Currently, sunxi_cpu_off() has two separate code paths: one for the local CPU, and one for other CPUs. Let's split them in to two functions. This actually simplifies things, because all callers either operate on the local CPU only (sunxi_pwr_down_wfi()) or other CPUs only (sunxi_cpu_power_off_others()). This avoids needing a second MPIDR read to choose the appropriate code path.
Change-Id: I55de85025235cc95466bfa106831fc4c2368f527 Signed-off-by: Samuel Holland <samuel@sholland.org>
show more ...
|
| ed267c92 | 24-Jan-2021 |
Samuel Holland <samuel@sholland.org> |
allwinner: Leave CPU power alone during BL31 setup
Disabling secondary CPUs during boot is unnecessary because the other CPUs are already in reset, and it saves an entirely insignificant amount of p
allwinner: Leave CPU power alone during BL31 setup
Disabling secondary CPUs during boot is unnecessary because the other CPUs are already in reset, and it saves an entirely insignificant amount of power. Let's remove this bit of code that was added mostly "because we can", and along with it remove an unconditional dependency on the CPU ops functions.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Ia77a1b722da6ba989c3992b656a6cde3f2238fd7
show more ...
|
| 814dce8f | 16-Jan-2021 |
Samuel Holland <samuel@sholland.org> |
allwinner: psci: Invert check in .validate_ns_entrypoint
Checking the exceptional case and letting the success case fall through is not only more idiomatic, but it also allows adding more exceptiona
allwinner: psci: Invert check in .validate_ns_entrypoint
Checking the exceptional case and letting the success case fall through is not only more idiomatic, but it also allows adding more exceptional cases in the future, such as a check for overlapping secure DRAM.
Change-Id: I720441a6a8853fd7f211ebe851f14d921a6db03d Signed-off-by: Samuel Holland <samuel@sholland.org>
show more ...
|
| 772ef7e7 | 16-Jan-2021 |
Samuel Holland <samuel@sholland.org> |
allwinner: psci: Drop MPIDR check from .pwr_domain_on
This duplicated the logic in psci_validate_mpidr() which was already called from psci_cpu_on().
Change-Id: I96ee92f1ce3e9cc2985b4e229ba86ebd27b
allwinner: psci: Drop MPIDR check from .pwr_domain_on
This duplicated the logic in psci_validate_mpidr() which was already called from psci_cpu_on().
Change-Id: I96ee92f1ce3e9cc2985b4e229ba86ebd27b79915 Signed-off-by: Samuel Holland <samuel@sholland.org>
show more ...
|
| 7060e0d8 | 14-Dec-2020 |
Samuel Holland <samuel@sholland.org> |
allwinner: Use RSB for the PMIC connection on H6
RSB is faster and more efficient, and it has a simpler driver. As long as the PMIC is returned to I2C mode after use, the rich OS can later use eithe
allwinner: Use RSB for the PMIC connection on H6
RSB is faster and more efficient, and it has a simpler driver. As long as the PMIC is returned to I2C mode after use, the rich OS can later use either bus.
Change-Id: I0c5f32e88a090c8c5cccb81bd24596b301ab9da7 Signed-off-by: Samuel Holland <samuel@sholland.org>
show more ...
|
| 44702983 | 14-Dec-2020 |
Samuel Holland <samuel@sholland.org> |
allwinner: Return the PMIC to I2C mode after use
This gives the rich OS the flexibility to choose between I2C and RSB communication. Since a runtime address can only be assigned once after entering
allwinner: Return the PMIC to I2C mode after use
This gives the rich OS the flexibility to choose between I2C and RSB communication. Since a runtime address can only be assigned once after entering RSB mode, it also lets the rich OS choose any runtime address.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Id49c124c5e925985fc31c0ba38c7fb6c941aafa8
show more ...
|
| 49d98cd5 | 14-Dec-2020 |
Samuel Holland <samuel@sholland.org> |
allwinner: Add SPC security setup for H6
The H6 has a "secure port controller" similar to the A64/H5, but with more ports and a different register layout. Split the platform-specific parts out into
allwinner: Add SPC security setup for H6
The H6 has a "secure port controller" similar to the A64/H5, but with more ports and a different register layout. Split the platform-specific parts out into a header, and add the missing MMIO base address.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: I3703868bc595459ecf9568b9d1605cb1be014bf5
show more ...
|
| e382c88e | 21-Oct-2018 |
Samuel Holland <samuel@sholland.org> |
allwinner: Implement PSCI system suspend using SCPI
If an SCP firmware is present and able to communicate via SCPI, then use that to implement CPU and system power state transitions, including CPU h
allwinner: Implement PSCI system suspend using SCPI
If an SCP firmware is present and able to communicate via SCPI, then use that to implement CPU and system power state transitions, including CPU hotplug and system suspend. Otherwise, fall back to the existing CPU power control implementation.
The last 16 KiB of SRAM A2 are reserved for the SCP firmware, and the SCPI shared memory is at the very end of this region (and therefore the end of SRAM A2). BL31 continues to start at the beginning of SRAM A2 (not counting the ARISC exception vector area) and fills up to the beginning of the SCP firmware.
Because the SCP firmware is not loaded adjacent to the ARISC exception vector area, the jump instructions used for exception handling cannot be included in the SCP firmware image, and must be initialized here before turning on the SCP.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: I37b9b9636f94d4125230423726f3ac5e9cdb551c
show more ...
|