From patchwork Tue Mar 15 19:57:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 602 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:04 -0000 Delivered-To: patches@linaro.org Received: by 10.151.46.5 with SMTP id y5cs80525ybj; Tue, 15 Mar 2011 12:57:53 -0700 (PDT) Received: by 10.227.159.69 with SMTP id i5mr1348542wbx.133.1300219072827; Tue, 15 Mar 2011 12:57:52 -0700 (PDT) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id x20si329091wbd.10.2011.03.15.12.57.52 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 12:57:52 -0700 (PDT) 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 33so1213249wwc.31 for ; Tue, 15 Mar 2011 12:57:52 -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=+dbGG4H2B4oC/dyQeCxRWBwW/KHbAYDnH6nR9+HuE8s=; b=K/CfaSWYXu3XY4zCnZ178O+3iJ3hGPpjfbKaV/pE4IeU6+UVr9mziDvnvwJu2eyLkJ WCOCIxhstWYy6Hzg2+KqmAQsnrf7MHw8yTCh1VfWYmQmTK/rKwypQI7uERQOfVm1BCFV ZwYPjfgRLo8Fugh45giTQLv7/GLPp+XnC1X40= 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=eGrKjVfdQgI2OehDywtNHyKjzAVn+phX8r4/2SjEyhWgoSp6AIci/4CtZOPDzYdnog Hj40humQLISgfZoCcZv7pj8CWUklQYGcJu5Tr7k0M4vrHqNATUtsMQYtAPOMQR7WOlC5 gZww/Pila4YIPHxTPg1bjzmZH/oKGuGLGSqCo= Received: by 10.227.162.77 with SMTP id u13mr1888172wbx.187.1300219071973; Tue, 15 Mar 2011 12:57:51 -0700 (PDT) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id f30sm113388wef.7.2011.03.15.12.57.50 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 12:57:51 -0700 (PDT) Sender: Andy Green From: Andy Green Subject: [PATCH 3 16/18] I2C: OMAP1: set i2c unit feature implementation flags in platform data To: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Cc: patches@linaro.org, Ben Dooks , Andy Green Date: Tue, 15 Mar 2011 19:57:49 +0000 Message-ID: <20110315195749.30000.36662.stgit@otae.warmcat.com> In-Reply-To: <20110315195147.30000.86184.stgit@otae.warmcat.com> References: <20110315195147.30000.86184.stgit@otae.warmcat.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 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 --- 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 abe070c..710c5d5 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); }