]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: mpc: assign the correct prescaler from SVR
authorValentin Longchamp <valentin.longchamp@keymile.com>
Tue, 10 Feb 2015 15:46:33 +0000 (16:46 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Sun, 15 Mar 2015 10:04:54 +0000 (11:04 +0100)
commit2de188bc21f204a07788db091e4119fcba5e6ffa
treeec29263e34e460c18806c9db94bb10c94c69f44b
parent3a47e08b7580fbaca9aa127d4aae8c64d41b6020
i2c: mpc: assign the correct prescaler from SVR

For the 85xx platforms, the source clock for the i2c-mpc can change from
one SoC to another. This is documented in the AN2919 "Determining the
I2C Frequency Divider Ratio for SCL" by Freescale. Not taking this into
account can lead to the output SCL frequency to by off by an offset. It
was observed on the P2041 from the QorIQ family.

This patch fixes this problem by setting the prescaler value to the
appropriate value when required. The SoCs that required a different
prescaler than 1 are identified by reading out the SVR as discussed in
http://thread.gmane.org/gmane.linux.drivers.devicetree/94247/focus=20556

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-mpc.c