From patchwork Tue Mar 8 11:09:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 434 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:42:38 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs23969qah; Tue, 8 Mar 2011 03:09:08 -0800 (PST) Received: by 10.227.207.85 with SMTP id fx21mr4362515wbb.171.1299582547776; Tue, 08 Mar 2011 03:09:07 -0800 (PST) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id j3si809987wbc.21.2011.03.08.03.09.07 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 03:09:07 -0800 (PST) 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 33so899432wwc.31 for ; Tue, 08 Mar 2011 03:09:07 -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=jjEChbwLh0X5mBw/VcDq7DCa8avsOZ9+xlaI6WY9yM8=; b=n/ZBwMtuCIFO3y7uoLhqYRypKIsi+ST9NIet9ayYKa3sozcyfr0Pj5pSEJbdnw413o UcH8SRo9hAdg3wwUdKXM+REKc/htUAKoajTndGVQbwlLJqOJCpeYulHmMyIeqRJJhGNX 1h3TV5zOxyzjcGwP+5ZuHGsPpexFMk+yaVoFs= 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=BilLZjU3XGGIba7rgZ+eDHRZVWS0dgSMEZzTaGKszicjZRcsypka2Q1bpToYluCumZ AKkcOuai2LOpnbfCrAJwDLnacl1590u6EZPIyKksbzXSqn1gLj89VhfZSy5zo45wwg7m 4FLIJD6cTpS25sbzbvd3T2yD5oFpm/o6rQENA= Received: by 10.227.202.11 with SMTP id fc11mr4367530wbb.131.1299582547006; Tue, 08 Mar 2011 03:09:07 -0800 (PST) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id x1sm484231wbh.2.2011.03.08.03.09.05 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 03:09:06 -0800 (PST) Sender: Andy Green From: Andy Green Subject: [PATCH 2 14/18] I2C: OMAP1/OMAP2+: create omap I2C functionality flags for each cpu_... test 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:09:04 +0000 Message-ID: <20110308110904.23531.66727.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 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. 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..98ae49b 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 1 +#define OMAP_I2C_FLAG_SIMPLE_CLOCK 2 +#define OMAP_I2C_FLAG_16BIT_DATA_REG 4 +#define OMAP_I2C_FLAG_RESET_REGS_POSTIDLE 8 +#define OMAP_I2C_FLAG_APPLY_ERRATA_I207 0x10 +#define OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK 0x20 +#define OMAP_I2C_FLAG_FORCE_19200_INT_CLK 0x40 +/* 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 0x80 +#define OMAP_I2C_FLAG_BUS_SHIFT_2 0x100 +#define OMAP_I2C_FLAG_BUS_SHIFT__SHIFT 7 + struct omap_i2c_bus_platform_data { u32 clkrate; u32 rev;