From patchwork Tue Mar 8 11:07:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 617851 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p28B7Ooo025980 for ; Tue, 8 Mar 2011 11:07:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753762Ab1CHLHq (ORCPT ); Tue, 8 Mar 2011 06:07:46 -0500 Received: from mail-ey0-f174.google.com ([209.85.215.174]:47395 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752972Ab1CHLHq (ORCPT ); Tue, 8 Mar 2011 06:07:46 -0500 Received: by eyx24 with SMTP id 24so1912069eyx.19 for ; Tue, 08 Mar 2011 03:07:44 -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=clvqktnitUEibLjgRCYqwVFOp0Z8jXgHIqdUhGYl6Es=; b=jyvXnm+j4rxeaPYcNEreImDR98woUd3ElPqT90uVDdbCKejGgFsTau53JH0JH53CVU Y4p+Zj2rkH9QuHrTlLf3luZTt5zh/wwcpqaXq4gp5zK8eSrUpDwVHz2oEC/WWXsLHSkN zkixtBVhC/5T9NsBlrq6zsg9xmdf0X0RT4bsA= 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=UQFDWPL4uOZetkesdhk1d83YeFHWmPAnvHnI4U5w+A9acx9w9dGEV/0B2urB9vl34D CSnhKXUcCl7BmjQ8sTTj4Ks/yQtHKUiWz6/u/HKTo99OwDtEBLFLuvNUcrgVqqaEoay+ l5arJU7ndPSGhj62T3tPVeQvy3UjngBkXEb0g= Received: by 10.216.35.82 with SMTP id t60mr3333221wea.46.1299582464748; Tue, 08 Mar 2011 03:07:44 -0800 (PST) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id r80sm249502wei.39.2011.03.08.03.07.43 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 03:07:44 -0800 (PST) From: Andy Green Subject: [PATCH 2 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, 08 Mar 2011 11:07:42 +0000 Message-ID: <20110308110742.23531.82979.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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 08 Mar 2011 11:07:47 +0000 (UTC) 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);