]> git.baikalelectronics.ru Git - uboot.git/commit
usb: dwc3: Calculate REFCLKPER based on reference clock
authorSean Anderson <sean.anderson@seco.com>
Sun, 27 Nov 2022 14:31:54 +0000 (15:31 +0100)
committerMarek Vasut <marex@denx.de>
Sun, 27 Nov 2022 14:34:56 +0000 (15:34 +0100)
commitf99c21cfe5485f4d33948a3215cbc4caae7f45dd
tree60ee4b7eea11f7298ea16e109ee83ac9c13c7ff3
parent3082795470933c660065e0c7c644741705700887
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.

[ marek: Ported from Linux kernel commit
         5114c3ee24875 ("usb: dwc3: Calculate REFCLKPER based on reference clock") ]

Reviewed-by: Sean Anderson <seanga2@gmail.com>
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: Marek Vasut <marex@denx.de> # Port from Linux
drivers/usb/dwc3/core.c