]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: aspeed: Only map necessary address window region
authorChin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
Wed, 1 Oct 2025 11:26:05 +0000 (19:26 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 13 Oct 2025 10:27:47 +0000 (11:27 +0100)
commit64d87ccfae3326a9561fe41dc6073064a083e0df
treefb7d3e54b982a75fcf38412f10b8b86963c25811
parent0586b53d4a0c7c5a132629f99da934cc674ea4cd
spi: aspeed: Only map necessary address window region

Previously, the driver mapped the entire SPI address decoding region during
probe. On systems with small flash or limited memory, this could lead to
excessive memory usage or allocation failures.

This patch changes the strategy to initially map a small address window
for SPI flash device probing. After determining each chip select's flash
size, the driver unmaps the temporary region and remaps only the required
address window accordingly.

Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
Link: https://patch.msgid.link/20251001112605.1130723-7-chin-ting_kuo@aspeedtech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-aspeed-smc.c