Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-17 Thread Grant Likely
On 9/16/07, Stefan Roese <[EMAIL PROTECTED]> wrote: > On Sunday 16 September 2007, Eugene Surovegin wrote: > > Hmm, I just noticed that you basically added a copy of existing > > driver with small changes to support OF while keeping OCP one. > > > > Why not just add OF support to the existing code

Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-17 Thread Jean Delvare
Hi Stefan, On Mon, 17 Sep 2007 07:34:08 +0200, Stefan Roese wrote: > On Sunday 16 September 2007, Eugene Surovegin wrote: > > Hmm, I just noticed that you basically added a copy of existing > > driver with small changes to support OF while keeping OCP one. > > > > Why not just add OF support to th

Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-16 Thread Eugene Surovegin
On Mon, Sep 17, 2007 at 07:34:08AM +0200, Stefan Roese wrote: > > My understanding was, that adding many #ifdef's into the code was not the > preferred way. But just making a copy seems to be a proffered one? Wow. OCP and/or OF part is quite small part of the driver; another approach would be

Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-16 Thread David Gibson
On Mon, Sep 17, 2007 at 07:34:08AM +0200, Stefan Roese wrote: > On Sunday 16 September 2007, Eugene Surovegin wrote: > > Hmm, I just noticed that you basically added a copy of existing > > driver with small changes to support OF while keeping OCP one. > > > > Why not just add OF support to the exis

Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-16 Thread Stefan Roese
On Sunday 16 September 2007, Eugene Surovegin wrote: > Hmm, I just noticed that you basically added a copy of existing > driver with small changes to support OF while keeping OCP one. > > Why not just add OF support to the existing code (under some ifdef), > and then remove OCP support as soon as p

Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-16 Thread David Gibson
On Sun, Sep 16, 2007 at 06:27:47PM +0200, Robert Schwebel wrote: > On Sun, Sep 16, 2007 at 01:52:02PM +0200, Stefan Roese wrote: > > diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig > > index 9f3a4cd..12453e2 100644 > > --- a/drivers/i2c/busses/Kconfig > > +++ b/drivers/i2c/buss

Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-16 Thread David Gibson
On Sun, Sep 16, 2007 at 11:53:30AM -0700, Eugene Surovegin wrote: > On Sun, Sep 16, 2007 at 01:52:02PM +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

Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-16 Thread Eugene Surovegin
On Sun, Sep 16, 2007 at 11:07:23AM +0200, Stefan Roese wrote: > On Saturday 15 September 2007, Vitaly Bordug wrote: > > > 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? > >

Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-16 Thread Eugene Surovegin
On Sun, Sep 16, 2007 at 01:52:02PM +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 platfor

Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-16 Thread Robert Schwebel
On Sun, Sep 16, 2007 at 01:52:02PM +0200, Stefan Roese wrote: > diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig > index 9f3a4cd..12453e2 100644 > --- a/drivers/i2c/busses/Kconfig > +++ b/drivers/i2c/busses/Kconfig > @@ -220,7 +220,17 @@ config I2C_PIIX4 > > config I2C_IBM_II

Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-16 Thread Josh Boyer
On Sun, 16 Sep 2007 18:27:47 +0200 Robert Schwebel <[EMAIL PROTECTED]> wrote: > On Sun, Sep 16, 2007 at 01:52:02PM +0200, Stefan Roese wrote: > > diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig > > index 9f3a4cd..12453e2 100644 > > --- a/drivers/i2c/busses/Kconfig > > +++ b/dr

Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-16 Thread Stefan Roese
On Saturday 15 September 2007, Stephen Rothwell wrote: > [Just some trivial things] Thanks for the feedback. I'll change those things and resubmit. Best regads, Stefan ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/list

Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-16 Thread Stefan Roese
On Saturday 15 September 2007, Vitaly Bordug wrote: > > 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? Yes, I tested it successfully on the Sequoia eval board. > heh, just my $0.

Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-15 Thread Stephen Rothwell
[Just some trivial things] On Sat, 15 Sep 2007 11:08:01 +0200 Stefan Roese <[EMAIL PROTECTED]> wrote: > > +++ b/drivers/i2c/busses/i2c-ibm_iic.h > @@ -22,7 +22,8 @@ > #ifndef __I2C_IBM_IIC_H_ > #define __I2C_IBM_IIC_H_ > > -#include > +#include > +#include Please include linux/of.h, of_de

Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-15 Thread Vitaly Bordug
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 re

Re: [PATCH] i2c: devtree-aware iic support for PPC4xx

2007-09-15 Thread Eugene Surovegin
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 platfor