From: James Hogan <james.hogan@imgtec.com>
To: Sifan Naeem <Sifan.Naeem@imgtec.com>
Cc: Wolfram Sang <wsa@the-dreams.de>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
"Stable kernel (v3.19+)" <stable@vger.kernel.org>
Subject: Re: [PATCH 1/8] i2c: img-scb: enable fencing for all versions of the ip
Date: Tue, 28 Jul 2015 10:38:08 +0100 [thread overview]
Message-ID: <55B74D80.9010901@imgtec.com> (raw)
In-Reply-To: <A0E307549471DA4DBAF2DE2DE6CBFB7E4966D862@hhmail02.hh.imgtec.org>
[-- Attachment #1: Type: text/plain, Size: 4282 bytes --]
On 28/07/15 10:26, Sifan Naeem wrote:
> Hi James,
>
>> -----Original Message-----
>> From: James Hogan
>> Sent: 27 July 2015 21:21
>> To: Sifan Naeem
>> Cc: Wolfram Sang; linux-i2c@vger.kernel.org; Stable kernel (v3.19+)
>> Subject: Re: [PATCH 1/8] i2c: img-scb: enable fencing for all versions of the ip
>>
>> Hi Sifan,
>>
>> On Mon, Jul 27, 2015 at 12:47:14PM +0100, Sifan Naeem wrote:
>>> The code to read from the master read fifo, and write to the master
>>> write fifo, checks a bit in an SCB register before every byte to
>>> ensure that the fifo is not full (write fifo) or empty (read fifo).
>>> Due to clock domain crossing inside the SCB block the updated value of
>>> this bit is only visible after 2 cycles.
>>>
>>> The scb_wr_rd_fence() function does 2 dummy writes (to the read-only
>>> revision register), and it's called before reading from or writing to
>>> the fifos to ensure that subsequent reads of the fifo status bits do
>>> not read stale values.
>>>
>>> As the 2 dummy writes are required in all versions of the ip, the
>>> version check is dropped.
>>
>> Is it anticipated that a future version of the hardware will probably resolve
>> the clock domain crossing issue? If so fine, but if not its probably worth
>> removing need_wr_rd_fence.
>>
> Yes, it's expected to be fixed in the future, albeit not in the near future.
Okay, no problem then.
>
>>>
>>> Fixes: 27bce4 ("i2c: img-scb: Add Imagination Technologies I2C SCB
>>> driver")
>>
>> I believe 12 digits of SHA1 is recommended now, to avoid collisions. I suggest
>> doing this:
>> $ git config --global core.abbrev 12
>>
> Should I send a new patch with 12 digit SHA1?
I need to review the other patches anyway (sorry i've been slow to look
through them properly).
>
>>> Signed-off-by: Sifan Naeem <sifan.naeem@imgtec.com>
>>> Cc: Stable kernel (v3.19+) <stable@vger.kernel.org>
>>
>> That's a fairly non-conventional way to specify stable versions. The
>> recommended way to Cc stable according to
>> Documentation/stable_kernel_rules.txt is more like this:
>> Cc: <stable@vger.kernel.org> # 3.19.x-
>>
>
> I go this error when doing that way:
>
> (body) Adding cc: Sifan Naeem <sifan.naeem@imgtec.com> from line 'Signed-off-by: Sifan Naeem <sifan.naeem@imgtec.com>'
> (body) Adding cc: <stable@vger.kernel.org> # 4.1 from line 'Cc: <stable@vger.kernel.org> # 4.1'
> Use of uninitialized value $cc in string eq at /usr/lib/git-core/git-send-email line 983.
> Use of uninitialized value $cc in quotemeta at /usr/lib/git-core/git-send-email line 983.
> W: unable to extract a valid address from: <stable@vger.kernel.org> # 4.1
> W: unable to extract a valid address from: <stable@vger.kernel.org> # 4.1
Sounds like you're using an old version of git. Something similar is
described here:
http://comments.gmane.org/gmane.comp.version-control.git/210042
If the warning can be ignored, you can always add stable back to cc list
with --cc=stable@vger.kernel.org.
Cheers
James
>
>> Patch looks fine though
>>
>> Acked-by: James Hogan <james.hogan@imgtec.com>
>>
> Thanks,
> Sifan
>
>> Thanks
>> James
>>
>>> ---
>>> drivers/i2c/busses/i2c-img-scb.c | 8 ++------
>>> 1 file changed, 2 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/i2c/busses/i2c-img-scb.c
>>> b/drivers/i2c/busses/i2c-img-scb.c
>>> index 00ffd66..5c3c615 100644
>>> --- a/drivers/i2c/busses/i2c-img-scb.c
>>> +++ b/drivers/i2c/busses/i2c-img-scb.c
>>> @@ -278,8 +278,6 @@
>>> #define ISR_COMPLETE(err) (ISR_COMPLETE_M | (ISR_STATUS_M &
>> (err)))
>>> #define ISR_FATAL(err) (ISR_COMPLETE(err) | ISR_FATAL_M)
>>>
>>> -#define REL_SOC_IP_SCB_2_2_1 0x00020201
>>> -
>>> enum img_i2c_mode {
>>> MODE_INACTIVE,
>>> MODE_RAW,
>>> @@ -1120,10 +1118,8 @@ static int img_i2c_init(struct img_i2c *i2c)
>>> return -EINVAL;
>>> }
>>>
>>> - if (rev == REL_SOC_IP_SCB_2_2_1) {
>>> - i2c->need_wr_rd_fence = true;
>>> - dev_info(i2c->adap.dev.parent, "fence quirk enabled");
>>> - }
>>> + /* Fencing enabled by default. */
>>> + i2c->need_wr_rd_fence = true;
>>>
>>> bitrate_khz = i2c->bitrate / 1000;
>>> clk_khz = clk_get_rate(i2c->scb_clk) / 1000;
>>> --
>>> 1.7.9.5
>>>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-07-28 9:38 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-27 11:47 [PATCH 0/8] i2c: img-scb: fixes to support i2c on pistachio Sifan Naeem
2015-07-27 11:47 ` Sifan Naeem
2015-07-27 11:47 ` [PATCH 2/8] i2c: img-scb: do dummy writes before fifo access Sifan Naeem
2015-07-27 11:47 ` Sifan Naeem
[not found] ` <1437997641-32575-1-git-send-email-sifan.naeem-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2015-07-27 11:47 ` [PATCH 1/8] i2c: img-scb: enable fencing for all versions of the ip Sifan Naeem
2015-07-27 11:47 ` Sifan Naeem
2015-07-27 20:20 ` James Hogan
2015-07-27 20:20 ` James Hogan
2015-07-28 9:26 ` Sifan Naeem
2015-07-28 9:38 ` James Hogan [this message]
2015-07-27 11:47 ` [PATCH 3/8] i2c: img-scb: use DIV_ROUND_UP to round divisor values Sifan Naeem
2015-07-27 11:47 ` Sifan Naeem
[not found] ` <1437997641-32575-4-git-send-email-sifan.naeem-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2015-07-28 10:45 ` James Hogan
2015-07-28 10:45 ` James Hogan
2015-07-27 11:47 ` [PATCH 4/8] i2c: img-scb: fix LOW and HIGH period values for the SCL clock Sifan Naeem
2015-07-27 11:47 ` Sifan Naeem
2015-07-28 11:27 ` James Hogan
2015-07-28 11:27 ` James Hogan
2015-07-31 11:12 ` [PATCH 0/8] i2c: img-scb: fixes to support i2c on pistachio Wolfram Sang
2015-07-31 11:12 ` Wolfram Sang
2015-09-07 13:41 ` Ezequiel Garcia
[not found] ` <CAAEAJfCW9cEMDZwta5Q6VVEZfzxTDZ50Fx=YeW6bPMnrtKNcbw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-07 13:50 ` Wolfram Sang
2015-09-07 14:22 ` Ezequiel Garcia
[not found] ` <CAAEAJfBj+qdv58gzOnqMrmN0486Enzbn3G1L0KhMctMkEkXfTw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-07 21:13 ` i2ctransfer (Was: [PATCH 0/8] i2c: img-scb: fixes to support i2c on pistachio) Jean Delvare
2015-07-27 11:47 ` [PATCH 5/8] i2c: img-scb: reset interrupts in img_i2c_soft_reset Sifan Naeem
2015-07-27 11:47 ` Sifan Naeem
[not found] ` <1437997641-32575-6-git-send-email-sifan.naeem-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2015-07-28 11:35 ` James Hogan
2015-07-28 11:35 ` James Hogan
2015-07-28 11:46 ` Sifan Naeem
2015-07-28 11:51 ` James Hogan
2015-07-27 11:47 ` [PATCH 6/8] i2c: img-scb: remove start bit detected status after handling Sifan Naeem
2015-07-27 11:47 ` Sifan Naeem
2015-07-28 13:53 ` James Hogan
2015-07-28 13:53 ` James Hogan
2015-07-29 12:49 ` Sifan Naeem
2015-07-27 11:47 ` [PATCH 7/8] i2c: img-scb: improve transaction complete handle Sifan Naeem
2015-07-27 11:47 ` Sifan Naeem
[not found] ` <1437997641-32575-8-git-send-email-sifan.naeem-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2015-07-29 12:22 ` James Hogan
2015-07-29 12:22 ` James Hogan
[not found] ` <55B8C56A.7050102-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2015-07-29 13:35 ` Sifan Naeem
2015-07-29 13:35 ` Sifan Naeem
2015-07-27 11:47 ` [PATCH 8/8] i2c: img-scb: verify support for requested bit rate Sifan Naeem
2015-07-27 11:47 ` Sifan Naeem
2015-07-29 12:02 ` James Hogan
2015-07-29 12:02 ` James Hogan
2015-07-29 13:34 ` Sifan Naeem
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=55B74D80.9010901@imgtec.com \
--to=james.hogan@imgtec.com \
--cc=Sifan.Naeem@imgtec.com \
--cc=linux-i2c@vger.kernel.org \
--cc=stable@vger.kernel.org \
--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 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.