aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/gpio.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-11-30sh: Break out SuperH PFC codeMagnus Damm1-81/+1
This file breaks out the SuperH PFC code from arch/sh/kernel/gpio.c + arch/sh/include/asm/gpio.h to drivers/sh/pfc.c + include/linux/sh_pfc.h. Similar to the INTC stuff. The non-SuperH specific file location makes it possible to share the code between multiple architectures. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-27sh: use gpiolibMagnus Damm1-26/+35
This patch updates the SuperH gpio code to make use of gpiolib. The gpiolib callbacks get() and set() are lockless, but we use our own spinlock for the other operations to make sure hardware register bitfield accesses stay atomic. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-27sh: lockless gpio_set_value()Magnus Damm1-1/+1
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>
2009-01-27sh: make gpio_get/set_value() O(1)Magnus Damm1-1/+6
This patch modifies the table based SuperH gpio implementation to make use of direct table lookups. With this change the functions gpio_get_value() and gpio_set_value() are O(1). Tested on Migo-R using bitbanging mmc. Performance is improved from 11 KBytes/s to 26 Kbytes/s. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-23sh: asm/gpio.h needs linux/kernel.h for might_sleep()/WARN_ON().Paul Mundt1-0/+1
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-22sh: improve pinmux support for single direction pinsMagnus Damm1-0/+1
This patch improves the support for gpio pins that are hard wired to either input or output and lack control register association. A special force enum id is used to allow use without control register but still mark the gpio pin as input or output. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21sh: gpio: Stub in dummy GPIO<->IRQ mapping routines.Paul Mundt1-0/+15
IRQ modes are not presently supported, so stub in dummy definitions for now (taken from linux/gpio.h). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21sh: gpio: Include asm-generic/gpio.h for non-gpiolib stubs.Paul Mundt1-4/+2
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20sh: GPIO and pinmux base codeMagnus Damm1-2/+90
This patch adds gpio code together with the pinmux table parser. In the future we should optimize this and switch back to gpiolib. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-07-29sh: migrate to arch/sh/include/Paul Mundt1-0/+19
This follows the sparc changes a439fe51a1f8eb087c22dd24d69cebae4a3addac. Most of the moving about was done with Sam's directions at: http://marc.info/?l=linux-sh&m=121724823706062&w=2 with subsequent hacking and fixups entirely my fault. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>