usb: dwc3: Calculate REFCLKPER based on reference clock
authorSean Anderson <sean.anderson@seco.com>
Thu, 27 Jan 2022 20:06:32 +0000 (15:06 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Feb 2022 10:42:22 +0000 (11:42 +0100)
commit5114c3ee24875270e9f9ef696c46832e5782587c
tree2d9096c28241f67afe791b7b7be022a60e402756
parent33fb697ec7e58c4f9b6a68d2786441189cd2df92
usb: dwc3: Calculate REFCLKPER based on reference clock

Instead of using a special property to determine the reference clock
period, use the rate of the reference clock. When we have a legacy
snps,ref-clock-period-ns property and no reference clock, use it
instead. Fractional clocks are not currently supported, and will be
dealt with in the next commit.

Tested-by: Robert Hancock <robert.hancock@calian.com>
Reviewed-by: Robert Hancock <robert.hancock@calian.com>
Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Link: https://lore.kernel.org/r/20220127200636.1456175-4-sean.anderson@seco.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/core.c