aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorLukas Wunner <[email protected]>2019-09-11 12:15:30 +0200
committerMark Brown <[email protected]>2019-09-11 15:56:30 +0100
commit571e31fa60b3697d5db26140e16d5c45c51c9815 (patch)
tree12c3905bb0ca9519a3e7156eaccf61f014e38181 /tools/perf/util/trace-event-scripting.c
parentc3ef8207833206f53b1ea433dc25c0c9b30d4424 (diff)
spi: bcm2835: Cache CS register value for ->prepare_message()
The BCM2835 SPI driver needs to set up the clock polarity in its ->prepare_message() hook before spi_transfer_one_message() asserts chip select to avoid a gratuitous clock signal edge (cf. commit acace73df2c1 ("spi: bcm2835: set up spi-mode before asserting cs-gpio")). Precalculate the CS register value (which selects the clock polarity) once in ->setup() and use that cached value in ->prepare_message() and ->transfer_one(). This avoids one MMIO read per message and one per transfer, yielding a small latency improvement. Additionally, a forthcoming commit will use the precalculated value to derive the register value for clearing the RX FIFO, which will eliminate the need for an RX dummy buffer when performing TX-only DMA transfers. Tested-by: Nuno Sá <[email protected]> Tested-by: Noralf Trønnes <[email protected]> Signed-off-by: Lukas Wunner <[email protected]> Acked-by: Stefan Wahren <[email protected]> Acked-by: Martin Sperl <[email protected]> Link: https://lore.kernel.org/r/d17c1d7fcdc97fffa961b8737cfd80eeb14f9416.1568187525.git.lukas@wunner.de Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions