summaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/gpio.h
Commit message (Collapse)AuthorAgeFilesLines
* sh: use gpiolibMagnus Damm2009-01-271-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>
* sh: lockless gpio_set_value()Magnus Damm2009-01-271-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>
* sh: make gpio_get/set_value() O(1)Magnus Damm2009-01-271-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>
* sh: asm/gpio.h needs linux/kernel.h for might_sleep()/WARN_ON().Paul Mundt2008-10-231-0/+1
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: improve pinmux support for single direction pinsMagnus Damm2008-10-221-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>
* sh: gpio: Stub in dummy GPIO<->IRQ mapping routines.Paul Mundt2008-10-211-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>
* sh: gpio: Include asm-generic/gpio.h for non-gpiolib stubs.Paul Mundt2008-10-211-4/+2
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: GPIO and pinmux base codeMagnus Damm2008-10-201-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>
* sh: migrate to arch/sh/include/Paul Mundt2008-07-291-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>
OpenPOWER on IntegriCloud