]> git.dujemihanovic.xyz Git - u-boot.git/commit
mmc: arm_pl180: Limit data transfer to U16_MAX
authorMaximilian Brune <maximilian.brune@9elements.com>
Mon, 15 Apr 2024 09:53:11 +0000 (11:53 +0200)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 26 Apr 2024 06:32:06 +0000 (15:32 +0900)
commit1776213dadef4b578f98bcf18beb152f8975a8bf
tree1e24ee77004a5f69939fc7dad29cbbe858e6ee53
parent9ae1fe1a5848b48c42ef9ebe4d4a6928ee336afd
mmc: arm_pl180: Limit data transfer to U16_MAX

Currently fetching files bigger that cause a data transfer greater than
U16_MAX fails.

The reason is that the specification defines the datalength register
as a 16 bit wide register, but in u-boot it is used as if it is an
32 bit register. Therefore values greater than U16_MAX cause an
infinite loop inside u-boot. U-boot expects to get more data from
interface/hardware then it will ever get and therefore inifintely waits
for more data that will never come.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/arm_pl180_mmci.c