diff options
author | Tom Rini <trini@konsulko.com> | 2020-03-18 07:48:53 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-03-18 07:48:53 -0400 |
commit | 14eb12a3c801c9b18c91bdce413e44930e008418 (patch) | |
tree | 0ad3743e84ee87b3718096624f7c93dbc7e8915f /arch/arm/cpu/armv7/sunxi/psci.c | |
parent | 40e82bb97c6c1d9dd335faf8539123ac6ace26c5 (diff) | |
parent | 3586cb82277e8af9eae38b354bb8b2aee38ee377 (diff) |
Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi
- Revert "sunxi: psci: avoid error address-of-packed-member"
Diffstat (limited to 'arch/arm/cpu/armv7/sunxi/psci.c')
-rw-r--r-- | arch/arm/cpu/armv7/sunxi/psci.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/psci.c index 5b689004e8..2c5d99e9ac 100644 --- a/arch/arm/cpu/armv7/sunxi/psci.c +++ b/arch/arm/cpu/armv7/sunxi/psci.c @@ -75,7 +75,7 @@ static void __secure __mdelay(u32 ms) isb(); } -static void __secure clamp_release(void __maybe_unused *clamp) +static void __secure clamp_release(u32 __maybe_unused *clamp) { #if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN7I) || \ defined(CONFIG_MACH_SUN8I_H3) || \ @@ -90,7 +90,7 @@ static void __secure clamp_release(void __maybe_unused *clamp) #endif } -static void __secure clamp_set(void __maybe_unused *clamp) +static void __secure clamp_set(u32 __maybe_unused *clamp) { #if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN7I) || \ defined(CONFIG_MACH_SUN8I_H3) || \ @@ -99,28 +99,22 @@ static void __secure clamp_set(void __maybe_unused *clamp) #endif } -static void __secure sunxi_power_switch(void *clamp, void *pwroff_ptr, bool on, +static void __secure sunxi_power_switch(u32 *clamp, u32 *pwroff, bool on, int cpu) { - u32 pwroff; - - memcpy(&pwroff, pwroff_ptr, sizeof(u32)); - if (on) { /* Release power clamp */ clamp_release(clamp); /* Clear power gating */ - clrbits_le32(&pwroff, BIT(cpu)); + clrbits_le32(pwroff, BIT(cpu)); } else { /* Set power gating */ - setbits_le32(&pwroff, BIT(cpu)); + setbits_le32(pwroff, BIT(cpu)); /* Activate power clamp */ clamp_set(clamp); } - - memcpy(pwroff_ptr, &pwroff, sizeof(u32)); } #ifdef CONFIG_MACH_SUN8I_R40 |