From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 26 Jul 2008 19:25:47 -0600 From: Grant Likely To: Wolfgang Grandegger Subject: Re: [PATCH] powerpc: i2c-mpc: make speed registers configurable via FDT Message-ID: <20080727012547.GG12191@secretlab.ca> References: <488982B5.4070102@grandegger.com> <4889942C.4040800@scram.de> <48899736.8020400@grandegger.com> <4889F299.3080403@grandegger.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <4889F299.3080403@grandegger.com> Sender: Grant Likely Cc: Scott Wood , Linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, Jul 25, 2008 at 05:34:49PM +0200, Wolfgang Grandegger wrote: > Grant Likely wrote: >> On Fri, Jul 25, 2008 at 5:04 AM, Wolfgang Grandegger wrote: >>> I was also thinking to just overtake the U-Boot settings if fdt and dfsrr is >>> not defined for the I2C node (instead of the debatable default values). >> >> This is a perfectly valid option. Personally, I'd prefer it encoded >> in the device tree, but if it looks like a valid speed has already >> been programmed in then I'm cool with the driver just preserving that. >> If it turns out to causes problems the we can always change the code >> to be more conservative later. > > How should the Linux driver decide if the registers have been already > set by the boot-loader? The reset-values might be good as well. > Therefore, if "clock-frequency" is not specified, the driver may simply > not touch the fdr and dfsr registers (overtaking the values from the > boot-loader). I'm okay with that. If the property isn't present then it is probably okay to just assume that it is usable. g.