From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Grandegger Subject: Re: [PATCH] powerpc: i2c-mpc: make speed registers configurable via FDT Date: Thu, 31 Jul 2008 23:14:40 +0200 Message-ID: <48922B40.3010808@grandegger.com> References: <20080731182810.GB29097@secretlab.ca> <48921888.3020900@grandegger.com> <48921954.4020103@freescale.com> <48921DED.6010403@grandegger.com> <9e4733910807311332q611b43b3y26f64b5269ccb657@mail.gmail.com> <48922273.6070801@freescale.com> <20080731204838.GA29834@secretlab.ca> <9e4733910807311355q3394b4bfg66c37055384451f7@mail.gmail.com> <48922715.2000304@freescale.com> <9e4733910807311403o63c37366ldae30e873f33a21e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <9e4733910807311403o63c37366ldae30e873f33a21e@mail.gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+glppd-linuxppc64-dev=m.gmane.org@ozlabs.org Errors-To: linuxppc-dev-bounces+glppd-linuxppc64-dev=m.gmane.org@ozlabs.org To: Jon Smirl Cc: Scott Wood , Timur Tabi , Linux I2C , Linuxppc-dev@ozlabs.org List-Id: linux-i2c@vger.kernel.org Jon Smirl wrote: > On 7/31/08, Timur Tabi wrote: >> Jon Smirl wrote: >> >> > Isn't there a single global divider that generates all the i2c source >> > clocks? You don't want to copy a global value into each i2c node. >> >> >> Why not? There are only two I2C devices, and it's theoretically possible for >> them to have different input clock frequencies. Keeping it in the I2C node >> allows the I2C driver to reference a property directly in the node that its probing. > > But that's the same as saying we should copy the system clock > frequency into all of the PSC nodes because we might implement > hardware where they aren't all clocked off from the same input clock > source. > >> > Aren't we talking about the /2 or /3 or /1 divider that appears to be >> > randomly implemented on various members of the mpc8xxx family? > > I don't this these dividers or clocks need to be exposed at all if > you'd just put that ugly code snippet into your platform driver. U-Boot does not (yet) use the FDT and it has therefore to use that ugly code to derive the I2C input clock frequency. I think its completely legal to put that hardware specific information into the FDT and get rid of such code. Wolfgang.