Add a driver-data pointer so that low level drivers can add additional
data to the soc_common pcmcia socket structure.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Constify the pcmcia_low_level operation pointer to soc_pcmcia_init_one()
which has no need to modify it.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Switch to a per-socket cpufreq notifier rather than a global notifier.
This allows each socket to be self-contained.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Add support for handling supply regulators in the soc_common code. This
allows us to separate out the board specifics for setting voltages from
the PCMCIA code.
We detect when setting a voltage fails, and report this fact - some
platforms have fixed-voltage supplies (eg, for CF sockets at 3.3V) and
we need to ignore attempts to configure for 5V, as per the existing
board specific drivers.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Add a helper to get the voltage state of CF sockets, where the voltage
sense pins are not wired up. Switch assabet and cerf to use this
helper.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Add support to soc_common for controlling reset and bus enable GPIOs
from within the generic soc_common layer, rather than having
individual drivers having to perform this themselves.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
We no longer need to store the clk pointer in struct skt_dev_info as we
no longer need to remember the clk pointer for the cleanup paths.
Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Now that we use gpios and gpio_to_irq() etc to manage the various card
status signals within soc_common, and all socket drivers are converted,
these functions are no longer used. We can now get rid of these helper
functions.
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add GPIO support for reading the card status (card detect, ready,
battery voltage detect) signals into soc_common code. As we want
interrupts from these GPIOs, this takes over the old irq handling
infrastructure for card status signals, which will now be managed
entirely by the soc_common code.
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Move common socket initialization into soc_common.c.
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
skt->irq is a mere duplication of pcmcia_socket's pci_irq member.
Get rid of it.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
The 'dev' member is now only ever written, so we can safely remove it.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
No one should modify the ops structure supplied to soc_pcmcia_socket
so make it const.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Move the individual socket probing and initialization down into the
SoC specific support files, thereby allowing soc_common_drv_pcmcia_probe
to be eliminated. soc_common.c now no longer deals with distinct groups
of sockets.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Mechanically transplant the removal code from soc_common into each
SoC specific base support file, thereby allowing
soc_common_drv_pcmcia_remove to be removed. No other changes.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Factor out the functionality for adding and removing a single
socket, thereby allowing SoCs to individually register each
socket. The advantage of this approach is that SoCs can then
extend soc_pcmcia_socket as they wish.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Move the processor specific initialization (largely resources initialization)
out of soc_common_drv_pcmcia_probe() into dedicated sa11xx_drv_pcmcia_probe()
and __pxa2xx_drv_pcmcia_probe().
By doing this, we are now able to move the PCMCIA related definitions out of
pxa-regs.h and back into pxa2xx_base.c.
As a result, remove that reference of _PCMCIA1IO in arch/arm/mach-pxa/viper.c.
Signed-off-by: Eric Miao <eric.miao@marvell.com>
cs_internal.h is meant for definitions internal to the PCMCIA core modules.
It must not be included by PCMCIA socket drivers or by PCMCIA device drivers.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Use CONFIG_PCMCIA_DEBUG instead of DEBUG so that dev_dbg() and other tricks
work properly.
(includes bugfixes from and
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
)
Signed-off-by: Dominik Broodwski <linux@dominikbrodowski.net>
The code in include/pcmcia/bulkmem.h was only kept for compatibility reasons.
Therefore, move the remaining region_info_t definition to ds.h
[linux@dominikbrodowski.net: do not modify the IOCTL, move definition to
ds.h, and update changelog]
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
As a follow-up, remove the inclusion of pcmcia/version.h in many files.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!