Skip to content
Unverified Commit bb084f94 authored by Cédric Le Goater's avatar Cédric Le Goater Committed by Mark Brown
Browse files

spi: aspeed: Adjust direct mapping to device size



The segment registers of the FMC/SPI controllers provide a way to
configure the mapping window of the flash device contents on the AHB
bus. Adjust this window to the size of the spi-mem mapping.

Things get more complex with multiple devices. The driver needs to
also adjust the window of the next device to make sure that there is
no overlap, even if there is no available device. The proposal below
is not perfect but it is covering all the cases we have seen on
different boards with one and two devices on the same bus.

Reviewed-by: default avatarJoel Stanley <joel@jms.id.au>
Tested-by: default avatarJoel Stanley <joel@jms.id.au>
Tested-by: default avatarTao Ren <rentao.bupt@gmail.com>
Tested-by: default avatarJae Hyun Yoo <quic_jaehyoo@quicinc.com>
Signed-off-by: default avatarCédric Le Goater <clg@kaod.org>
Link: https://lore.kernel.org/r/20220509175616.1089346-6-clg@kaod.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9da06d7b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment