From patchwork Wed Mar 16 07:18:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 622 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 y5cs1258ybj; Wed, 16 Mar 2011 00:18:46 -0700 (PDT) Received: by 10.227.202.11 with SMTP id fc11mr415405wbb.131.1300259925928; Wed, 16 Mar 2011 00:18:45 -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.45 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2011 00:18:45 -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:45 -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=clvqktnitUEibLjgRCYqwVFOp0Z8jXgHIqdUhGYl6Es=; b=IRU3M7D6zVikWVqaxz2zeccSkB45Det0F50ult2mW28geFnkrKOxAtn1q3FP5Nz6mQ sr1g0ak2UXDjZrwe4N1jyFgyGOh7+eF1vPrxsUSAV5F8glrtQhNBDnpxqIXDWWqV0S8A 12oecR2oGHR8M0vRD2IML3YVdP814LxjN4W+Y= 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=syIB5cLV6UuxYgmCRthnqv1nxCR1xSD0NdeW7PIn32dHH5DzdnM1hzg9IUtLUpl2Y1 HamuYmdGaWyTxAIaeq+5W0Q8aUe/NzOaOwmVrh2BsXn5VIU0pL0Lf3E5h7gGPB8uHui6 zcpzEjLs1dAnpr3IY5lYO8SeZaX5BxUHL+SCk= Received: by 10.227.182.129 with SMTP id cc1mr442858wbb.10.1300259925161; Wed, 16 Mar 2011 00:18:45 -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 d54sm365339wej.34.2011.03.16.00.18.44 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2011 00:18:44 -0700 (PDT) Sender: Andy Green From: Andy Green Subject: [PATCH 3 03/18] I2C: OMAP2+: Introduce I2C IP versioning constants To: linux-i2c@lists.infradead.org Cc: patches@linaro.org, Ben Dooks , Andy Green Date: Wed, 16 Mar 2011 07:18:43 +0000 Message-ID: <20110316071843.453.9325.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 These represent the two kinds of (incompatible) OMAP I2C peripheral unit in use so far. The constants are in linux/i2c-omap.h so the omap i2c driver can have them too. Cc: patches@linaro.org Cc: Ben Dooks Reported-by: Peter Maydell Signed-off-by: Andy Green --- arch/arm/plat-omap/include/plat/i2c.h | 1 + include/linux/i2c-omap.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-omap/include/plat/i2c.h b/arch/arm/plat-omap/include/plat/i2c.h index 878d632..a1d3d06 100644 --- a/arch/arm/plat-omap/include/plat/i2c.h +++ b/arch/arm/plat-omap/include/plat/i2c.h @@ -22,6 +22,7 @@ #define __ASM__ARCH_OMAP_I2C_H #include +#include #if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) extern int omap_register_i2c_bus(int bus_id, u32 clkrate, diff --git a/include/linux/i2c-omap.h b/include/linux/i2c-omap.h index 7472449..701886d 100644 --- a/include/linux/i2c-omap.h +++ b/include/linux/i2c-omap.h @@ -3,6 +3,18 @@ #include +/* + * Version 2 of the I2C peripheral unit has a different register + * layout and extra registers. The ID register in the V2 peripheral + * unit on the OMAP4430 reports the same ID as the V1 peripheral + * unit on the OMAP3530, so we must inform the driver which IP + * version we know it is running on from platform / cpu-specific + * code using these constants in the hwmod class definition. + */ + +#define OMAP_I2C_IP_VERSION_1 1 +#define OMAP_I2C_IP_VERSION_2 2 + struct omap_i2c_bus_platform_data { u32 clkrate; void (*set_mpu_wkup_lat)(struct device *dev, long set);