From patchwork Fri Feb 22 08:09:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "boojin.kim" X-Patchwork-Id: 2175371 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 2EA023FD4E for ; Fri, 22 Feb 2013 08:11:45 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U8nhA-0003SV-UI; Fri, 22 Feb 2013 08:09:28 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U8nh6-0003Q0-QR for linux-arm-kernel@lists.infradead.org; Fri, 22 Feb 2013 08:09:26 +0000 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MIM00MFE3ZIFPS0@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 22 Feb 2013 17:09:18 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.51]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 63.96.06692.EA727215; Fri, 22 Feb 2013 17:09:18 +0900 (KST) X-AuditID: cbfee691-b7f556d000001a24-a6-512727aead5a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 03.23.03918.EA727215; Fri, 22 Feb 2013 17:09:18 +0900 (KST) Received: from DOBOOJINKIM03 ([12.23.119.77]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MIM001BA3ZIQT00@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 22 Feb 2013 17:09:18 +0900 (KST) From: Boojin Kim To: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, spi-devel-general@lists.sourceforge.net, alsa-devel@alsa-project.org References: In-reply-to: Subject: [PATCH v2 3/4] spi: s3c64xx: add dma maxburst size initialization Date: Fri, 22 Feb 2013 17:09:18 +0900 Message-id: <001b01ce10d3$e9f78620$bde69260$%kim@samsung.com> X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac4Q0zRNgYHsZtryQK2Zcgnt7X5e4wAABD9gAAAJYXA= Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOLMWRmVeSWpSXmKPExsVy+t8zY9116uqBBpsnKVtsenyN1YHRY/OS +gDGKC6blNSczLLUIn27BK6M922bWQrm8Vbs/3CIuYHxOVcXIyeHhICJxMQ/q1ghbDGJC/fW s3UxcnEICSxjlFi88S5LFyMHWNGZn/oQ8emMEreWbmGBKmKSuLZgHiNIN5uApsSM79PZQWwR gc2MEpNfZ4EUMQucZpJYcLmdGWSSkAC3xOrmIJAaTgEeiXV/OplBbGEBL4kJE76xgdgsAqoS F9Y8ZQKxeQVsJc7Ou8gMcYS6xKO/uhDjrSQWzXkHtopZQERi34t3jCCrJAS+s0msuLWTGWKO gMS3yYegHpCV2HSAGeJJSYmDK26wTGAUnYWkfQEj4ypG0dSC5ILipPQiU73ixNzi0rx0veT8 3E2MkECeuIPx/gHrQ4zJQKMnMkuJJucDIyGvJN7Q2NjEzMTUxNzS1NyUNGElcV75SzKBQgLp iSWp2ampBalF8UWlOanFhxiZODilGhhPffytXfN9RrtBLptElMSuV/kamvoCrDMftZt7vtvz 8LZirWiBRcX8mRuOX46cr/Asm0PL+vOZtR/2H32m8sOr1m234i8VVb7sOoc+ASPpO+IvzDme plXVcXuGn+q9O2cjW8P3hE2anhr/Fu/SWnLhaPDkV09UWzcYSfVPnNQ+bfe30il/VXWUWIoz Eg21mIuKEwHjw/O4egIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCIsWRmVeSWpSXmKPExsVy+t9jQd116uqBBkvOyFpsenyN1YHRY/OS +gDGqAZGm4zUxJTUIoXUvOT8lMy8dFsl7+B453hTMwNDXUNLC3MlhbzE3FRbJRefAF23zByg qUoKZYk5pUChgMTiYiV9O0wTQkPcdC1gGiN0fUOC4HqMDNBAwjrGjPdtm1kK5vFW7P9wiLmB 8TlXFyMHh4SAicSZn/pdjJxAppjEhXvr2boYuTiEBKYzStxauoUFwlnGJHFtwTxGkCo2AU2J Gd+ns4PYIgKbGSUmv84CKWIWOM0kseByOzPIVCEBbonVzUEgNZwCPBLr/nQyg9jCAl4SEyZ8 YwOxWQRUJS6secoEYvMK2EqcnXeRGeIgdYlHf3UhxltJLJrzDmwVs4CIxL4X7xgnMPLPQuIu YGRcxSiaWpBcUJyUnmuoV5yYW1yal66XnJ+7iREcJ8+kdjCubLA4xCjAwajEw9vgohYoxJpY VlyZe4hRgoNZSYR3kYJ6oBBvSmJlVWpRfnxRaU5q8SHGZKADJzJLiSbnA2M4ryTe0NjEzMjS yMzCyMTcnDRhJXFexlNPAoQE0hNLUrNTUwtSi2C2MHFwSjUwiohu7/PTyckokrEJ+PzkRUvO hq/fZdQXvXrqrXXzgonq6kdb2BhvKU98xHpwIntO893fbKvnVluY31wTflXGm0mvbKWxeyGX z8fThXaxMVrbfl9ZODHyt+y6WQfFWNZdZxV5xTRz/5PX01ImHvC5tfzdt2lSziEya++0Rpd8 fcxy2+p924S9CUosxRmJhlrMRcWJAAMIx1PXAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130222_030925_091239_DBC56374 X-CRM114-Status: UNSURE ( 9.49 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.6 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.33 listed in list.dnswl.org] 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: 'Kukjin Kim' , 'Russell King' , 'Vinod Koul' , 'Mark Brown' , 'Rob Herring' , 'Grant Likely' , 'Sangbeom Kim' , 'Dan Williams' X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch adds dma maxburst size initialization. The maxburst should be set by MODE_CFGn.DMA_TYPE, because the pl330 dma driver supports burst mode. Signed-off-by: Hyeonkook Kim Acked-by: Grant Likely --- drivers/spi/spi-s3c64xx.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) -- 1.7.5.4 diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index e862ab8..5e6cafe 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -287,10 +287,20 @@ static void prepare_dma(struct s3c64xx_spi_dma_data *dma, struct s3c64xx_spi_driver_data *sdd; struct samsung_dma_prep info; struct samsung_dma_config config; + void __iomem *regs; + unsigned int mode_cfg; if (dma->direction == DMA_DEV_TO_MEM) { sdd = container_of((void *)dma, struct s3c64xx_spi_driver_data, rx_dma); + + regs = sdd->regs; + mode_cfg = readl(regs + S3C64XX_SPI_MODE_CFG); + if (mode_cfg & S3C64XX_SPI_MODE_4BURST) + config.maxburst = 4; + else + config.maxburst = 1; + config.direction = sdd->rx_dma.direction; config.fifo = sdd->sfr_start + S3C64XX_SPI_RX_DATA; config.width = sdd->cur_bpw / 8; @@ -298,6 +308,14 @@ static void prepare_dma(struct s3c64xx_spi_dma_data *dma, } else { sdd = container_of((void *)dma, struct s3c64xx_spi_driver_data, tx_dma); + + regs = sdd->regs; + mode_cfg = readl(regs + S3C64XX_SPI_MODE_CFG); + if (mode_cfg & S3C64XX_SPI_MODE_4BURST) + config.maxburst = 4; + else + config.maxburst = 1; + config.direction = sdd->tx_dma.direction; config.fifo = sdd->sfr_start + S3C64XX_SPI_TX_DATA; config.width = sdd->cur_bpw / 8;