Skip to content
Unverified Commit 2d9f4877 authored by Vaishnav Achath's avatar Vaishnav Achath Committed by Mark Brown
Browse files

spi: omap2-mcspi: Fix hardcoded reference clock



A hardcoded reference clock of 48 MHz is used to calculate the
clock divisor values, but the reference clock frequency can be
different across devices and can be configured which can cause
a mismatch between the reported frequency and actual SPI clock
frequency observed. Fix this by fetching the clock rate from
the clock provider and falling back to hardcoded reference only
if the clock is not supplied.

Fixes: 2cd7d393 ("arm64: dts: ti: k3-am654: Add McSPI DT nodes")

Signed-off-by: default avatarVaishnav Achath <vaishnav.a@ti.com>
Reviewed-by: default avatarDhruva Gole <d-gole@ti.com>
Link: https://lore.kernel.org/r/20230926113812.30692-1-vaishnav.a@ti.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9f778f37
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment