From: Annaliese McDermond <nh6z@nh6z.net>
To: Stefan Wahren <stefan.wahren@i2se.com>
Cc: f.fainelli@gmail.com, swarren@wwwdotorg.org, wsa@the-dreams.de,
team@nwdigitalradio.com, eric@anholt.net,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH v4] i2c: bcm2835: Model Divider in CCF
Date: Wed, 19 Jun 2019 00:56:48 -0700 [thread overview]
Message-ID: <EBC4BB44-5ED9-4C88-B371-A85774DB16B4@nh6z.net> (raw)
In-Reply-To: <cd25e228-c3e1-2a01-14e3-fe9a5198c78d@i2se.com>
Stefan --
> On Jun 19, 2019, at 12:16 AM, Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> Hi Annaliese,
>
> On 08.06.19 19:14, Annaliese McDermond wrote:
>> 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.
>>
> i've seen reports [1], [2] that this commit causes trouble.
>
> Could you please look into them?
I’ll see if I can look into these and see what’s up.
> Thanks
>
> [1] - https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=242856
> [2] - https://archlinuxarm.org/forum/viewtopic.php?f=23&t=13719
--
Annaliese McDermond
nh6z@nh6z.net
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2019-06-19 7:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 4:29 [PATCH v3] i2c: bcm2835: Model Divider in CCF Annaliese McDermond
2019-06-02 7:40 ` Stefan Wahren
2019-06-04 19:26 ` Eric Anholt
2019-06-07 22:38 ` Wolfram Sang
2019-06-08 17:14 ` [PATCH v4] " Annaliese McDermond
2019-06-12 10:41 ` Wolfram Sang
2019-06-13 5:09 ` Annaliese McDermond
2019-06-13 7:50 ` Wolfram Sang
2019-06-19 7:16 ` Stefan Wahren
2019-06-19 7:56 ` Annaliese McDermond [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=EBC4BB44-5ED9-4C88-B371-A85774DB16B4@nh6z.net \
--to=nh6z@nh6z.net \
--cc=eric@anholt.net \
--cc=f.fainelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=stefan.wahren@i2se.com \
--cc=swarren@wwwdotorg.org \
--cc=team@nwdigitalradio.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).