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)
commit9da06d7bdec7dad8018c23b180e410ef2e7a4367
tree2114ecf84384a9bf24965c07fdf919fc079ebd10
parente3228ed92893458e360ba2be8d75d859e115e552
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