gpio-mxs: Select faster gpio-generic set methods
Subsystems (2)
PATCH 1/1 gpio-mxs: Select faster gpio-generic set methods
From: Simon Pearson <[email protected]>
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).
---
drivers/gpio/gpio-mxs.c 2013-06-21 10:02:33.000000000 -0700 renamed from drivers/gpio/gpio-mxs.c.orig 2013-03-20 13:11:19.000000000 -0700 +2 -1
@@ -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;
Quoted 10 lines · Simon Pearson
From: Simon Pearson <[email protected]>
Kernel 3.8.4. By defining both the set and clear registers, the speed of the gpio isimproved.
gpio-generic.c, selects thebgpio_set_with_clear()which isfaster than the currentbgpio_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 <[email protected]>
The latest mainline kernel already has the improvement made by commit 90dae4e (gpio: mxs: Use set and clear capabilities of the gpio controller).
Shawn
Quoted 14 lines
---
drivers/gpio/gpio-mxs.c 2013-06-21 10:02:33.000000000 -0700 renamed from drivers/gpio/gpio-mxs.c.orig 2013-03-20 13:11:19.000000000 -0700 +2
-1@@ -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;