u-boot/arch/arm/cpu
Heinrich Schuchardt 9bd34a69a4 sunxi: psci: avoid error address-of-packed-member
Compiling with GCC 9.2.1 leads to build errors:

arch/arm/cpu/armv7/sunxi/psci.c: In function ‘sunxi_cpu_set_power’:
arch/arm/cpu/armv7/sunxi/psci.c:144:21: error: taking address of packed
member of ‘struct sunxi_cpucfg_reg’ may result in an unaligned pointer
value [-Werror=address-of-packed-member]
  144 |  sunxi_power_switch(&cpucfg->cpu1_pwr_clamp, &cpucfg->cpu1_pwroff,
      |                     ^~~~~~~~~~~~~~~~~~~~~~~
arch/arm/cpu/armv7/sunxi/psci.c:144:46: error: taking address of packed
member of ‘struct sunxi_cpucfg_reg’ may result in an unaligned pointer
value [-Werror=address-of-packed-member]
  144 |  sunxi_power_switch(&cpucfg->cpu1_pwr_clamp, &cpucfg->cpu1_pwroff,
      |                                              ^~~~~~~~~~~~~~~~~~~~

Use memcpy() and void* pointers to resolve the problem caused by packing
the struct sunxi_cpucfg_reg.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
2019-12-18 20:13:34 +05:30
..
arm11 common: Move enable/disable_interrupts out of common.h 2019-12-02 18:25:01 -05:00
arm720t SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
arm920t common: Move enable/disable_interrupts out of common.h 2019-12-02 18:25:01 -05:00
arm926ejs common: Move enable/disable_interrupts out of common.h 2019-12-02 18:25:01 -05:00
arm946es common: Move enable/disable_interrupts out of common.h 2019-12-02 18:25:01 -05:00
arm1136 Convert to use fsl_esdhc_imx for i.MX platforms 2019-06-23 14:18:34 +08:00
arm1176 SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
armv7 sunxi: psci: avoid error address-of-packed-member 2019-12-18 20:13:34 +05:30
armv7m armv7m: cache: add invalidate_icache_all() stub 2019-12-03 08:43:24 -05:00
armv8 Fix typo in macros, "FIRMEWARE" -> "FIRMWARE" 2019-12-05 10:28:39 -05:00
pxa common: Move enable/disable_interrupts out of common.h 2019-12-02 18:25:01 -05:00
sa1100 common: Move enable/disable_interrupts out of common.h 2019-12-02 18:25:01 -05:00
Makefile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
u-boot-spl.lds spl: fix linker size check off-by-one errors 2019-05-05 08:48:50 -04:00
u-boot.lds ARM: Specify aligned address for secure section instead of using attributes 2018-09-07 09:11:42 -04:00