From patchwork Tue Mar 8 11:08:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 425 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:42:36 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs23935qah; Tue, 8 Mar 2011 03:08:17 -0800 (PST) Received: by 10.216.143.228 with SMTP id l78mr1092851wej.21.1299582496566; Tue, 08 Mar 2011 03:08:16 -0800 (PST) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx.google.com with ESMTPS id g12si773654wer.198.2011.03.08.03.08.14 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 03:08:15 -0800 (PST) Received-SPF: pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.42 as permitted sender) client-ip=74.125.82.42; Authentication-Results: mx.google.com; spf=pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.42 as permitted sender) smtp.mail=andy.warmcat.com@googlemail.com; dkim=pass (test mode) header.i=@googlemail.com Received: by wwi17 with SMTP id 17so808658wwi.1 for ; Tue, 08 Mar 2011 03:08:14 -0800 (PST) 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=G3HRs6i5R/ir8HU8BeUQYDXTfLkAjaLK2YoUiAs3gpE=; b=vH+Rf6nQ9B1/xQwmVXZZPOkGnFNJRYMSbN3ffW3A0SPRe2vkiromCAkueHx83pCiIz lATTCSesSUSudUt8cBva3q4tX2/t5JWUFzG0E/foy3R3PI9l4odvV288as9pnx/zC9S6 L2S8OehWWyoYRrBqFe/I5iZrxG0zRwXVCsQBw= 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=KbqSiVT135XKL8+y4iz18MNgC+8awq/gAIUG1QOO7OoZ/CO2rY+i87VpGi/EMduDj8 UO2lHJkyaQVWit7Lex1kkLbXcQrpEENXPe0URIpJueCL/7fTHKp/9joboym1dqhIHmKW 0FOYTb4GJ+QKFh/LMAypxMd97iUaO0qf+Cv2o= Received: by 10.227.197.83 with SMTP id ej19mr4396905wbb.105.1299582494762; Tue, 08 Mar 2011 03:08:14 -0800 (PST) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id bd8sm481488wbb.7.2011.03.08.03.08.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 03:08:14 -0800 (PST) Sender: Andy Green From: Andy Green Subject: [PATCH 2 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, 08 Mar 2011 11:08:12 +0000 Message-ID: <20110308110812.23531.96169.stgit@otae.warmcat.com> In-Reply-To: <20110308105934.23531.83540.stgit@otae.warmcat.com> References: <20110308105934.23531.83540.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 a938df0..0d3eda7 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