From: Vitaly Bordug <vitb@kernel.crashing.org>
To: Eugene Surovegin <ebs@ebshome.net>
Cc: Jean Delvare <khali@linux-fr.org>,
linuxppc-dev@ozlabs.org, Stefan Roese <sr@denx.de>,
i2c@lm-sensors.org
Subject: Re: [PATCH] i2c: devtree-aware iic support for PPC4xx
Date: Sat, 15 Sep 2007 15:29:21 +0400 [thread overview]
Message-ID: <20070915152921.36ccbec7@localhost.localdomain> (raw)
In-Reply-To: <20070915100434.GA4978@gate.ebshome.net>
Hello Eugene,
On Sat, 15 Sep 2007 03:04:34 -0700
Eugene Surovegin wrote:
> On Sat, Sep 15, 2007 at 11:08:01AM +0200, Stefan Roese wrote:
> > This patch reworks existing ibm-iic driver to an of_platform_device
> > and enables it to talk to device tree directly. The ocp quirks are
> > completely removed by this patch.
> >
> > This is done to enable I2C support for the PPC4xx platforms now
> > being moved from arch/ppc (ocp) to arch/powerpc (of). The first board
> > using this driver will be the AMCC Sequoia (PPC440EPx).
> >
> > Signed-off-by: Stefan Roese <sr@denx.de>
> >
> > + /* clckdiv is the same for *all* IIC interfaces,
> > + * but I'd rather make a copy than introduce another global. --ebs
> > + */
> > + /* Parent bus should have frequency filled */
> > + prop = of_get_property(of_get_parent(np), "clock-frequency", &len);
> > + if (prop == NULL) {
> > + printk(KERN_ERR
> > + "ibm-iic(%s):no clock-frequency prop on parent bus!\n",
> > + dev->np->full_name);
> > + goto fail;
> > + }
> > +
> > + DBG("%s: clckdiv = %d\n", dev->np->full_name, dev->clckdiv);
> > +
>
> Where is dev->clkdiv initialized?
>
> My original version used iic_clkdiv() to calculate correct devider
> based on OPB frequency. Did you even test this code?
>
heh, just my $0.02: the upper clearly shows one like missing, maybe during cleanup (since there is opb freq pulled in quote):
dev->clckdiv = iic_clckdiv(*prop); or smth like that
--
Sincerely, Vitaly
next prev parent reply other threads:[~2007-09-15 11:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-15 9:08 [PATCH] i2c: devtree-aware iic support for PPC4xx Stefan Roese
2007-09-15 10:04 ` Eugene Surovegin
2007-09-15 11:29 ` Vitaly Bordug [this message]
2007-09-16 9:07 ` Stefan Roese
2007-09-16 18:55 ` Eugene Surovegin
2007-09-15 11:36 ` Stephen Rothwell
2007-09-16 9:08 ` Stefan Roese
-- strict thread matches above, loose matches on Subject: below --
2007-09-16 11:52 Stefan Roese
2007-09-16 16:27 ` Robert Schwebel
2007-09-16 16:37 ` Josh Boyer
2007-09-17 1:32 ` David Gibson
2007-09-16 18:53 ` Eugene Surovegin
2007-09-17 1:31 ` David Gibson
2007-09-17 5:34 ` Stefan Roese
2007-09-17 5:50 ` David Gibson
2007-09-17 6:22 ` Eugene Surovegin
2007-09-17 18:16 ` Jean Delvare
2007-09-17 19:27 ` Grant Likely
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=20070915152921.36ccbec7@localhost.localdomain \
--to=vitb@kernel.crashing.org \
--cc=ebs@ebshome.net \
--cc=i2c@lm-sensors.org \
--cc=khali@linux-fr.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=sr@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;
as well as URLs for NNTP newsgroup(s).