linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: hspi: fixup long delay time
@ 2013-04-05  5:26 Kuninori Morimoto
       [not found] ` <87hajlk0oh.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Kuninori Morimoto @ 2013-04-05  5:26 UTC (permalink / raw)
  To: Grant Likely
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, goda (RSO),
	Simon, Kuninori Morimoto

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 <yusuke.goda.sx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
---
 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");
-- 
1.7.9.5


------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] spi: hspi: fixup long delay time
       [not found] ` <87hajlk0oh.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
@ 2013-04-05  6:07   ` Simon Horman
       [not found]     ` <20130405060716.GA18557-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Horman @ 2013-04-05  6:07 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, goda,
	Kuninori Morimoto

On Thu, Apr 04, 2013 at 10:26:42PM -0700, Kuninori Morimoto wrote:
> 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 <yusuke.goda.sx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>

Acked-by: Simon Horman <horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>

Grant, can you take this patch?

> ---
>  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");
> -- 
> 1.7.9.5
> 

------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] spi: hspi: fixup long delay time
       [not found]     ` <20130405060716.GA18557-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
@ 2013-04-17  1:38       ` Kuninori Morimoto
       [not found]         ` <87k3o2djhs.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Kuninori Morimoto @ 2013-04-17  1:38 UTC (permalink / raw)
  To: Simon Horman
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, goda,
	Kuninori Morimoto


Hi Grant

Could you please teach me current status of this patch ?

> On Thu, Apr 04, 2013 at 10:26:42PM -0700, Kuninori Morimoto wrote:
> > 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 <yusuke.goda.sx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> 
> Acked-by: Simon Horman <horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
> 
> Grant, can you take this patch?
> 
> > ---
> >  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");
> > -- 
> > 1.7.9.5
> > 


Best regards
---
Kuninori Morimoto

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] spi: hspi: fixup long delay time
       [not found]         ` <87k3o2djhs.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
@ 2013-05-09  1:17           ` Kuninori Morimoto
  0 siblings, 0 replies; 7+ messages in thread
From: Kuninori Morimoto @ 2013-05-09  1:17 UTC (permalink / raw)
  To: Grant Likely
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, goda,
	Simon Horman, Kuninori Morimoto


Hi Grant

ping ?

> Hi Grant
> 
> Could you please teach me current status of this patch ?
> 
> > On Thu, Apr 04, 2013 at 10:26:42PM -0700, Kuninori Morimoto wrote:
> > > 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 <yusuke.goda.sx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> > 
> > Acked-by: Simon Horman <horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
> > 
> > Grant, can you take this patch?
> > 
> > > ---
> > >  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");
> > > -- 
> > > 1.7.9.5
> > > 
> 
> 
> Best regards
> ---
> Kuninori Morimoto


Best regards
---
Kuninori Morimoto

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] spi: hspi: fixup long delay time
  2013-05-27  0:59           ` [PATCH] " Kuninori Morimoto
@ 2013-05-27 12:17             ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2013-05-27 12:17 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Simon Horman, Grant Likely, spi-devel-general, Magnus, Linux-SH,
	Kuninori Morimoto

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

On Sun, May 26, 2013 at 05:59:20PM -0700, Kuninori Morimoto wrote:
> 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.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] spi: hspi: fixup long delay time
  2013-05-26 13:28         ` Simon Horman
@ 2013-05-27  0:59           ` Kuninori Morimoto
  2013-05-27 12:17             ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Kuninori Morimoto @ 2013-05-27  0:59 UTC (permalink / raw)
  To: Mark Brown, Simon Horman, Grant Likely
  Cc: spi-devel-general, Magnus, Linux-SH, Kuninori Morimoto

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 <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 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");
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] spi: hspi: fixup long delay time
       [not found] <87li7fwgk8.wl%kuninori.morimoto.gx@renesas.com>
@ 2013-05-16  7:13 ` Kuninori Morimoto
       [not found] ` <87d2si4cdn.wl%kuninori.morimoto.gx@renesas.com>
  1 sibling, 0 replies; 7+ messages in thread
From: Kuninori Morimoto @ 2013-05-16  7:13 UTC (permalink / raw)
  To: Simon, Grant Likely
  Cc: Magnus, Linux-SH, Kuninori Morimoto, goda, spi-devel-general

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 <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 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");
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-05-27 12:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-05  5:26 [PATCH] spi: hspi: fixup long delay time Kuninori Morimoto
     [not found] ` <87hajlk0oh.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2013-04-05  6:07   ` Simon Horman
     [not found]     ` <20130405060716.GA18557-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2013-04-17  1:38       ` Kuninori Morimoto
     [not found]         ` <87k3o2djhs.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2013-05-09  1:17           ` Kuninori Morimoto
     [not found] <87li7fwgk8.wl%kuninori.morimoto.gx@renesas.com>
2013-05-16  7:13 ` Kuninori Morimoto
     [not found] ` <87d2si4cdn.wl%kuninori.morimoto.gx@renesas.com>
     [not found]   ` <87bo824cbu.wl%kuninori.morimoto.gx@renesas.com>
2013-05-25  1:47     ` [PATCH 01/17 v2] " Simon Horman
2013-05-25 14:32       ` Mark Brown
2013-05-26 13:28         ` Simon Horman
2013-05-27  0:59           ` [PATCH] " Kuninori Morimoto
2013-05-27 12:17             ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).