From patchwork Tue Mar 8 11:09:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 438 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:39 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs23974qah; Tue, 8 Mar 2011 03:09:23 -0800 (PST) Received: by 10.227.150.17 with SMTP id w17mr4468165wbv.95.1299582562683; Tue, 08 Mar 2011 03:09:22 -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.22 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 03:09:22 -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:22 -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=pmNyTCiHE59qo+i5C1Q2PmTBPLtCufxlTkPhK706WY8=; b=uzxFfYX5Gqjeyhh1/BimSPJqAFWahHEoOj0Fv6aTkKtPItdvQNg1MVqb2wo75rqugj 8gVwrUPIOktZMPrqlHXikYCfMFnOk4HZU1JoX6FagXHPJGo3cKncCwCicHV0e3ultCp5 PlygkmVQll8TUCl+P0jYnat1x5+YFKPqNwUeM= 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=YBBZErcL0TAOkip0CDYjb+eD6neBnygGrvpA7dbNtQVXTj++2/cYnIL8pPGCiWYcuP tuMD+bj0IZELBW8XQnWVXEdbYG/eOUL2W41+6nX1MI0JLo6xtCSQ6zr7WxtARRNOkBl3 Six9JNTDBarBkWN5xQ0RiLoimBFBuT8x4Hgzk= Received: by 10.227.200.138 with SMTP id ew10mr4421357wbb.21.1299582561929; Tue, 08 Mar 2011 03:09:21 -0800 (PST) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id w25sm477551wbd.17.2011.03.08.03.09.20 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 03:09:21 -0800 (PST) Sender: Andy Green From: Andy Green Subject: [PATCH 2 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, 08 Mar 2011 11:09:19 +0000 Message-ID: <20110308110919.23531.58653.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 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 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); }