All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] i2c: mpc: Clean up clock selection
@ 2017-11-10  7:50 Arseny Solokha
  2017-11-10  7:50 ` [PATCH 1/4] i2c: mpc: get MPC8xxx I2C clock prescaler before using it in calculations Arseny Solokha
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Arseny Solokha @ 2017-11-10  7:50 UTC (permalink / raw)
  To: Wolfram Sang, linux-i2c, linux-kernel; +Cc: Valentin Longchamp, Arseny Solokha

This series cleans up I2C clock selection for Freescale/NXP MPC SoCs during
the controller initialization for cases when clock settings are not to be
preserved from the bootloader.

Patch 1/4 fixes division by zero which happens during controller
initialization when (1) clock frequency is not specified in the Device
Tree, (2) preservation of clock settings from the bootloader is not
requested, and (3) the clock prescaler (which may actually depend
on the POR configuration) is not explicitly specified. It simply moves
obtaining the prescaler value before the clock computation.

Patch 2/4 unifies obtaining the prescaler value for MPC8544 with other
SoCs. It moves the relevant code to the helper function introduced
in commit 8ce795cb0c6b ("i2c: mpc: assign the correct prescaler from SVR")
and also adds handling of MPC8533 is similar to MPC8544 in this regard.

Patch 3/4 fixes checking the relevant bit in a controller's register used
for selecting the prescaler value for MPC8533 and MPC8544.

Patch 4/4 removes the facility for setting the clock prescaler value
at compile time. This facility is not used in the majority of cases. Getting
the prescaler value at run time currently covers more SoCs. Hardcoding it
is also wrong for some SoCs as it can be configured on board during POR.

Arseny Solokha (4):
  i2c: mpc: get MPC8xxx I2C clock prescaler before using it in
    calculations
  i2c: mpc: unify obtaining the MPC8533/44 I2C clock prescaler w/
    MPC8xxx
  i2c: mpc: fix PORDEVSR2 mask for MPC8533/44
  i2c: mpc: always determine I2C clock prescaler at runtime

 drivers/i2c/busses/i2c-mpc.c | 72 ++++++++++++++++++--------------------------
 1 file changed, 30 insertions(+), 42 deletions(-)

-- 
2.15.0

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-01-15 18:22 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-10  7:50 [PATCH 0/4] i2c: mpc: Clean up clock selection Arseny Solokha
2017-11-10  7:50 ` [PATCH 1/4] i2c: mpc: get MPC8xxx I2C clock prescaler before using it in calculations Arseny Solokha
2017-11-10  7:50 ` [PATCH 2/4] i2c: mpc: unify obtaining the MPC8533/44 I2C clock prescaler w/ MPC8xxx Arseny Solokha
2017-11-10  7:50 ` [PATCH 3/4] i2c: mpc: fix PORDEVSR2 mask for MPC8533/44 Arseny Solokha
2017-11-10  7:50 ` [PATCH 4/4] i2c: mpc: always determine I2C clock prescaler at runtime Arseny Solokha
2017-12-07 10:19 ` [PATCH RESEND 0/4] i2c: mpc: Clean up clock selection Arseny Solokha
2017-12-07 10:20   ` [PATCH RESEND 1/4] i2c: mpc: get MPC8xxx I2C clock prescaler before using it in calculations Arseny Solokha
2017-12-30 18:18     ` [RESEND, " Wolfram Sang
2018-01-15 18:21       ` Wolfram Sang
2017-12-07 10:20   ` [PATCH RESEND 2/4] i2c: mpc: unify obtaining the MPC8533/44 I2C clock prescaler w/ MPC8xxx Arseny Solokha
2017-12-30 18:19     ` [RESEND, " Wolfram Sang
2018-01-15 18:21     ` Wolfram Sang
2017-12-07 10:20   ` [PATCH RESEND 3/4] i2c: mpc: fix PORDEVSR2 mask for MPC8533/44 Arseny Solokha
2017-12-30 18:11     ` [RESEND,3/4] " Wolfram Sang
2018-01-15 18:22     ` Wolfram Sang
2017-12-07 10:20   ` [PATCH RESEND 4/4] i2c: mpc: always determine I2C clock prescaler at runtime Arseny Solokha
2017-12-30 18:14     ` [RESEND, " Wolfram Sang
2018-01-10 11:36       ` Arseny Solokha
2018-01-10 11:36       ` [PATCH v2 " Arseny Solokha
2018-01-15 18:22         ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.