]> git.baikalelectronics.ru Git - uboot.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)
commitedb0e02b348703859d67622055b4500c743a974b
tree63e7fa2cfbfef6e9a20613822b5498769b81db81
parentd47a238206666e31471477f37c20a7ff35554a7b
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