Skip to content

Commit 4f0ad4f

Browse files
committed
spi: microchip-core-qspi: set min_speed_hz during probe
The controller's minimum possible bus clock is 1/30 the rate of the input clock. Naively set the minimum bus clock speed the controller is capable of during probe, assuming that the rate will never reduce further. Signed-off-by: Conor Dooley <[email protected]>
1 parent 9f3781e commit 4f0ad4f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/spi/spi-microchip-core-qspi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ static int mchp_coreqspi_probe(struct platform_device *pdev)
551551
ctlr->mode_bits = SPI_CPOL | SPI_CPHA | SPI_RX_DUAL | SPI_RX_QUAD |
552552
SPI_TX_DUAL | SPI_TX_QUAD;
553553
ctlr->dev.of_node = np;
554+
ctlr->min_speed_hz = clk_get_rate(qspi->clk) / 30;
554555

555556
ret = devm_spi_register_controller(&pdev->dev, ctlr);
556557
if (ret) {

0 commit comments

Comments
 (0)