diff options
author | Magnus Damm <damm@igel.co.jp> | 2008-12-25 18:17:26 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-01-13 13:19:10 +0900 |
commit | 96d71dd26b26f31105cffa7bd34b9216f4b36945 (patch) | |
tree | f8c8d9eef2c27ee74884e8f0e83f4ea155a444c8 /arch/sh/include | |
parent | ca00fa4e7e4da162e457eddd55ba807747455619 (diff) |
sh: lockless gpio_set_value()
This patch optimizes the gpio data register handling for gpio_set_value().
Instead of using the good old spinlock-plus-read-modify-write strategy
we now use a shadow register and atomic operations.
This improves the bitbanging mmc performance on Migo-R from 26 Kbytes/s
to 40 Kbytes/s.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include')
-rw-r--r-- | arch/sh/include/asm/gpio.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/include/asm/gpio.h b/arch/sh/include/asm/gpio.h index 942fefa61c7e..46a6d7914df7 100644 --- a/arch/sh/include/asm/gpio.h +++ b/arch/sh/include/asm/gpio.h @@ -59,7 +59,7 @@ struct pinmux_cfg_reg { .enum_ids = (pinmux_enum_t [(r_width / f_width) * (1 << f_width)]) \ struct pinmux_data_reg { - unsigned long reg, reg_width; + unsigned long reg, reg_width, reg_shadow; pinmux_enum_t *enum_ids; }; |