spi: cadence-qspi: store device data pointer in private struct
authorThéo Lebrun <theo.lebrun@bootlin.com>
Fri, 5 Apr 2024 15:02:14 +0000 (17:02 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 8 Apr 2024 14:18:09 +0000 (15:18 +0100)
commitdcc594aef1bf3a6a49b77ad2c0348d894b7cd956
tree45085052975df0223556388453ffa00a937ab096
parent708eafeba9eec51c5bde8efef2a7c22d7113b771
spi: cadence-qspi: store device data pointer in private struct

Avoid of_device_get_match_data() call on each IRQ and each read
operation. Store pointer in `struct cqspi_st` device instance.

End-to-end performance measurements improve with this patch. On a given
octal flash, reading 235M over UBIFS is ~3.4% faster. During that read,
the average cqspi_exec_mem_op() call goes from 85.4µs to 80.7µs
according to ftrace. The worst case goes from 622.4µs to 615.2µs.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Link: https://msgid.link/r/20240405-cdns-qspi-mbly-v2-4-956679866d6d@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence-quadspi.c