]> git.baikalelectronics.ru Git - kernel.git/commit
spi: aspeed: Add support for direct mapping
authorCédric Le Goater <clg@kaod.org>
Mon, 9 May 2022 17:56:09 +0000 (19:56 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 16 May 2022 11:59:16 +0000 (12:59 +0100)
commit213339c7d3f455b6b41562fb5c564e091c2e6a0d
tree2114ecf84384a9bf24965c07fdf919fc079ebd10
parentdcce466b2966cb9e5bd652afcdc950079fa1da35
spi: aspeed: Add support for direct mapping

Use direct mapping to read the flash device contents. This operation
mode is called "Command mode" on Aspeed SoC SMC controllers. It uses a
Control Register for the settings to apply when a memory operation is
performed on the flash device mapping window.

If the window is not big enough, fall back to the "User mode" to
perform the read.

Direct mapping for writes will come later when validated.

Reviewed-by: Joel Stanley <joel@jms.id.au>
Tested-by: Joel Stanley <joel@jms.id.au>
Tested-by: Tao Ren <rentao.bupt@gmail.com>
Tested-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Link: https://lore.kernel.org/r/20220509175616.1089346-5-clg@kaod.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-aspeed-smc.c