From: Scott Wood <scottwood@freescale.com>
To: York Sun <yorksun@freescale.com>
Cc: albrecht.dress@arcor.de, linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC] power/mpc85xx: Add delay after enabling I2C master
Date: Mon, 22 Jul 2013 19:33:31 -0500 [thread overview]
Message-ID: <20130723003330.GA14649@home.buserror.net> (raw)
In-Reply-To: <1368480428-23926-1-git-send-email-yorksun@freescale.com>
On Mon, May 13, 2013 at 02:27:08PM -0700, York Sun wrote:
> Erratum A-006037 indicates I2C controller executes the write to I2CCR only
> after it sees SCL idle for 64K cycle of internal I2C controller clocks. If
> during this waiting period, I2C controller is disabled (I2CCR[MEN] set to
> 0), then the controller could end in bad state, and hang the future access
> to I2C register.
>
> The mpc_i2c_fixup() function tries to recover the bus from a stalled state
> where the 9th clock pulse wasn't generated. However, this workaround
> disables and enables I2C controller without meeting waiting requirement of
> this erratum.
>
> This erratum applies to some 85xx SoCs. It is safe to apply to all of them
> for mpc_i2c_fixup().
>
> Signed-off-by: York Sun <yorksun@freescale.com>
>
> ---
> I'd like to get rid of the #ifdef if mpc5121 is OK with the longer delay.
Are mpc5121 and mpc85xx the only things that use this?
Are you sure the delay always works out to be longer? What is the
relationship between fsl_get_sys_freq() and i2c->real_clk?
In any case, you should send this patch to the i2c maintainer and list.
-Scott
next prev parent reply other threads:[~2013-07-23 0:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-13 21:27 [PATCH RFC] power/mpc85xx: Add delay after enabling I2C master York Sun
2013-07-23 0:33 ` Scott Wood [this message]
2013-07-23 15:37 ` [RFC] " York Sun
2013-07-23 18:43 ` Scott Wood
2013-07-23 20:32 ` York Sun
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=20130723003330.GA14649@home.buserror.net \
--to=scottwood@freescale.com \
--cc=albrecht.dress@arcor.de \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=yorksun@freescale.com \
/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).