From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from az33egw01.freescale.net (az33egw01.freescale.net [192.88.158.102]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "az33egw01.freescale.net", Issuer "Thawte Premium Server CA" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 6ABF4DF8FA for ; Fri, 22 Aug 2008 07:35:39 +1000 (EST) Message-ID: <48ADDF86.2040200@freescale.com> Date: Thu, 21 Aug 2008 16:35:02 -0500 From: Scott Wood MIME-Version: 1.0 To: David Miller Subject: Re: [PATCH 0/3]: Sparc OF I2C support. References: <20080821.001012.265401427.davem@davemloft.net> <20080821163256.GC15669@ld0162-tx32.am.freescale.net> <20080821.142134.127315039.davem@davemloft.net> In-Reply-To: <20080821.142134.127315039.davem@davemloft.net> Content-Type: text/plain; charset=UTF-8; format=flowed Cc: sparclinux@vger.kernel.org, linuxppc-dev@ozlabs.org, paulus@samba.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , David Miller wrote: >> On Thu, Aug 21, 2008 at 12:10:12AM -0700, David Miller wrote: >>> 2) When CONFIG_SPARC, shift the device address down by one bit before >>> giving it to the Linux I2C layer. >> Maybe we should distinguish by the type of I2C bus node instead. > > How so? If a Sparc and a PowerPC system use similar I2C > controllers, we risk double matches. It's not really an instruction-set architecture issue, it's a binding issue. What if a non-OF embedded SPARC comes along that copies i2c from a PowerPC DTS file, or we come across a real-OF PowerPC that does it the SPARC way? If we do come across two systems that claim their i2c bus nodes are compatible but use different bindings, *then* we'll find some out-of-band information to disambiguate. > If you guys created this format in your compressed openfirmware > trees, is it possible for you to "fix" it to match what Sparc > systems following the proper bindings do? Possibly, though it'll cause some pain when old trees are used with a kernel that expects the new binding. You mentioned having an actual binding document for I2C on Open Firmware; is it available online anywhere? > Don't PowerMACs and such have I2C controllers and devices? > How do they encode these I2C client device reg properties? As far as I can tell from poking around http://penguinppc.org/historical/dev-trees-html/, they don't include reg at all for i2c clients. -Scott