History log of /include/linux/sh_pfc.h
Revision Date Author Comments
e499ada829cf769ac6f16627cd9f09b855a7fd6d 13-Dec-2011 Magnus Damm <damm@opensource.se> sh: pfc: Unlock register support

Add PFC support for a 32-bit unlock register. Needed to
drive the r8a7779 PFC that comes with a funky PMMR register.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
f78a26f55b2438c439609fc90b473f7f08f5b697 13-Dec-2011 Magnus Damm <damm@opensource.se> sh: pfc: Variable bitfield width config register support

Add support for variable config reg hardware by adding
the macro PINMUX_CFG_REG_VAR(). The width of each bitfield
needs to be passed to the macro, and the correct space must
be consumed by each bitfield in the enum table following the
macro. Data registers still need to have fixed bitfields.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
b0e10211cba1629e2e534ca9cb3d87cfc7e389ea 08-Dec-2011 Magnus Damm <damm@opensource.se> sh: pfc: ioremap() support

Add support for non-entity mapped PFC registers through
the use of struct resource and ioremap()/iounmap().

The PFC main data structure gets updated with a pointer
to a struct resources array that point out all register
windows used by the PFC instance. The register definitions
are kept as physical addresses but the PFC code will do
transparent conversion into virtual addresses whenever
register windows are specified using with struct resource.

To introduce as little performance penalty as possible the
virtual address of each data register is cached in memory.
The virtual address of each configuration register is however
calculated during run time. This because the configuration
is considered slow path so focus is instead put on keeping
memory foot print as small as possible.

The PFC register access code is in this patch updated from
__raw_readN() / __raw_writeN() into ioreadN() / iowriteN().

This patch is needed to support the PFC block in r8a7779.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
9b49139b34a66907662e0be8efe79316dc63f8e0 11-Nov-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> ARM: mach-shmobile: move helper macro PORTCR to sh_pfc.h

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
972c3fb69cd1cd8d549b8a06ce42611eab405c20 11-Nov-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> ARM: mach-shmobile: move helper macro PORT_xx to sh_pfc.h

This patch moves PORT_xx helper macro to sh_pfc.h,
and it expects CPU_ALL_PORT() macro for each CPU

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
bd8d0cbaa00883c84741b98264f8318cdade9c71 11-Nov-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> ARM: mach-shmobile: move helper macro PORT_DATA_xx to sh_pfc.h

This patch move PORT_DATA_xx helper macro to sh_pfc.h.
and pfc-sh7372.c used it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
ad2a8e7ea4128af984a98537b1b9484722b6b4bb 28-Sep-2011 Magnus Damm <damm@opensource.se> sh: pfc: Add GPIO IRQ support

Add GPIO IRQ support to the shared PFC code in drivers/sh/pfc.c

The enums pointed out by a certain GPIO will be matched against
a table for IRQ to enum mappings.

Only the shared PFC code is updated by this patch. SoC specific
changes are also needed to allow platforms to make use of this
feature.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2854aedd05255f3142167f4ac715ab67ee569004 28-Sep-2011 Magnus Damm <damm@opensource.se> sh: pfc: Remove unused gpio_in_use member

Remove unused member gpio_in_use from struct pinmux_info.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
b72421d8aa39724474ec2bfb91e182001f1f25a7 03-Oct-2010 Paul Mundt <lethal@linux-sh.org> sh: pfc: support pinmux deregistration.

Presently the pinmux code is a one-way thing, but there's nothing
preventing an unregistration if no one has grabbed any of the pins.
This will permit us to save a bit of memory on systems that require pin
demux for certain peripherals in the case where registration of those
peripherals fails, or they are otherwise not attached to the system.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
fae4339919c741f89f7e293b8c646207e1df28e1 27-Nov-2009 Magnus Damm <damm@opensource.se> sh: Break out SuperH PFC code

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>