From patchwork Wed Mar 16 07:18:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 621 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:10 -0000 Delivered-To: patches@linaro.org Received: by 10.151.46.5 with SMTP id y5cs1263ybj; Wed, 16 Mar 2011 00:18:54 -0700 (PDT) Received: by 10.216.253.147 with SMTP id f19mr4606542wes.19.1300259933224; Wed, 16 Mar 2011 00:18:53 -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.18.52 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2011 00:18:53 -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:18:52 -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=N8BgcUBNblvx5rmYBjSGLod5GaHzL9d0DLLxZ9lS8ZIJg4Vw/MAFAYAhKcaZPeRMnC Hy/6f/VvUK7QePXpJ75BT2eABXScdY0zKbWtJdw6/Siyp00Fnicaha/Ze/orZytcMwpg nBOAanSh7AQu/86k8VY0aaYHTShGAOX7ykVaw= 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=ZIZJGpe7fMNuXnzvOs6CXpPhviFm9geNl1FNaD8klEZgxsuMs0dgvTN3nSuuAxPxzH ZnTM+ucI60NYHrILhwqgPYw865sACEKjxigbNUFg7Lo8nA5R6jIrTryIMF+K26WGocaX mtOhrCUW6GS9TW2I9ZSLYkpcv77aDc2FkfEh4= Received: by 10.227.147.194 with SMTP id m2mr425542wbv.145.1300259932069; Wed, 16 Mar 2011 00:18:52 -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 u9sm777820wbg.12.2011.03.16.00.18.51 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2011 00:18:51 -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-i2c@lists.infradead.org Cc: patches@linaro.org, Ben Dooks , Andy Green , Benoit Cousson Date: Wed, 16 Mar 2011 07:18:50 +0000 Message-ID: <20110316071850.453.20844.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 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 */