From: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: "khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org"
<khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
"w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org"
<w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
"ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org"
<ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
"olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org"
<olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
"linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH V3 1/4] i2c: tegra: make sure register writes completes
Date: Thu, 14 Jun 2012 18:05:56 +0530 [thread overview]
Message-ID: <4FD9DAAC.5000709@nvidia.com> (raw)
In-Reply-To: <4FD8B7FC.3060708-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
On Wednesday 13 June 2012 09:25 PM, Stephen Warren wrote:
> On 06/13/2012 04:12 AM, Laxman Dewangan wrote:
> @@ -165,6 +165,10 @@ static void i2c_writel(struct tegra_i2c_dev
> *i2c_dev, u32 val,
>> unsigned long reg)
>> {
>> writel(val, i2c_dev->base + tegra_i2c_reg_addr(i2c_dev, reg));
>> +
>> + /* Read back register to make sure that register writes completed */
>> + if (reg != I2C_TX_FIFO)
>> + readl(i2c_dev->base + tegra_i2c_reg_addr(i2c_dev, reg));
> I guess that's fine, but it sure does seem rather heavy-weight. Don't
> you only need to do the readback if you just wrote to the IRQ status or
> mask registers, rather than if you wrote to /any/ register other than
> the FIFO?
That's what my second patch but based on your earlier review comment, I
did for every register.
I think it will not matter much as we dont write all register with every
transaction, only during initialization.
Then for each transfer we write manly on Tx fifo and interrupt
mask/status register and hence not too much overweight.
next prev parent reply other threads:[~2012-06-14 12:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-13 10:12 [PATCH v3 0/4] i2c: tegra: Bug fixes, cleanups and M_NOSTART support Laxman Dewangan
2012-06-13 10:12 ` [PATCH V3 1/4] i2c: tegra: make sure register writes completes Laxman Dewangan
[not found] ` <1339582359-7911-2-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-13 15:55 ` Stephen Warren
[not found] ` <4FD8B7FC.3060708-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-14 12:35 ` Laxman Dewangan [this message]
2012-06-14 15:57 ` Stephen Warren
[not found] ` <4FDA09FC.1010307-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-14 16:07 ` Wolfram Sang
2012-06-13 10:12 ` [PATCH V3 2/4] i2c: tegra: add PROTOCOL_MANGLING as supported functionality Laxman Dewangan
2012-06-13 10:12 ` [PATCH V3 3/4] i2c: tegra: support for I2C_M_NOSTART functionality Laxman Dewangan
2012-06-13 10:12 ` [PATCH V3 4/4] i2c: tegra: make all resource allocation through devm_* Laxman Dewangan
[not found] ` <1339582359-7911-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-13 14:05 ` [PATCH v3 0/4] i2c: tegra: Bug fixes, cleanups and M_NOSTART support Wolfram Sang
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=4FD9DAAC.5000709@nvidia.com \
--to=ldewangan-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
/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).