]> git.dujemihanovic.xyz Git - u-boot.git/commit
clk: renesas: Confirm all clock & reset changes on RZ/G2L
authorPaul Barker <paul.barker.ct@bp.renesas.com>
Tue, 27 Feb 2024 20:40:28 +0000 (20:40 +0000)
committerMarek Vasut <marek.vasut+renesas@mailbox.org>
Wed, 28 Feb 2024 17:42:27 +0000 (18:42 +0100)
commitaecd69879df8e7051281c1a2414ad33e75ff4ef4
tree433500e57617ee3db4654681791c92d5cf03c212
parentabd4fb5ac13215733569925a06991e0a182ede14
clk: renesas: Confirm all clock & reset changes on RZ/G2L

When enabling/disabling a clock or reset signal, confirm that the change
has completed before returning from the function. A somewhat arbitrary
100ms timeout is defined to ensure that the system doesn't lock up in
the case of an error.

Since we need to dynamically determine if we're waiting for a 0 bit or a
1 bit, it's easier to use wait_for_bit_32() than readl_poll_timeout().

This change is needed for reliable initialization of the I2C driver
which is added in a following patch.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
drivers/clk/renesas/rzg2l-cpg.c