u-boot/drivers/ram/stm32mp1
Patrick Delaunay 1a5be5a416 ram: stm32mp1: protect minimum value in get_bufsize
Add protection on minimum value for result of get_bufsize
and check the alignment of buffer size: only multiple min_size
is allowed; only 4 bytes alignment was checked previously
(value & 0x3).

For example the "Random" test raises an issue when size is not 8 bytes
aligned because address for buffer = address + size / 2 is not word
aligned.

This patch avoid test error for unsupported size value.

Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-07-07 16:01:23 +02:00
..
Kconfig stm32mp1: ram: add tuning in DDR interactive mode 2019-05-23 11:38:11 +02:00
Makefile stm32mp1: ram: add tuning in DDR interactive mode 2019-05-23 11:38:11 +02:00
stm32mp1_ddr.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
stm32mp1_ddr.h ram: stm32mp1: the property st, phy-cal becomes optional 2020-03-24 14:23:30 +01:00
stm32mp1_ddr_regs.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
stm32mp1_interactive.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
stm32mp1_ram.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
stm32mp1_tests.c ram: stm32mp1: protect minimum value in get_bufsize 2020-07-07 16:01:23 +02:00
stm32mp1_tests.h stm32mp1: ram: add tuning in DDR interactive mode 2019-05-23 11:38:11 +02:00
stm32mp1_tuning.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00