]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: mv64xxx: The n clockdiv factor is 0 based on sunxi SoCs
authorHans de Goede <hdegoede@redhat.com>
Sun, 27 Sep 2015 14:57:08 +0000 (16:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Feb 2016 22:28:29 +0000 (14:28 -0800)
commit226706fd3918ea3e42c31de2476df3e1155b9296
tree69a169186a0be54303b05bd69be21c57b840adb7
parentec6f137eef9c52bdb86924df96ff0f2ba4524ee2
i2c: mv64xxx: The n clockdiv factor is 0 based on sunxi SoCs

commit bba61f50f76574ca5b84b310925be7c2e8e64275 upstream.

According to the datasheets the n factor for dividing the tclk is
2 to the power n on Allwinner SoCs, not 2 to the power n + 1 as it is
on other mv64xxx implementations.

I've contacted Allwinner about this and they have confirmed that the
datasheet is correct.

This commit fixes the clk-divider calculations for Allwinner SoCs
accordingly.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Tested-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-mv64xxx.c