From patchwork Wed Mar 16 07:19:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 626 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:44:11 -0000 Delivered-To: patches@linaro.org Received: by 10.151.46.5 with SMTP id y5cs1272ybj; Wed, 16 Mar 2011 00:19:15 -0700 (PDT) Received: by 10.216.143.74 with SMTP id k52mr4700460wej.8.1300259954780; Wed, 16 Mar 2011 00:19:14 -0700 (PDT) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id r15si1151338wec.102.2011.03.16.00.19.13 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2011 00:19:13 -0700 (PDT) Received-SPF: pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.50 as permitted sender) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.50 as permitted sender) smtp.mail=andy.warmcat.com@googlemail.com; dkim=pass (test mode) header.i=@googlemail.com Received: by mail-ww0-f50.google.com with SMTP id 33so1741876wwc.31 for ; Wed, 16 Mar 2011 00:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:from:subject:to:cc:date:message-id :in-reply-to:references:user-agent:mime-version:content-type :content-transfer-encoding; bh=P80bVNCoxJPVOVCOSoZYtrwwOT5dbAbA+O7HVldrLOE=; b=Do8M0DbBlmQAO5VFyUNKswBxvMhHPCqPwqB74vIfob0n/pIkRZRdH/x4GgD2D0BL5p ArLxg0DqiW/rxveARCwik3j0wU6jpHtrsLdztREHoJEE8WSXHBmk7VKgVWVlw/5EkpKj NQgDg11g01RTYeU9ZvN7sAgPs6LW3/+NuX7QU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:from:subject:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; b=wpXNENEny6KJr9p74+/goIb7V5ANDztoxF3xZt1gsPUuqWJVieOncmK7tee/5ReE5F k1Br+Bdw05urMS7uvxcKAnn4shc7XeN5KmYkn2elWQxBFDOY320XPFTSPvLi7lpeVh95 HtWMXGSsF3f4BYPmPBhSNc4pKWthw8UcTWCVs= Received: by 10.227.62.76 with SMTP id w12mr422655wbh.98.1300259953011; Wed, 16 Mar 2011 00:19:13 -0700 (PDT) Received: from otae.warmcat.com (cpc1-nrte21-2-0-cust677.8-4.cable.virginmedia.com [81.111.78.166]) by mx.google.com with ESMTPS id bd8sm778440wbb.13.2011.03.16.00.19.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2011 00:19:12 -0700 (PDT) Sender: Andy Green From: Andy Green Subject: [PATCH 3 07/18] I2C: OMAP2+: Pass hwmod rev knowledge via platform_data when i2c bus added To: linux-i2c@lists.infradead.org Cc: patches@linaro.org, Ben Dooks , Andy Green Date: Wed, 16 Mar 2011 07:19:11 +0000 Message-ID: <20110316071911.453.60624.stgit@otae.warmcat.com> In-Reply-To: <20110316071633.453.22228.stgit@otae.warmcat.com> References: <20110316071633.453.22228.stgit@otae.warmcat.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Mark each OMAP I2C bus with the hwmod's knowledge of which I2C IP version is in the chip we're running on. Cc: patches@linaro.org Cc: Ben Dooks Reported-by: Peter Maydell Signed-off-by: Andy Green --- arch/arm/plat-omap/i2c.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index 0a1b5af..34a3319 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c @@ -155,6 +155,12 @@ static inline int omap2_i2c_add_bus(int bus_id) pdata = &i2c_pdata[bus_id - 1]; /* + * pass the hwmod class's CPU-specific knowledge of I2C IP revision in + * use up to the OMAP I2C driver via platform data + */ + pdata->rev = oh->class->rev; + + /* * When waiting for completion of a i2c transfer, we need to * set a wake up latency constraint for the MPU. This is to * ensure quick enough wakeup from idle, when transfer