usb: dwc3: dwc3-octeon: Verify clock divider
authorLadislav Michl <ladis@linux-mips.org>
Tue, 8 Aug 2023 09:37:50 +0000 (11:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Aug 2023 12:15:52 +0000 (14:15 +0200)
commitfb57f829beefd4b3746f1b23d51e80ed5d4bb87b
tree40b2b3e110d207eefe8140b41594bf1bda930865
parentff33299ec8bb80cdcc073ad9c506bd79bb2ed20b
usb: dwc3: dwc3-octeon: Verify clock divider

Although valid USB clock divider will be calculated for all valid
Octeon core frequencies, make code formally correct limiting
divider not to be greater that 7 so it fits into H_CLKDIV_SEL
field.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Closes: https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230808/testrun/18882876/suite/build/test/gcc-8-cavium_octeon_defconfig/log
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/ZNIM7tlBNdHFzXZG@lenoch
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/dwc3-octeon.c