From patchwork Sat Jan 14 18:54:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 136098 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 AF3C9B6F67 for ; Sun, 15 Jan 2012 05:54:55 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6FE1E2847A; Sat, 14 Jan 2012 19:54:54 +0100 (CET) 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 LILaC9lqYuZf; Sat, 14 Jan 2012 19:54:54 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7FA88283DE; Sat, 14 Jan 2012 19:54:53 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9207F283DE for ; Sat, 14 Jan 2012 19:54:52 +0100 (CET) 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 xCzUASGg1VlA for ; Sat, 14 Jan 2012 19:54:52 +0100 (CET) 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-ey0-f172.google.com (mail-ey0-f172.google.com [209.85.215.172]) by theia.denx.de (Postfix) with ESMTPS id 35047281AA for ; Sat, 14 Jan 2012 19:54:50 +0100 (CET) Received: by eaad11 with SMTP id d11so585376eaa.3 for ; Sat, 14 Jan 2012 10:54:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=OaG5Rez9C6ZV1E/6QvOijsbuyESWDBOLXALKJbGSrzQ=; b=T9zepuYxeoXCnOwQGBEaOEXKhi9S0OUCGhvWFKxDRQYY8kalrlZpfrDeRtY9aCCJPa p2Sv4hYPnooHrW49849Y5UXtc2IoVrAID+xQoHnOLrDeOWYJxtXa6Gr0fhs3mp4ZHmUD AGf19p9PZOaI0o6NbxnXNl6uIip+eWQVQ0XX8= MIME-Version: 1.0 Received: by 10.213.36.11 with SMTP id r11mr1693799ebd.69.1326567290213; Sat, 14 Jan 2012 10:54:50 -0800 (PST) Received: by 10.213.113.1 with HTTP; Sat, 14 Jan 2012 10:54:50 -0800 (PST) In-Reply-To: References: <4F117435.7080807@esd.eu> Date: Sat, 14 Jan 2012 16:54:50 -0200 Message-ID: From: Fabio Estevam To: Matthias Fuchs Cc: Fabio Estevam , u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] mx28: fix i.MX28 spi driver 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de On Sat, Jan 14, 2012 at 4:53 PM, Fabio Estevam wrote: > Actually I meant this: One more time ;-) --- a/drivers/spi/mxs_spi.c +++ b/drivers/spi/mxs_spi.c @@ -130,13 +130,10 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const char *tx = dout; char *rx = din; - if (bitlen == 0) - return 0; - if (!rx && !tx) return 0; - if (flags & SPI_XFER_BEGIN) + if ((flags & SPI_XFER_BEGIN) && len) mxs_spi_start_xfer(ssp_regs); while (len--) {