i2c: mpc: unify obtaining the MPC8533/44 I2C clock prescaler w/ MPC8xxx
authorArseny Solokha <asolokha@kb.kras.ru>
Thu, 7 Dec 2017 10:20:01 +0000 (17:20 +0700)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 15 Jan 2018 18:13:33 +0000 (19:13 +0100)
commitf6214f6f2b11e696a83b97f90b7a0f04efb8ec09
treedaf2c450c9dddde26c96fe25db586b8e0758d622
parent6d106139191e58b9f4ef126cfc1e3c26c0d6702e
i2c: mpc: unify obtaining the MPC8533/44 I2C clock prescaler w/ MPC8xxx

Commit 8ce795cb0c6b ("i2c: mpc: assign the correct prescaler from SVR")
introduced the common helper function for obtaining the actual clock
prescaler value for MPC85xx. However, getting the prescaler for MPC8544
which depends on the SEC frequency ratio on this platform, has been always
performed separately based on the corresponding Device Tree configuration.

Move special handling of MPC8544 into that common helper. Make it dependent
on the SoC version and not on Device Tree compatible node, as is the case
with all other SoCs. Handle MPC8533 the same way which is similar
to MPC8544 in this regard, according to AN2919 "Determining the I2C
Frequency Divider Ratio for SCL".

Signed-off-by: Arseny Solokha <asolokha@kb.kras.ru>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-mpc.c