linux-stable/drivers
Claudiu Beznea 0cc1de475c clk: at91: usb: continue if clk_hw_round_rate() return zero
[ Upstream commit b0ecf1c6c6 ]

clk_hw_round_rate() may call round rate function of its parents. In case
of SAM9X60 two of USB parrents are PLLA and UPLL. These clocks are
controlled by clk-sam9x60-pll.c driver. The round rate function for this
driver is sam9x60_pll_round_rate() which call in turn
sam9x60_pll_get_best_div_mul(). In case the requested rate is not in the
proper range (rate < characteristics->output[0].min &&
rate > characteristics->output[0].max) the sam9x60_pll_round_rate() will
return a negative number to its caller (called by
clk_core_round_rate_nolock()). clk_hw_round_rate() will return zero in
case a negative number is returned by clk_core_round_rate_nolock(). With
this, the USB clock will continue its rate computation even caller of
clk_hw_round_rate() returned an error. With this, the USB clock on SAM9X60
may not chose the best parent. I detected this after a suspend/resume
cycle on SAM9X60.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lkml.kernel.org/r/1579261009-4573-2-git-send-email-claudiu.beznea@microchip.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-23 10:30:17 +02:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base
bcma
block rbd: call rbd_dev_unprobe() after unwatching and flushing notifies 2020-04-23 10:30:15 +02:00
bluetooth
bus
cdrom
char
clk clk: at91: usb: continue if clk_hw_round_rate() return zero 2020-04-23 10:30:17 +02:00
clocksource
connector
cpufreq
cpuidle
crypto
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware
fmc
fpga
fsi
gnss
gpio
gpu
hid
hsi
hv x86/Hyper-V: Report crash data in die() when panic_on_oops is set 2020-04-23 10:30:17 +02:00
hwmon
hwspinlock
hwtracing
i2c
ide
idle
iio
infiniband
input
iommu
ipack
irqchip irqchip/mbigen: Free msi_desc on device teardown 2020-04-23 10:30:13 +02:00
isdn
leds
lightnvm
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd
misc
mmc
mtd
mux
net wil6210: remove reset file from debugfs 2020-04-21 09:03:13 +02:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of of: overlay: kmemleak in dup_and_fixup_symbol_prop() 2020-04-23 10:30:14 +02:00
opp
oprofile
parisc
parport
pci
pcmcia
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi scsi: sg: add sg_remove_request in sg_common_write 2020-04-23 10:30:12 +02:00
sfi
sh
siox
slimbus
sn
soc
soundwire
spi
spmi
ssb
staging
target
tc
tee
thermal
thunderbolt
tty
uio
usb
uwb
vfio
vhost
video video: fbdev: sis: Remove unnecessary parentheses and commented code 2020-04-23 10:30:15 +02:00
virt
virtio
visorbus
vlynq
vme
w1
watchdog watchdog: sp805: fix restart handler 2020-04-23 10:30:12 +02:00
xen
zorro
Kconfig
Makefile