From patchwork Wed Mar 16 07:20:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 632 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:13 -0000 Delivered-To: patches@linaro.org Received: by 10.151.46.5 with SMTP id y5cs1287ybj; Wed, 16 Mar 2011 00:20:04 -0700 (PDT) Received: by 10.227.130.99 with SMTP id r35mr395958wbs.221.1300260003508; Wed, 16 Mar 2011 00:20:03 -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 e7si1130422wer.165.2011.03.16.00.20.01 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2011 00:20:02 -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 26so1558835wyj.37 for ; Wed, 16 Mar 2011 00:20:01 -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=O01/9fSvRdnQqFLXXZqO3XTIS2Ro/WgHvbWx6IhJei8=; b=oyIIxPyZbcYL7LPFZWIqGLL613E9bEQ3Q3L4/WUKUJ5C0Sttgffxw8OqsGjZEwP6DC 7EUZc4uhieMx+WBwt/T3SB4kC3qpqlzdxcLKAcpyrHAiAUQXRnYmwhJ162UdvRKLcQxF 7XEV5GM0D7vXyg2GCFKUxRrYbR5pGV/aPM8+o= 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=PxeBz4rdGXzO+FW/8mqwtRnBhWUwdejYs8nfJN7TN1GXGHiTAsyzubzlGhPlwbM0sH jscUiQCNzPj2wSqAMQoxdaAbZmf0wEjbY/0OVSlxU7k+lCxUOWl5BwJnQ3GTbMNTVoKD YrlPMIv2I2iOCgCplzP7tkj7dsWcDV6sgHlg8= Received: by 10.227.72.7 with SMTP id k7mr426332wbj.115.1300260001675; Wed, 16 Mar 2011 00:20:01 -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 o6sm782519wbo.9.2011.03.16.00.20.00 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2011 00:20:01 -0700 (PDT) Sender: Andy Green From: Andy Green Subject: [PATCH 3 14/18] I2C: OMAP1/OMAP2+: create omap I2C functionality flags for each cpu_... test To: linux-i2c@lists.infradead.org Cc: patches@linaro.org, Ben Dooks , Andy Green Date: Wed, 16 Mar 2011 07:20:00 +0000 Message-ID: <20110316071959.453.45579.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 8 kinds of implementation functionality that up until now were inferred by the 16 remaining cpu_...() tests in the omap i2c driver. Changed to use BIT() as suggested by Balaji T Krishnamoorthy. Cc: patches@linaro.org Cc: Ben Dooks Reported-by: Peter Maydell Signed-off-by: Andy Green --- include/linux/i2c-omap.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/include/linux/i2c-omap.h b/include/linux/i2c-omap.h index 776c8e1..56a9924 100644 --- a/include/linux/i2c-omap.h +++ b/include/linux/i2c-omap.h @@ -15,6 +15,21 @@ #define OMAP_I2C_IP_VERSION_1 1 #define OMAP_I2C_IP_VERSION_2 2 +/* struct omap_i2c_bus_platform_data .flags meanings */ + +#define OMAP_I2C_FLAG_NO_FIFO BIT(0) +#define OMAP_I2C_FLAG_SIMPLE_CLOCK BIT(1) +#define OMAP_I2C_FLAG_16BIT_DATA_REG BIT(2) +#define OMAP_I2C_FLAG_RESET_REGS_POSTIDLE BIT(3) +#define OMAP_I2C_FLAG_APPLY_ERRATA_I207 BIT(4) +#define OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK BIT(5) +#define OMAP_I2C_FLAG_FORCE_19200_INT_CLK BIT(6) +/* how the CPU address bus must be translated for I2C unit access */ +#define OMAP_I2C_FLAG_BUS_SHIFT_NONE 0 +#define OMAP_I2C_FLAG_BUS_SHIFT_1 BIT(7) +#define OMAP_I2C_FLAG_BUS_SHIFT_2 BIT(8) +#define OMAP_I2C_FLAG_BUS_SHIFT__SHIFT 7 + struct omap_i2c_bus_platform_data { u32 clkrate; u32 rev;