public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Reset i2c slave devices during init on mpc5xxx cpus
Date: Thu, 03 Sep 2009 07:17:51 +0200	[thread overview]
Message-ID: <4A9F517F.3060906@denx.de> (raw)
In-Reply-To: <20090827215328.M21874@coldhaus.com>

Hello Eric,

after applying your patch I got the following warning:

$ ./MAKEALL galaxy5200
Configuring for galaxy5200 board...
i2c.c:223: warning: function declaration isn't a prototype
   text    data     bss     dec     hex filename
 239760   12928  283136  535824   82d10 ./u-boot
$

please fix, thanks.

Eric Millbrandt wrote:
> Reset any i2c devices that may have been interrupted during a system reset.
> Normally this would be accomplished by clocking the line until SCL and SDA
> are released and then sending a start condtiion (From an Atmel datasheet).
> There is no direct access to the i2c pins so instead create start commands
> through the i2c interface.  Send a start command then delay for the SDA Hold
> time, repeat this by disabling/enabling the bus a total of 9 times.
> 
> Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
> ---
> 
> Heiko,
> 
> I was able to implement a i2c reset function with features common to all
> mpc5xxx cpu.  Nothing was left from the first implementation, so I am
> submitting this as a new patch.

Thanks!

[..]
> + * time, repeat this by disabling/enabling the bus a total of 9 times.
> + */
> +static void send_reset()

should be
static void send_reset(void)

> +{
> +	struct mpc5xxx_i2c *regs = (struct mpc5xxx_i2c *)I2C_BASE;

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

      reply	other threads:[~2009-09-03  5:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-27 22:04 [U-Boot] [PATCH] Reset i2c slave devices during init on mpc5xxx cpus Eric Millbrandt
2009-09-03  5:17 ` Heiko Schocher [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=4A9F517F.3060906@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.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