From patchwork Thu Jun 2 00:19:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 842252 X-Patchwork-Delegate: khilman@deeprootsystems.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 p520KeA6020896 for ; Thu, 2 Jun 2011 00:20:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759427Ab1FBAUg (ORCPT ); Wed, 1 Jun 2011 20:20:36 -0400 Received: from na3sys009aog107.obsmtp.com ([74.125.149.197]:48180 "EHLO na3sys009aog107.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759248Ab1FBAUM (ORCPT ); Wed, 1 Jun 2011 20:20:12 -0400 Received: from mail-px0-f173.google.com ([209.85.212.173]) (using TLSv1) by na3sys009aob107.postini.com ([74.125.148.12]) with SMTP ID DSNKTebXPBCNuF8Wc/VUJJwVf35xLhcgaaxO@postini.com; Wed, 01 Jun 2011 17:20:12 PDT Received: by mail-px0-f173.google.com with SMTP id 16so238298pxi.4 for ; Wed, 01 Jun 2011 17:20:12 -0700 (PDT) Received: by 10.143.91.3 with SMTP id t3mr10274wfl.405.1306974011921; Wed, 01 Jun 2011 17:20:11 -0700 (PDT) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net [24.19.7.36]) by mx.google.com with ESMTPS id n1sm68635pbi.63.2011.06.01.17.20.10 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Jun 2011 17:20:11 -0700 (PDT) From: Kevin Hilman To: Ben Dooks , linux-i2c@vger.kernel.org Cc: Andy Green , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 14/18] I2C: OMAP1/OMAP2+: create omap I2C functionality flags for each cpu_... test Date: Wed, 1 Jun 2011 17:19:40 -0700 Message-Id: <1306973984-15165-15-git-send-email-khilman@ti.com> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1306973984-15165-1-git-send-email-khilman@ti.com> References: <1306973984-15165-1-git-send-email-khilman@ti.com> 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]); Thu, 02 Jun 2011 00:20:40 +0000 (UTC) From: Andy Green 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 Signed-off-by: Tony Lindgren Signed-off-by: Kevin Hilman --- 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;