u-boot/drivers/ddr/marvell/axp
Marek Behún e5b3e87dfa ddr: marvell: axp: align signature of mv_xor_mem_init() with a38x
In arch/arm/mach-mvebu/dram.c we always include axp's xor.h for common
XOR definitions, regardless whether we compile for axp or a38x.

But the declaration of this function has a different signature in axp's
xor.h from the one used in a38x' implementation - one parameter is u64
instead of u32. This can result in wrong argument's being passed to that
function on a38x with no one the wiser.

I discovered this when building U-Boot for Turris Omnia with LTO. The
compiler complains about the different signatures being thrown into the
same linking process:

  axp/xor.h:67:5: warning: type of ‘mv_xor_mem_init’ does not match
                           original declaration [-Wlto-type-mismatch]
   67 | int mv_xor_mem_init(u32 chan, u32 start_ptr, u32 block_size,
      |     ^
  a38x/xor.c:165:5: note: type mismatch in parameter 3
  165 | int mv_xor_mem_init(u32 chan, u32 start_ptr, unsigned long long
      |     ^
  a38x/xor.c:165:5: note: type ‘long long unsigned int’ should match
                          type ‘u32’

Fix this by changing the type of the block_size argument in the axp's
implementation and header file to the one used in a38x (and upstream
mv-ddr-marvell).

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-03-12 07:44:21 +01:00
..
ddr3_axp.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ddr3_axp_config.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ddr3_axp_mc_static.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ddr3_axp_training_static.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ddr3_axp_vars.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ddr3_dfs.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ddr3_dqs.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ddr3_hw_training.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ddr3_hw_training.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ddr3_init.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ddr3_init.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ddr3_patterns_64bit.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ddr3_pbs.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ddr3_read_leveling.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ddr3_sdram.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ddr3_spd.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ddr3_write_leveling.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
Makefile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
xor.c ddr: marvell: axp: align signature of mv_xor_mem_init() with a38x 2021-03-12 07:44:21 +01:00
xor.h ddr: marvell: axp: align signature of mv_xor_mem_init() with a38x 2021-03-12 07:44:21 +01:00
xor_regs.h arm: mvebu: Add Marvell's integrated CPUs 2019-04-12 07:04:18 +02:00