From patchwork Wed Mar 16 07:20:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 634 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 y5cs1295ybj; Wed, 16 Mar 2011 00:20:18 -0700 (PDT) Received: by 10.227.197.199 with SMTP id el7mr438023wbb.32.1300260017278; Wed, 16 Mar 2011 00:20:17 -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 r15si1151338wec.102.2011.03.16.00.20.15 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2011 00:20:16 -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 33so1741876wwc.31 for ; Wed, 16 Mar 2011 00:20:15 -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=lMMZZl1X+Yv/CxcIaUsJlq03Z9mCBKRR+ySgCI/h2+vogUCAG11sc/AHuWS8T2GffH WquDZv/cPINpnupMoH+jPTAbSYsaDNugHQTi+ou15YfOWdAhkqNzpkR+MbTK6vUX+3sm naXddVNbK3D2n+Lyh6sPj4xXXubwvz5amdY8Y= 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=gRpfpkmMIXW7b1losTU/KaP3DpZ3x/UK//zH+AFEg5yTMIaPG53N6okqNI1j6y/TKw Vp4rH3Dwv4o1yZsKa4dVvYqitfmim4fdq/2DJpDt3ZWpAb8ZYIwSDfu+QMcGWda3n05Z Ho5ogKNE9cC/VdNauE1IINfb0B8YnqYY+6xt8= Received: by 10.216.238.194 with SMTP id a44mr409642wer.51.1300260015520; Wed, 16 Mar 2011 00:20:15 -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 d54sm366109wej.34.2011.03.16.00.20.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2011 00:20:15 -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-i2c@lists.infradead.org Cc: patches@linaro.org, Ben Dooks , Andy Green Date: Wed, 16 Mar 2011 07:20:13 +0000 Message-ID: <20110316072013.453.63442.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 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); }