From patchwork Tue Mar 15 19:56:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 588 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 y5cs80484ybj; Tue, 15 Mar 2011 12:56:14 -0700 (PDT) Received: by 10.216.191.232 with SMTP id g82mr12179378wen.24.1300218974045; Tue, 15 Mar 2011 12:56:14 -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.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 12:56:14 -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:13 -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=WXcbpqmr/6QSIjgSU5dVJp0RLIM4XPOIGst+8Hs8p1QV3nSbgpJM8xsGR+e0J3p/vu /q0w6+EDPNjb5lG157ezyB/WG0cW3FOhiNaylNGnUPYnO/kWt4MWX+NkV9LhO3UbNH3t RjcKVjLjLejAovYno3A9bX8ntOxoumMZ923Pw= 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=cU2HYOG2QOVcGHN9O68LBO5ETnD0emn+wqxpJ4v30nUAiABImOocM8reDiLxvJJtum e7YAI2NLzkiGhJ3TdZ0aBk2APQOyfgYDGmpyCzVd3Plu19fAkPP8NJeNDCgDqEhdgfee E68DGTFW156cXCvItVoJkgTLhI8zhSptJ07Xk= Received: by 10.227.162.77 with SMTP id u13mr1886461wbx.187.1300218973228; Tue, 15 Mar 2011 12:56:13 -0700 (PDT) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id t11sm103702wes.41.2011.03.15.12.56.12 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 12:56:12 -0700 (PDT) Sender: Andy Green From: Andy Green Subject: [PATCH 3 03/18] I2C: OMAP2+: Introduce I2C IP versioning constants 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:10 +0000 Message-ID: <20110315195610.30000.4573.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 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);