summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-s3c2410.c
diff options
context:
space:
mode:
authorAnnaliese McDermond <nh6z@nh6z.net>2019-06-08 20:14:43 +0300
committerWolfram Sang <wsa@the-dreams.de>2019-06-12 13:36:49 +0300
commitbebff81fb8b9216eb4fba22cf910553621ae3477 (patch)
tree9161655787f42cc3d0f587f7c6a68bf0581dcefa /drivers/i2c/busses/i2c-s3c2410.c
parentfbbe4941f0dd36b5d39a4a1796aca8ce1f8efdf5 (diff)
downloadlinux-bebff81fb8b9216eb4fba22cf910553621ae3477.tar.xz
i2c: bcm2835: Model Divider in CCF
Model the I2C bus clock divider as a part of the Core Clock Framework. Primarily this removes the clk_get_rate() call from each transfer. This call causes problems for slave drivers that themselves have internal clock components that are controlled by an I2C interface. When the slave's internal clock component is prepared, the prepare lock is obtained, and it makes calls to the I2C subsystem to command the hardware to activate the clock. In order to perform the I2C transfer, this driver sets the divider, which requires it to get the parent clock rate, which it does with clk_get_rate(). Unfortunately, this function will try to take the clock prepare lock, which is already held by the slave's internal clock calls creating a deadlock. Modeling the divider in the CCF natively removes this dependency and the divider value is only set upon changing the bus clock frequency or changes in the parent clock that cascade down to this divisor. This obviates the need to set the divider with every transfer and avoids the deadlock described above. It also should provide better clock debugging and save a few cycles on each transfer due to not having to recalcuate the divider value. Signed-off-by: Annaliese McDermond <nh6z@nh6z.net> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-s3c2410.c')
0 files changed, 0 insertions, 0 deletions