From patchwork Fri Jun 22 04:12:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 166484 X-Patchwork-Delegate: hs@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id B004AB6EF1 for ; Fri, 22 Jun 2012 14:14:35 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 72A9D280E8; Fri, 22 Jun 2012 06:13:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hF+UY25d8Dr9; Fri, 22 Jun 2012 06:13:56 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EA52A280E9; Fri, 22 Jun 2012 06:13:08 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1280B2808B for ; Fri, 22 Jun 2012 06:12:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AYJuY09rN17E for ; Fri, 22 Jun 2012 06:12:34 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by theia.denx.de (Postfix) with ESMTPS id 6911628099 for ; Fri, 22 Jun 2012 06:12:31 +0200 (CEST) Received: by dacx6 with SMTP id x6so1729107dac.3 for ; Thu, 21 Jun 2012 21:12:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=Jj69u7pRlZQng2O+N/em6MJfJ4oFSQDfDEKhbiaOhVQ=; b=jgPcpI4Wv98fVQyKCIb8jNICH8ALXm+yG/53jEvhkIvfO0VAqWtrKQAG+mT+hKVhkL rPiVHq5HkB5RDtqO+T5oPzotUUQatDqVsIdHByU3e3ls8if5s2BwG/rziCnj/2VAEjnS sKnEEmwX2fHJ8CR3s7PFg+PKcZ5b00+4UZVta/1qf0CzNieqauxV3OQw8OSC2fgZWLx3 ltIq7TyvG/fWnZ7ELtNrJM+ud2T7LllE7eBBY4ShJ5HYO34FaWLMqkJgR5ijdY6G4jm5 3SVypX8HkjHf8o9dJRm8OFV1TbrR7QdWJqftHWNnOkdMqpbykkpwkKRIfjtkXhEUaurD P2eg== Received: by 10.68.202.136 with SMTP id ki8mr5912545pbc.65.1340338349226; Thu, 21 Jun 2012 21:12:29 -0700 (PDT) Received: from officeserver-2 ([70.96.116.236]) by mx.google.com with ESMTPS id qm6sm37687591pbc.10.2012.06.21.21.12.23 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Jun 2012 21:12:28 -0700 (PDT) Received: from tkisky by officeserver-2 with local (Exim 4.76) (envelope-from ) id 1ShvEM-00032v-Dc; Thu, 21 Jun 2012 21:12:22 -0700 From: Troy Kisky To: hs@denx.de, sbabic@denx.de Date: Thu, 21 Jun 2012 21:12:10 -0700 Message-Id: <1340338339-11626-15-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1340338339-11626-1-git-send-email-troy.kisky@boundarydevices.com> References: <1340338339-11626-1-git-send-email-troy.kisky@boundarydevices.com> X-Gm-Message-State: ALoCoQnedTh5iege/bFcpEd0ystPMF/M/RvgU8HohimkIy4hasYH9qx3VkUdpVJt6xW25HHipg9m Cc: u-boot@lists.denx.de, r49496@freescale.com, jason.hui@linaro.org Subject: [U-Boot] [PATCH 15/24] mxc_i2c: add i2c_regs argument to i2c_imx_stop X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This is prep work for CONFIG_I2C_MULTI_BUS. Signed-off-by: Troy Kisky Acked-by: Marek Vasut --- drivers/i2c/mxc_i2c.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index 802f70f..cb061f7 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -199,9 +199,8 @@ static int tx_byte(struct mxc_i2c_regs *i2c_regs, u8 byte) /* * Stop I2C transaction */ -void i2c_imx_stop(void) +static void i2c_imx_stop(struct mxc_i2c_regs *i2c_regs) { - struct mxc_i2c_regs *i2c_regs = (struct mxc_i2c_regs *)I2C_BASE; unsigned int temp = readb(&i2c_regs->i2cr); temp &= ~(I2CR_MSTA | I2CR_MTX); @@ -331,7 +330,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buf, int len) buf[i] = readb(&i2c_regs->i2dr); } - i2c_imx_stop(); + i2c_imx_stop(i2c_regs); return ret; } @@ -355,7 +354,7 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buf, int len) return ret; } - i2c_imx_stop(); + i2c_imx_stop(i2c_regs); return ret; }