From patchwork Tue Jan 22 01:47:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Otavio Salvador X-Patchwork-Id: 214305 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 346932C007B for ; Tue, 22 Jan 2013 12:44:10 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B7E4C4A0F2; Tue, 22 Jan 2013 02:44:05 +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 Tu517SIOJV2M; Tue, 22 Jan 2013 02:44:05 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 65F0F4A0FF; Tue, 22 Jan 2013 02:43:55 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 31F144A0C7 for ; Tue, 22 Jan 2013 02:43:53 +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 cWzv1LZ+Fif5 for ; Tue, 22 Jan 2013 02:43: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-yh0-f47.google.com (mail-yh0-f47.google.com [209.85.213.47]) by theia.denx.de (Postfix) with ESMTPS id 2346F4A0EF for ; Tue, 22 Jan 2013 02:43:39 +0100 (CET) Received: by mail-yh0-f47.google.com with SMTP id w68so220112yhw.6 for ; Mon, 21 Jan 2013 17:43:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=lwLiOBHd9Prn32mE5dnKVku8vV8MEHJ5nP1rACR5IMA=; b=Zz1dy0WroiGRrsCPjhrP1WMaojwdOYn7GSvLpnwrcJZtPQlRVu87SQijV+csZZ9B9u j+d90ulfBDwynUU5qkoJtRjpjQUC1rWlDwSiv2CjtRVG+SJ3eeAw9nOPeDs+yx/V/IXm lwq1l30kpoq4r6jzDldAXJDcFGcFQ2e1bPKG5ftL2VNm7F8yMh6ATvVC0SWcIElbQTd0 J4qfrhc8sMHGvlrcB7M2CJ2ss7WlbbdYPfR3GczDxjkeSSWIjyOWjXLVt+9ywOyYh6Ao BYOCU1BvpL3qLisLlsB7HUhb0UY40/8yoo3nY1qgeF6QCzAey7pGT/4M3N8i1dtP2ChU JGpA== X-Received: by 10.236.91.173 with SMTP id h33mr22629020yhf.120.1358819018123; Mon, 21 Jan 2013 17:43:38 -0800 (PST) Received: from nano.lab.ossystems.com.br ([177.35.66.48]) by mx.google.com with ESMTPS id s70sm5363563yhb.14.2013.01.21.17.43.35 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jan 2013 17:43:37 -0800 (PST) From: Otavio Salvador To: u-boot@lists.denx.de Date: Mon, 21 Jan 2013 23:47:23 -0200 Message-Id: <1358819250-31625-4-git-send-email-otavio@ossystems.com.br> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1358819250-31625-1-git-send-email-otavio@ossystems.com.br> References: <1358819250-31625-1-git-send-email-otavio@ossystems.com.br> Cc: marex@denx.de, fabio.estevam@freescale.com, Otavio Salvador Subject: [U-Boot] [PATCH 3/9] mx23: Fix transfer size setting for SPI 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 Signed-off-by: Otavio Salvador --- drivers/spi/mxs_spi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c index bb865b7..10bf5aa 100644 --- a/drivers/spi/mxs_spi.c +++ b/drivers/spi/mxs_spi.c @@ -167,8 +167,13 @@ static int mxs_spi_xfer_pio(struct mxs_spi_slave *slave, mxs_spi_start_xfer(ssp_regs); while (length--) { +#if defined(CONFIG_MX23) + writel(SSP_CTRL0_XFER_COUNT_MASK, &ssp_regs->hw_ssp_ctrl0_clr); + writel(1, &ssp_regs->hw_ssp_ctrl0_set); +#elif defined(CONFIG_MX28) /* We transfer 1 byte */ writel(1, &ssp_regs->hw_ssp_xfer_size); +#endif if ((flags & SPI_XFER_END) && !length) mxs_spi_end_xfer(ssp_regs);