]> git.dujemihanovic.xyz Git - u-boot.git/commit
spi: cadence-qspi: Move ref clock calculation to probe
authorPratyush Yadav <p.yadav@ti.com>
Mon, 24 Feb 2020 07:10:51 +0000 (12:40 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Tue, 28 Apr 2020 20:14:35 +0000 (01:44 +0530)
commit0a9c2874978a8468c92ed0dafe7a0cf239dc6a35
tree63e7fa2cfbfef6e9a20613822b5498769b81db81
parent7ddea756540b5adddfde3b890fa46a40c649e68f
spi: cadence-qspi: Move ref clock calculation to probe

"assigned-clock-parents" and "assigned-clock-rates" DT properties take
effect only after ofdata_to_platdata() when clk_set_defaults() is called
in device_probe(). Therefore clk get rate() would return a wrong value
in ofdata_to_platdata() when compared with probe. Hence it needs to be
moved to probe.

Tested on u-boot-ti/next.

Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Acked-by: Vignesh Raghavendra <vigneshr@ti.com>
Acked-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/spi/cadence_qspi.c