All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 001/001] gpio-mxs: Select faster gpio-generic set methods
@ 2013-06-21 18:14 Simon Pearson
  2013-06-24  6:59 ` Shawn Guo
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Pearson @ 2013-06-21 18:14 UTC (permalink / raw)
  To: grant.likely, linus.walleij; +Cc: shawn.guo, linux-kernel

From: Simon Pearson <spearson@acumalabs.com>

Kernel 3.8.4.  By defining both the set and clear registers,
the speed of the gpio isimproved. gpio-generic.c, selects the
bgpio_set_with_clear() which isfaster than the current
bgpio_set_set().  This has performance implications for all
bitbang drivers (i2c, spi, etc).  Slow SPI as compared to
2.6.35.33 improved by a factor of 10 (80kHz CLK to 800kHz CLK).

Signed-off-by: Simon Pearson <spearson@acumalabs.com>

---
--- a/drivers/gpio/gpio-mxs.c.orig    2013-03-20 13:11:19.000000000 -0700
+++ b/drivers/gpio/gpio-mxs.c    2013-06-21 10:02:33.000000000 -0700
@@ -292,7 +292,8 @@ static int mxs_gpio_probe(struct platfor

      err = bgpio_init(&port->bgc, &pdev->dev, 4,
               port->base + PINCTRL_DIN(port),
-             port->base + PINCTRL_DOUT(port), NULL,
+             port->base + PINCTRL_DOUT(port) + MXS_SET,
+             port->base + PINCTRL_DOUT(port) + MXS_CLR,
               port->base + PINCTRL_DOE(port), NULL, 0);
      if (err)
          goto out_irqdesc_free;

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

* Re: [PATCH 001/001] gpio-mxs: Select faster gpio-generic set methods
  2013-06-21 18:14 [PATCH 001/001] gpio-mxs: Select faster gpio-generic set methods Simon Pearson
@ 2013-06-24  6:59 ` Shawn Guo
  0 siblings, 0 replies; 2+ messages in thread
From: Shawn Guo @ 2013-06-24  6:59 UTC (permalink / raw)
  To: Simon Pearson; +Cc: grant.likely, linus.walleij, linux-kernel

On Fri, Jun 21, 2013 at 11:14:07AM -0700, Simon Pearson wrote:
> From: Simon Pearson <spearson@acumalabs.com>
> 
> Kernel 3.8.4.  By defining both the set and clear registers,
> the speed of the gpio isimproved. gpio-generic.c, selects the
> bgpio_set_with_clear() which isfaster than the current
> bgpio_set_set().  This has performance implications for all
> bitbang drivers (i2c, spi, etc).  Slow SPI as compared to
> 2.6.35.33 improved by a factor of 10 (80kHz CLK to 800kHz CLK).
> 
> Signed-off-by: Simon Pearson <spearson@acumalabs.com>

The latest mainline kernel already has the improvement made by commit
90dae4e (gpio: mxs: Use set and clear capabilities of the gpio
controller).

Shawn

> 
> ---
> --- a/drivers/gpio/gpio-mxs.c.orig    2013-03-20 13:11:19.000000000 -0700
> +++ b/drivers/gpio/gpio-mxs.c    2013-06-21 10:02:33.000000000 -0700
> @@ -292,7 +292,8 @@ static int mxs_gpio_probe(struct platfor
> 
>      err = bgpio_init(&port->bgc, &pdev->dev, 4,
>               port->base + PINCTRL_DIN(port),
> -             port->base + PINCTRL_DOUT(port), NULL,
> +             port->base + PINCTRL_DOUT(port) + MXS_SET,
> +             port->base + PINCTRL_DOUT(port) + MXS_CLR,
>               port->base + PINCTRL_DOE(port), NULL, 0);
>      if (err)
>          goto out_irqdesc_free;


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

end of thread, other threads:[~2013-06-24  6:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-21 18:14 [PATCH 001/001] gpio-mxs: Select faster gpio-generic set methods Simon Pearson
2013-06-24  6:59 ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.