From patchwork Tue Mar 15 19:56:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 594 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:02 -0000 Delivered-To: patches@linaro.org Received: by 10.151.46.5 with SMTP id y5cs80499ybj; Tue, 15 Mar 2011 12:56:45 -0700 (PDT) Received: by 10.227.202.139 with SMTP id fe11mr1873808wbb.169.1300219004812; Tue, 15 Mar 2011 12:56:44 -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 x20si329091wbd.10.2011.03.15.12.56.44 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 12:56:44 -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 33so1213249wwc.31 for ; Tue, 15 Mar 2011 12:56:44 -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=tkW5o+RMLSPtuSsoqv7+7Wez8k6LUbn3yHU1gVttHI1SPOYMUQAGWgJjkqT2uggYmg IlKUDIxTQfbCo9lBgjwyzfUM4woQJEgFg1Q3Gp8it8T1VEG1iBKEcwVn1YvhZF1F9JnR zK+CO7WIyRNOwN3uvIkVwe0s4rwpIJsHCC6QM= 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=uTb35aaPjZg1t6S7JzVsrFlGGbnVB9XvclQO40erA8MvMVcCciFczIo8k4cjs5x20q GhNK5eXCZIqQEGFlLItf/CdGoozTYySWlWLcqXHUHbqGzG67kqpbSw917l46ItqVCEW4 C9ZKNdXd6B0fqNHn2Jv43uXm+1lPHX5Xyzexk= Received: by 10.216.138.66 with SMTP id z44mr4587900wei.87.1300219003708; Tue, 15 Mar 2011 12:56:43 -0700 (PDT) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id o19sm113028wee.2.2011.03.15.12.56.42 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 12:56:43 -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-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Cc: patches@linaro.org, Ben Dooks , Andy Green Date: Tue, 15 Mar 2011 19:56:41 +0000 Message-ID: <20110315195641.30000.60794.stgit@otae.warmcat.com> In-Reply-To: <20110315195147.30000.86184.stgit@otae.warmcat.com> References: <20110315195147.30000.86184.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