From patchwork Fri Apr 5 05:26:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 2396681 Return-Path: X-Original-To: patchwork-spi-devel-general@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by patchwork1.kernel.org (Postfix) with ESMTP id E237A3FD40 for ; Fri, 5 Apr 2013 05:26:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1UNzAt-0004Fs-Pu; Fri, 05 Apr 2013 05:26:55 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1UNzAt-0004Fn-4P for spi-devel-general@lists.sourceforge.net; Fri, 05 Apr 2013 05:26:55 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.192.177 as permitted sender) client-ip=209.85.192.177; envelope-from=kuninori.morimoto.gx@gmail.com; helo=mail-pd0-f177.google.com; Received: from mail-pd0-f177.google.com ([209.85.192.177]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1UNzAo-0003fA-2m for spi-devel-general@lists.sourceforge.net; Fri, 05 Apr 2013 05:26:55 +0000 Received: by mail-pd0-f177.google.com with SMTP id u11so1814582pdi.22 for ; Thu, 04 Apr 2013 22:26:44 -0700 (PDT) X-Received: by 10.68.138.135 with SMTP id qq7mr12641012pbb.42.1365139604221; Thu, 04 Apr 2013 22:26:44 -0700 (PDT) Received: from morimoto-Dell-XPS420.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPS id u9sm14400494paf.22.2013.04.04.22.26.41 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 22:26:42 -0700 (PDT) Date: Thu, 04 Apr 2013 22:26:42 -0700 (PDT) Message-ID: <87hajlk0oh.wl%kuninori.morimoto.gx@renesas.com> To: Grant Likely From: Kuninori Morimoto Subject: [PATCH] spi: hspi: fixup long delay time MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (kuninori.morimoto.gx[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.192.177 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1UNzAo-0003fA-2m Cc: spi-devel-general@lists.sourceforge.net, "goda \(RSO\)" , Simon , Kuninori Morimoto X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces@lists.sourceforge.net Current HSPI driver is using msleep(20) on hspi_status_check_timeout(), but it was too long delay for SPI device. Bock-W board SPI access was too slow without this patch. This patch uses udelay(10) for it. Tested-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Acked-by: Simon Horman --- drivers/spi/spi-sh-hspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-sh-hspi.c b/drivers/spi/spi-sh-hspi.c index 60cfae5..eab593e 100644 --- a/drivers/spi/spi-sh-hspi.c +++ b/drivers/spi/spi-sh-hspi.c @@ -89,7 +89,7 @@ static int hspi_status_check_timeout(struct hspi_priv *hspi, u32 mask, u32 val) if ((mask & hspi_read(hspi, SPSR)) == val) return 0; - msleep(20); + udelay(10); } dev_err(hspi->dev, "timeout\n");