From patchwork Tue Mar 15 19:56:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 587 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:01 -0000 Delivered-To: patches@linaro.org Received: by 10.151.46.5 with SMTP id y5cs80486ybj; Tue, 15 Mar 2011 12:56:23 -0700 (PDT) Received: by 10.227.147.196 with SMTP id m4mr12841859wbv.179.1300218982097; Tue, 15 Mar 2011 12:56:22 -0700 (PDT) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id u2si274677weh.145.2011.03.15.12.56.21 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 12:56:22 -0700 (PDT) Received-SPF: pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.178 as permitted sender) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.178 as permitted sender) smtp.mail=andy.warmcat.com@googlemail.com; dkim=pass (test mode) header.i=@googlemail.com Received: by mail-wy0-f178.google.com with SMTP id 26so1068072wyj.37 for ; Tue, 15 Mar 2011 12:56:21 -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=i19dimU1Okx58aEHMxHm1kV2hWoZ4tTmAymFEDExaz8=; b=shlofEXXGUenFMr7Ej21Y/bFJOs041P5SLls18ZxIsB2a1YDTRuNTk6DfRfSUmH7QI eEECw2NPfnhICdtcHRu/wN0cltkTwyVKmUGyZKyR7xY29wI6L8fKDzzfQhUwGkvQaaZO g3Nru2MjJPwVUaCF14YPkcYRxq7sIqk0f2XRs= 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=lVodli/PPpJJrVIR8wmdwZv9dODIpzo/b8KGjyaTZMmDNi7QRPGgVjjiqLhTv3nXFs 3u6zQkf8bzi3RSZ0ApCec4WiaZNQ3qY64mF7gCozGKkCSf9OJhP915GwpsNZpSOc5LaC Nm6yhhcU29f3Gi79wK88fjzG2RhcBGnFHj/rA= Received: by 10.216.143.74 with SMTP id k52mr12089510wej.0.1300218981276; Tue, 15 Mar 2011 12:56:21 -0700 (PDT) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id n2sm107896wej.22.2011.03.15.12.56.19 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 12:56:20 -0700 (PDT) Sender: Andy Green From: Andy Green Subject: [PATCH 3 04/18] I2C: OMAP2+: hwmod data: Tag all OMAP2+ hwmod definitions with I2C IP revision To: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Cc: patches@linaro.org, Ben Dooks , Andy Green , Benoit Cousson Date: Tue, 15 Mar 2011 19:56:18 +0000 Message-ID: <20110315195618.30000.53926.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 Since we cannot trust (or even reliably find) the OMAP I2C peripheral unit's own revision register, we must inform the OMAP I2C driver of which IP version it is running on. We do this by tagging the omap_hwmod_class for I2C on all the OMAP2+ platform / cpu specific hwmod init and passing it up to the driver (next patches). Cc: patches@linaro.org Cc: Ben Dooks Reported-by: Peter Maydell Signed-off-by: Andy Green Acked-by: Benoit Cousson --- arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 + arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 + arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 1 + arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 1 + 4 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index b85c630..64f60f9 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c @@ -482,6 +482,7 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = { static struct omap_hwmod_class i2c_class = { .name = "i2c", .sysc = &i2c_sysc, + .rev = OMAP_I2C_IP_VERSION_1, }; static struct omap_i2c_dev_attr i2c_dev_attr; diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index eeb6348..feb8655 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c @@ -481,6 +481,7 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = { static struct omap_hwmod_class i2c_class = { .name = "i2c", .sysc = &i2c_sysc, + .rev = OMAP_I2C_IP_VERSION_1, }; static struct omap_i2c_dev_attr i2c_dev_attr = { diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index cc94616..6b3ccb6 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -662,6 +662,7 @@ static struct omap_hwmod omap3xxx_uart4_hwmod = { static struct omap_hwmod_class i2c_class = { .name = "i2c", .sysc = &i2c_sysc, + .rev = OMAP_I2C_IP_VERSION_1, }; /* I2C1 */ diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index f8400a1..e50a79b 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c @@ -1111,6 +1111,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = { static struct omap_hwmod_class omap44xx_i2c_hwmod_class = { .name = "i2c", .sysc = &omap44xx_i2c_sysc, + .rev = OMAP_I2C_IP_VERSION_2, }; /* i2c1 */