]> git.baikalelectronics.ru Git - kernel.git/commit
clk: shmobile: div6: Avoid changing divisor in .disable()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 24 Nov 2014 14:57:59 +0000 (15:57 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 8 Jan 2015 15:13:19 +0000 (16:13 +0100)
commit67b2ad52fc8c8c3859259686aa156c5cc4d59fe1
treed84b7ed486f0922e2119c2605540f43c09f5d56e
parentc687bb41805a1238a38a086952014d5682516d9d
clk: shmobile: div6: Avoid changing divisor in .disable()

While DIV6 clocks require the divisor field to be non-zero when stopping
the clock, some clocks (e.g. ZB on sh73a0) fail to be re-enabled later
if the divisor field is changed when stopping the clock.
The reason for this is unknown.

To fix this, do not touch the divisor field if it's already non-zero.

On kzm9g, the smsc911x Ethernet controller is connected to the sh73a0
Bus State Controller, which is clocked by the ZB clock. Without this
fix, if the ZB clock is disabled during system suspend, and re-enabled
during resume, the kernel locks up when the smsc911x driver tries to
access the Ethernet registers.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/clk/shmobile/clk-div6.c