From patchwork Thu Jun 2 00:19:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 842232 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 p520KW1U020785 for ; Thu, 2 Jun 2011 00:20:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759421Ab1FBAUb (ORCPT ); Wed, 1 Jun 2011 20:20:31 -0400 Received: from na3sys009aog114.obsmtp.com ([74.125.149.211]:44121 "EHLO na3sys009aog114.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759309Ab1FBAUR (ORCPT ); Wed, 1 Jun 2011 20:20:17 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]) (using TLSv1) by na3sys009aob114.postini.com ([74.125.148.12]) with SMTP ID DSNKTebXQJicrgtqnp+/NePog/K3k9QDJIN7@postini.com; Wed, 01 Jun 2011 17:20:17 PDT Received: by mail-pz0-f46.google.com with SMTP id 9so184700pzk.5 for ; Wed, 01 Jun 2011 17:20:16 -0700 (PDT) Received: by 10.142.62.38 with SMTP id k38mr17522wfa.85.1306974016194; Wed, 01 Jun 2011 17:20:16 -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 p5sm72237pbk.36.2011.06.01.17.20.15 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Jun 2011 17:20:15 -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 16/18] I2C: OMAP1: set i2c unit feature implementation flags in platform data Date: Wed, 1 Jun 2011 17:19:42 -0700 Message-Id: <1306973984-15165-17-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:35 +0000 (UTC) From: Andy Green Most of the OMAP1 implementation flags are set statically, with the exception that omap7xx has its data bus wired up differently. 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 --- arch/arm/plat-omap/i2c.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index 9098669..2388b8e 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c @@ -111,6 +111,19 @@ static inline int omap1_i2c_add_bus(int bus_id) /* all OMAP1 have IP version 1 register set */ pdata->rev = OMAP_I2C_IP_VERSION_1; + /* all OMAP1 I2C are implemented like this */ + pdata->flags = OMAP_I2C_FLAG_NO_FIFO | + OMAP_I2C_FLAG_SIMPLE_CLOCK | + OMAP_I2C_FLAG_16BIT_DATA_REG | + OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK; + + /* how the cpu bus is wired up differs for 7xx only */ + + if (cpu_is_omap7xx()) + pdata->flags |= OMAP_I2C_FLAG_BUS_SHIFT_1; + else + pdata->flags |= OMAP_I2C_FLAG_BUS_SHIFT_2; + return platform_device_register(pdev); }