GitHub/LineageOS/android_kernel_motorola_exynos9610.git
12 years agoARM: 7341/1: input: prepare jornada720 keyboard and ts for sa11x0 sparse irq
Rob Herring [Thu, 23 Feb 2012 13:28:36 +0000 (14:28 +0100)]
ARM: 7341/1: input: prepare jornada720 keyboard and ts for sa11x0 sparse irq

In preparation for sa11x0 sparse irq conversion, explicitly include
mach/irqs.h as it will not be included for sparse irq.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: 7340/1: rtc: sa1100: include mach/irqs.h instead of asm/irq.h
Rob Herring [Thu, 23 Feb 2012 13:27:58 +0000 (14:27 +0100)]
ARM: 7340/1: rtc: sa1100: include mach/irqs.h instead of asm/irq.h

Since asm/irq.h may not include mach/irqs.h, include mach/irqs.h directly.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMerge branch 'sa11x0-mcp' into sa11x0
Russell King [Sun, 25 Mar 2012 22:56:30 +0000 (23:56 +0100)]
Merge branch 'sa11x0-mcp' into sa11x0

Conflicts:
arch/arm/mach-sa1100/assabet.c
arch/arm/mach-sa1100/collie.c
arch/arm/mach-sa1100/generic.c
arch/arm/mach-sa1100/lart.c
arch/arm/mach-sa1100/shannon.c

12 years agoMerge branch 'sa11x0-lcd' into sa11x0
Russell King [Sun, 25 Mar 2012 22:55:54 +0000 (23:55 +0100)]
Merge branch 'sa11x0-lcd' into sa11x0

Conflicts:
arch/arm/mach-sa1100/assabet.c

12 years agoMerge branch 'sa11x0-mtd' into sa11x0
Russell King [Sun, 25 Mar 2012 22:55:23 +0000 (23:55 +0100)]
Merge branch 'sa11x0-mtd' into sa11x0

12 years agoARM: sa11x0: remove unused DMA controller definitions
Russell King [Sat, 14 Jan 2012 16:57:02 +0000 (16:57 +0000)]
ARM: sa11x0: remove unused DMA controller definitions

Remove the new unused DMA controller definitions from mach/SA-1100.h.
These are now private to the SA-11x0 DMA engine driver and contained
within the driver.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: remove old SoC private DMA driver
Russell King [Fri, 13 Jan 2012 12:07:24 +0000 (12:07 +0000)]
ARM: sa11x0: remove old SoC private DMA driver

Now that all users are converted over to using the DMA engine API,
we can get rid of the old platform dependent DMA driver.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMerge branch 'sa11x0-ir' into sa11x0
Russell King [Sun, 25 Mar 2012 22:54:52 +0000 (23:54 +0100)]
Merge branch 'sa11x0-ir' into sa11x0

12 years agoMerge branch 'sa1111' into sa11x0
Russell King [Sun, 25 Mar 2012 22:54:16 +0000 (23:54 +0100)]
Merge branch 'sa1111' into sa11x0

Conflicts:
arch/arm/common/sa1111.c
arch/arm/mach-sa1100/neponset.c

Fixed:
arch/arm/mach-sa1100/assabet.c
for the neponset changes

12 years agoUSB: sa1111: add hcd .reset method
Russell King [Thu, 26 Jan 2012 11:45:27 +0000 (11:45 +0000)]
USB: sa1111: add hcd .reset method

Add the .reset method to the HCD, and update the .start method
accordingly for this change.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoUSB: sa1111: add OHCI shutdown methods
Russell King [Thu, 26 Jan 2012 11:10:20 +0000 (11:10 +0000)]
USB: sa1111: add OHCI shutdown methods

Add OHCI shutdown methods to cleanly shutdown the OHCI controller on
system shutdowns and reboots.  This avoids the controller continuing
to run should be soft-reboot the platform, potentially scribbling
over system memory.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoUSB: sa1111: reorganize ohci-sa1111.c
Russell King [Thu, 26 Jan 2012 10:52:34 +0000 (10:52 +0000)]
USB: sa1111: reorganize ohci-sa1111.c

Combine usb_hcd_sa1111_probe() and ohci_hcd_sa1111_drv_probe(), doing
the same for the remove methods.

Move sa1111_start_hc and sa1111_stop_hc to be located next to these
the probe/release functions, as they're only called from them.

Get rid of the /*----*/ breaker lines.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoUSB: sa1111: get rid of nasty printk(KERN_DEBUG "%s: ...", __FILE__)
Russell King [Thu, 26 Jan 2012 10:39:57 +0000 (10:39 +0000)]
USB: sa1111: get rid of nasty printk(KERN_DEBUG "%s: ...", __FILE__)

Use dev_dbg() instead, it's more friendly.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoUSB: sa1111: sparse and checkpatch cleanups
Russell King [Thu, 26 Jan 2012 10:37:46 +0000 (10:37 +0000)]
USB: sa1111: sparse and checkpatch cleanups

Clean up the ohci-sa1111 driver formatting to be more compliant with
current standards, and add 'static' to various function definitions
to avoid sparse complaints about undeclared functions.  Remove the
unnecessary local declaration of 'usb_disabled', which can be found
instead in linux/usb.h.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: don't static map sa1111
Russell King [Sun, 29 Jan 2012 10:37:36 +0000 (10:37 +0000)]
ARM: sa11x0: don't static map sa1111

The sa1111 support will ioremap() the device; there is no need for
platforms to setup a static mapping for this.  Remove the static
mapping for this device from badge4, jornada720 and neponset.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: use dev_err() rather than printk()
Russell King [Sun, 29 Jan 2012 10:28:09 +0000 (10:28 +0000)]
ARM: sa1111: use dev_err() rather than printk()

Use dev_err() to report device specific errors rather than printk().

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: cleanup sub-device registration and unregistration
Russell King [Sun, 29 Jan 2012 10:20:00 +0000 (10:20 +0000)]
ARM: sa1111: cleanup sub-device registration and unregistration

Move the releasing of resources out of the release function - this
allows a cleaner and more conventional arrangement of the registration
failure paths and a saner unregistration process for these devices.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: only setup DMA for DMA capable devices
Russell King [Sun, 29 Jan 2012 10:22:49 +0000 (10:22 +0000)]
ARM: sa1111: only setup DMA for DMA capable devices

It's pointless registering the PS/2 interfaces with the dmabounce code
when there's no DMA support for these in hardware, so only setup the
DMA masks for two subdevices which support DMA - the OHCI and SAC.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: register sa1111 devices with dmabounce in bus notifier
Russell King [Sun, 29 Jan 2012 09:31:31 +0000 (09:31 +0000)]
ARM: sa1111: register sa1111 devices with dmabounce in bus notifier

Use the bus notifier to register sa1111 devices with dmabounce, rather
than after the device has been registered, potentially racing with
driver binding.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: move USB interface register definitions to ohci-sa1111.c
Russell King [Mon, 16 Jan 2012 11:37:03 +0000 (11:37 +0000)]
ARM: sa1111: move USB interface register definitions to ohci-sa1111.c

Move the USB interface register definitions into the driver, rather
than keeping them in a common place.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: move PCMCIA interface register definitions to sa1111_generic.c
Russell King [Mon, 16 Jan 2012 11:32:09 +0000 (11:32 +0000)]
ARM: sa1111: move PCMCIA interface register definitions to sa1111_generic.c

Move the PCMCIA interface register definitions into the driver, rather
than keeping them in a common place.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: move PS/2 interface register definitions to sa1111p2.c
Russell King [Mon, 16 Jan 2012 11:29:43 +0000 (11:29 +0000)]
ARM: sa1111: move PS/2 interface register definitions to sa1111p2.c

Move the PS/2 interface register definitions into the driver, rather
than keeping them in a common location.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: delete unused physical GPIO register definitions
Russell King [Mon, 16 Jan 2012 14:28:25 +0000 (14:28 +0000)]
ARM: sa1111: delete unused physical GPIO register definitions

Get rid of the unused GPIO register definitions - we access GPIO
registers through the base + offset method, and having the phys
address definitions is unnecessary duplication.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: provide a generic way to prevent devices from registering
Russell King [Thu, 26 Jan 2012 13:34:21 +0000 (13:34 +0000)]
ARM: sa1111: provide a generic way to prevent devices from registering

Some platforms don't want certain devices to be registered, because,
eg, the interface is not wired.  Provide a way for platforms to
prevent various devices from being registered via a devid bitmask in
the platform data.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: add DMA support for SIR transmit mode
Russell King [Fri, 13 Jan 2012 11:50:03 +0000 (11:50 +0000)]
NET: sa11x0-ir: add DMA support for SIR transmit mode

As the DMA engine API allows DMA channels to be reconfigured on the
fly, we can now support switching the DMA channel configuration to
support SIR transmit DMA without needing to claim an additional
physical DMA channel - thereby using up half the DMA channels just
for one driver.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: convert sa11x0-ir driver to use DMA engine API
Russell King [Fri, 13 Jan 2012 11:48:13 +0000 (11:48 +0000)]
NET: sa11x0-ir: convert sa11x0-ir driver to use DMA engine API

Convert the sa11x0 IrDA driver to use the sa11x0 DMA engine driver
rather than our own platform specific DMA API.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMerge branch 'sa11x0-dma' into sa11x0-ir
Russell King [Wed, 7 Mar 2012 11:46:12 +0000 (11:46 +0000)]
Merge branch 'sa11x0-dma' into sa11x0-ir

12 years agoARM: sa11x0: add SA-11x0 DMA device
Russell King [Mon, 9 Jan 2012 21:45:51 +0000 (21:45 +0000)]
ARM: sa11x0: add SA-11x0 DMA device

Add sa11x0 DMA platform device and resources to the list of
generic platform devices for SA11x0 machines.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoDMA: sa11x0: add SA-11x0 DMA driver
Russell King [Mon, 9 Jan 2012 21:44:07 +0000 (21:44 +0000)]
DMA: sa11x0: add SA-11x0 DMA driver

Add support for the SA-11x0 DMA driver, which replaces the private
API version in arch/arm/mach-sa1100/dma.c.

We model this as a set of virtual DMA channels, one for each request
signal, and assign the virtual DMA channel to a physical DMA channel
when there is work to be done.  This allows DMA users to claim their
channels, and hold them while not in use, without affecting the
availability of the physical channels.

Another advantage over this approach, compared to the private version,
is that a channel can be reconfigured on the fly without having to
release and re-request it - which for the IrDA driver, allows us to
use DMA for SIR mode transmit without eating up three physical
channels.  As IrDA is half-duplex, we actually only need one physical
channel, and this architecture allows us to achieve that.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoFB: sa11x0: convert to use platform resource and ioremap()
Russell King [Tue, 21 Feb 2012 12:15:09 +0000 (12:15 +0000)]
FB: sa11x0: convert to use platform resource and ioremap()

Convert the sa11x0 framebuffer driver to obtain the base address of its
hardware registers from the platform resources, and ioremap this rather
than relying on the static mappings.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoFB: sa11x0: convert shannon display enable accesses to use GPIO subsystem
Russell King [Wed, 18 Jan 2012 13:51:04 +0000 (13:51 +0000)]
FB: sa11x0: convert shannon display enable accesses to use GPIO subsystem

Rather than accessing GPSR and GPCR directly, use the GPIO subsystem
instead.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoFB: sa11x0: fix shannon GPSR/GPCR accesses
Russell King [Wed, 18 Jan 2012 13:47:14 +0000 (13:47 +0000)]
FB: sa11x0: fix shannon GPSR/GPCR accesses

The GPIO set and clear registers should only be written, rather than
read, modified, and written.  A read-modify-write will have undesired
side effects.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoFB: sa1100: make GPIO configuration setting safe
Russell King [Wed, 18 Jan 2012 12:52:59 +0000 (12:52 +0000)]
FB: sa1100: make GPIO configuration setting safe

The sa1100fb driver needs to set the GPIO direction and alternate
function register according to the panel that we're driving.  We've
done this in the driver by read-modify-writing the register, which
may cause problems with races.  Fix this with a minimal change.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoFB: sa1100: use inf members directly
Russell King [Sat, 14 Jan 2012 12:32:14 +0000 (12:32 +0000)]
FB: sa1100: use inf members directly

Now that the LCD information is available while the driver is loaded,
we don't need to cache that information into our driver private data
structure.  Get rid of it.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoFB: sa1100: remove assabet specific initialization
Russell King [Sat, 14 Jan 2012 12:21:18 +0000 (12:21 +0000)]
FB: sa1100: remove assabet specific initialization

Remove the assabet specific initialization for PAL output mode -
we call the lcd_power function before we enable the LCD controller,
which will disable the LCD panel to prevent it receiving incorrect
timings.  Therefore, this setup here is redundant.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoFB: sa1100: remove global sa1100fb_.*_power function pointers
Russell King [Sat, 14 Jan 2012 12:03:22 +0000 (12:03 +0000)]
FB: sa1100: remove global sa1100fb_.*_power function pointers

Now that we have platform data contained within the individual board
code, we can get rid of the global function pointers, placing them
inside the platform data instead.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoFB: sa1100: move platform data to platform files
Russell King [Sat, 14 Jan 2012 11:50:04 +0000 (11:50 +0000)]
FB: sa1100: move platform data to platform files

Move platform data out of the sa1100fb driver into the various
platform files themselves.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoFB: sa1100: move machine inf structures to <video/sa1100fb.h>
Russell King [Sat, 14 Jan 2012 10:56:06 +0000 (10:56 +0000)]
FB: sa1100: move machine inf structures to <video/sa1100fb.h>

Move the LCD data structures to an include file which can be shared
with the board code in arch/arm/mach-sa1100.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoFB: sa1100: combine RGB bitfield overrides into sa1100fb_mach_info
Russell King [Sat, 14 Jan 2012 10:49:44 +0000 (10:49 +0000)]
FB: sa1100: combine RGB bitfield overrides into sa1100fb_mach_info

Allow the sa1100fb_mach_info structure to carry the RGB bitfield
overrides, rather than requiring them to be separately initialized
in sa1100fb_get_machine_info().

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoFB: sa1100: convert printks to dev_xxx()
Russell King [Sat, 14 Jan 2012 10:22:56 +0000 (10:22 +0000)]
FB: sa1100: convert printks to dev_xxx()

Use the dev_xxx() macros for driver kernel message output, rather than
open coded printk() with KERN_ levels etc.  Remove DPRINTK().

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoFB: sa1100: constify rgb structures
Russell King [Sat, 14 Jan 2012 10:13:30 +0000 (10:13 +0000)]
FB: sa1100: constify rgb structures

The rgb structures should only be read and never written.  Constify
them.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoFB: sa1100: add .owner initializer to driver structure
Russell King [Sat, 14 Jan 2012 10:11:03 +0000 (10:11 +0000)]
FB: sa1100: add .owner initializer to driver structure

Annotate the driver structure with the .owner field, to allow the
module to be associated with the driver.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoFB: sa1100: avoid section mismatch warnings
Russell King [Sat, 14 Jan 2012 10:00:38 +0000 (10:00 +0000)]
FB: sa1100: avoid section mismatch warnings

WARNING: drivers/video/built-in.o(.devinit.text+0x58): Section mismatch in reference from the function sa1100fb_probe() to the function .init.text:sa1100fb_init_fbinfo()
The function __devinit sa1100fb_probe() references
a function __init sa1100fb_init_fbinfo().
If sa1100fb_init_fbinfo is only used by sa1100fb_probe then
annotate sa1100fb_init_fbinfo with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x258): Section mismatch in reference from the function sa1100fb_init_fbinfo() to the (unknown reference) .init.data:(unknown)
The function __devinit sa1100fb_init_fbinfo() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by sa1100fb_init_fbinfo then
annotate (unknown) with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x26c): Section mismatch in reference from the function sa1100fb_init_fbinfo() to the (unknown reference) .init.data:(unknown)
The function __devinit sa1100fb_init_fbinfo() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by sa1100fb_init_fbinfo then
annotate (unknown) with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x270): Section mismatch in reference from the function sa1100fb_init_fbinfo() to the (unknown reference) .init.data:(unknown)
The function __devinit sa1100fb_init_fbinfo() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by sa1100fb_init_fbinfo then
annotate (unknown) with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x278): Section mismatch in reference from the function sa1100fb_init_fbinfo() to the (unknown reference) .init.data:(unknown)
The function __devinit sa1100fb_init_fbinfo() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by sa1100fb_init_fbinfo then
annotate (unknown) with a matching annotation.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: mcp-sa11x0/assabet: move assabet reset handling out of mcp-sa11x0.c
Russell King [Sun, 22 Jan 2012 19:23:33 +0000 (19:23 +0000)]
MFD: mcp-sa11x0/assabet: move assabet reset handling out of mcp-sa11x0.c

Move the assabet specific reset handling out of mcp-sa11x0.c, into its
board file.  This leaves the mcp code free from all board specific
details.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: ucb1x00-assabet: add support for UCB1x00 GPIO switches
Russell King [Sat, 21 Jan 2012 15:53:42 +0000 (15:53 +0000)]
MFD: ucb1x00-assabet: add support for UCB1x00 GPIO switches

Add support for UCB1x00 GPIO buttons found on the Assabet platform.
We can now trivially support these buttons as we have standardized
gpiolib, genirq and gpio keyboard support in place for this device.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: add assabet ucb1x00 platform data
Russell King [Fri, 20 Jan 2012 22:18:06 +0000 (22:18 +0000)]
ARM: sa11x0: add assabet ucb1x00 platform data

Add ucb1x00 platform data to enable GPIO support on the UCB1300 device.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: ucb1x00-core: add wakeup support
Russell King [Sun, 22 Jan 2012 20:05:24 +0000 (20:05 +0000)]
MFD: ucb1x00-core: add wakeup support

Add genirq wakeup support for the ucb1x00 device.  This allows an
attached gpio_keys driver to wakeup the system.  Touchscreen is also
possible.

When there are no wakeup sources, ask the platform to assert the reset
signal to avoid any unexpected behaviour; this also puts the reset
signal at the right level when power is removed from the device.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: ucb1x00: convert to use genirq
Russell King [Sat, 21 Jan 2012 14:58:28 +0000 (14:58 +0000)]
MFD: ucb1x00: convert to use genirq

Convert the ucb1x00 driver to use genirq's interrupt services, rather
than its own private implementation.  This allows a wider range of
drivers to use the GPIO interrupts (such as the gpio_keys driver)
without being aware of the UCB1x00's private IRQ system.

This prevents the UCB1x00 core driver from being built as a module,
so adjust the configuration to add that restriction.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: mcp-core: remove legacy driver suspend/resume methods
Russell King [Sat, 21 Jan 2012 16:38:50 +0000 (16:38 +0000)]
MFD: mcp-core: remove legacy driver suspend/resume methods

The legacy driver suspend/resume methods are no longer used, so get rid
of them.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: ucb1x00-core: convert to use dev_pm_ops
Russell King [Sat, 21 Jan 2012 16:36:30 +0000 (16:36 +0000)]
MFD: ucb1x00-core: convert to use dev_pm_ops

Convert the ucb1x00-core driver to use dev_pm_ops rather than the legacy
members in the mcp driver.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: mcp-sa11x0: complain if mcp clock is left enabled
Russell King [Sat, 21 Jan 2012 18:26:17 +0000 (18:26 +0000)]
MFD: mcp-sa11x0: complain if mcp clock is left enabled

Issue a warning if the mcp clock was left enabled by some driver when
we're suspending or tearing down the core driver for the device.  This
is an aid for debugging missing disable calls.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: ucb1x00-core: disable mcp clock when bus is not required
Russell King [Sat, 21 Jan 2012 18:24:17 +0000 (18:24 +0000)]
MFD: ucb1x00-core: disable mcp clock when bus is not required

The ucb1x00-core was leaving the mcp clock enabled indefinitely after
probe.  This needlessly wastes power.  Add the necessary disables to
ensure that the clock remains off when we don't need it.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: ucb1x00-core: add missing ucb1x00_enable()/ucb1x00_disable()
Russell King [Sat, 21 Jan 2012 18:13:20 +0000 (18:13 +0000)]
MFD: ucb1x00-core: add missing ucb1x00_enable()/ucb1x00_disable()

ucb1x00_enable() and ucb1x00_disable() are used for power saving on the
SIB interface, allowing the host supplied clock to be disabled when not
required.  We require drivers which access the ucb1x00 to ensure that
they have enabled the clock prior to accessing the device, and they
should disable it once they're done.

As we don't expect gpiolib users to be aware of this detail, we must
make these calls in the gpiolib interfaces.  Add them.

Also add them to the resume method, which needs to re-establish the
GPIO pin settings.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: ucb1x00-core: scan drivers in same order they're registered
Russell King [Sat, 21 Jan 2012 15:35:01 +0000 (15:35 +0000)]
MFD: ucb1x00-core: scan drivers in same order they're registered

Cosmetic patch to scan the list of drivers in the order that the drivers
are registered, rather than the reverse order.  This avoids surprises
when drivers get probed in the reverse order, and input devices get
registered in a different order due to bind/unbind than from boot.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: ucb1x00-core: add owner and dev initializers to gpio structure
Russell King [Sat, 21 Jan 2012 14:47:00 +0000 (14:47 +0000)]
MFD: ucb1x00-core: add owner and dev initializers to gpio structure

Register the gpio device with proper .owner and .dev elements set
appropraitely.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: ucb1x00-core: clean up device handling in probe
Russell King [Sat, 21 Jan 2012 14:45:17 +0000 (14:45 +0000)]
MFD: ucb1x00-core: clean up device handling in probe

Clean up the device handling so we can use the struct device sanely.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: ucb1x00-core: use mutexes instead of semaphores
Russell King [Sat, 21 Jan 2012 09:33:38 +0000 (09:33 +0000)]
MFD: ucb1x00-core: use mutexes instead of semaphores

Convert the ucb1x00 driver to use mutexes rather than the depreciated
semaphores for exclusive access to the ADC.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: ucb1x00-core: add .owner initializer and module alias
Russell King [Sat, 21 Jan 2012 16:33:38 +0000 (16:33 +0000)]
MFD: ucb1x00-core: add .owner initializer and module alias

Add a .owner initializer to the UCB1x00 mcp driver structure, and
set an appropriate module alias to identify this driver.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: ucb1x00-core: add handling for ucb1x00 reset
Russell King [Sun, 22 Jan 2012 19:02:25 +0000 (19:02 +0000)]
MFD: ucb1x00-core: add handling for ucb1x00 reset

Provide a way to handle the software controlled ucb1x00 reset signal
from the ucb1x00-core driver without having to code platform specifics
into these drivers.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: ucb1x00-core: get rid of mach/hardware.h include
Russell King [Sat, 21 Jan 2012 16:41:26 +0000 (16:41 +0000)]
MFD: ucb1x00-core: get rid of mach/hardware.h include

Nothing in this driver requires anything from the machine/platform
headers, so remove this needless header file.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: ucb1x00-ts: provide input layer with device parent
Russell King [Sat, 21 Jan 2012 09:30:27 +0000 (09:30 +0000)]
MFD: ucb1x00-ts: provide input layer with device parent

Provide the input layer struct device with its parent device, so
that the input layer's device appears in the correct place in the
device tree.  This also allows the input device to be visibily
associated with its hardware.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMFD: mcp/ucb1x00: separate ucb1x00 driver data from the MCP data
Russell King [Fri, 20 Jan 2012 22:13:52 +0000 (22:13 +0000)]
MFD: mcp/ucb1x00: separate ucb1x00 driver data from the MCP data

Patch taken from 5dd7bf59e0 (ARM: sa11x0: Implement autoloading of codec
and codec pdata for mcp bus.) by Jochen Friedrich <jochen@scram.de>.

This adds just the codec data part of the patch.

Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: split si->dev for IrDA transmit and receive buffers
Russell King [Thu, 12 Jan 2012 13:56:28 +0000 (13:56 +0000)]
NET: sa11x0-ir: split si->dev for IrDA transmit and receive buffers

The sa11x0-ir device is not the device which is doing the DMA, the
DMA is being performed by a separate DMA engine.  Split the struct
device associated with each DMA channel from the main struct device,
but for the time being initialize it from the main struct device.

This is another preparatory step to converting this driver to use the
DMA engine API.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: fix size of SIR transmit buffer
Russell King [Thu, 12 Jan 2012 13:51:10 +0000 (13:51 +0000)]
NET: sa11x0-ir: fix size of SIR transmit buffer

The SIR transmit buffer was being allocated as 4000 bytes.  IrDA now
has constants for the buffer sizes, and defines the maximum wrapped
SIR packet to be 4269 bytes as indicated by IRDA_SIR_MAX_FRAME.  Use
this definition to allocate the transmit buffer instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: convert to use scatterlist DMA API
Russell King [Thu, 12 Jan 2012 12:45:00 +0000 (12:45 +0000)]
NET: sa11x0-ir: convert to use scatterlist DMA API

Convert the sa11x0 IrDA driver to use the scatterlist DMA API.  This
is a preparatory patch for converting the driver to use the DMA engine
API, which requires a struct scatterlist for every transfer.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: get rid of si->hscr0
Russell King [Sun, 8 Jan 2012 20:49:28 +0000 (20:49 +0000)]
NET: sa11x0-ir: get rid of si->hscr0

si->hscr0 is initialized to zero, and never changed.  Get rid of this
redundant variable.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: move sa1100_irda_txdma_irq
Russell King [Sun, 8 Jan 2012 17:48:02 +0000 (17:48 +0000)]
NET: sa11x0-ir: move sa1100_irda_txdma_irq

Move the FIR DMA transmit completion function along-side the other FIR
protocol functions.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: move SIR and FIR interrupt support
Russell King [Sun, 8 Jan 2012 17:10:01 +0000 (17:10 +0000)]
NET: sa11x0-ir: move SIR and FIR interrupt support

Move the interrupt handlers to the SIR and FIR sections of the file.
This improves the localization of the protocol handlers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: indirect handling of SIR and FIR interrupts
Russell King [Sun, 8 Jan 2012 16:26:15 +0000 (16:26 +0000)]
NET: sa11x0-ir: indirect handling of SIR and FIR interrupts

Use the same method for doing this as we do for the tx_start functions.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: split SIR and FIR tx functions
Russell King [Sun, 8 Jan 2012 16:16:39 +0000 (16:16 +0000)]
NET: sa11x0-ir: split SIR and FIR tx functions

Split the SIR and FIR transmit functions, as they behave differently.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: factor out speed checks
Russell King [Sun, 8 Jan 2012 16:30:44 +0000 (16:30 +0000)]
NET: sa11x0-ir: factor out speed checks

Whenever we complete a transmit, we always check for a speed change.
This check was open coded in several places.  Provide a helper
function to do this instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: move sa1100_irda_{startup,shutdown,suspend,resume}
Russell King [Sun, 8 Jan 2012 16:40:07 +0000 (16:40 +0000)]
NET: sa11x0-ir: move sa1100_irda_{startup,shutdown,suspend,resume}

Places these functions in better locations in the file, near where
they are used.  This saves some tiresome paging up/down.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: fix leak of tx skb
Russell King [Sun, 8 Jan 2012 15:38:15 +0000 (15:38 +0000)]
NET: sa11x0-ir: fix leak of tx skb

Ensure that we unmap and free a pending transmit skb when the interface
is stopped.  We rearrange the code a little bit to give all places a
similar layout when freeing the skb in both the completion and interface
stop paths - this gives some consistency to the code.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: containerize DMA data
Russell King [Sun, 8 Jan 2012 12:53:22 +0000 (12:53 +0000)]
NET: sa11x0-ir: containerize DMA data

Both the transmit and receive DMA store identical data: the skb, dma
address, and the dma registers.  Move this data into its own data
structure.  The following replacements were used:

rxskb -> dma_rx.skb
rxbuf_dma -> dma_rx.dma
rxdma -> dma_rx.regs

txskb -> dma_tx.skb
txbuf_dma -> dma_tx.dma
txdma -> dma_tx.regs

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: obtain interrupt number from platform resources
Russell King [Sun, 8 Jan 2012 12:02:17 +0000 (12:02 +0000)]
NET: sa11x0-ir: obtain interrupt number from platform resources

Convert the sa11x0-ir driver to obtain its interrupt number from the
platform device resources, rather than via the asm/irq.h include.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: set netdev's parent struct device
Russell King [Sun, 8 Jan 2012 12:07:24 +0000 (12:07 +0000)]
NET: sa11x0-ir: set netdev's parent struct device

Add the missing SET_NETDEV_DEV() call to set the parent device
correctly for this network interface.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: handle DMA mapping errors properly
Russell King [Sun, 8 Jan 2012 13:55:23 +0000 (13:55 +0000)]
NET: sa11x0-ir: handle DMA mapping errors properly

Handle DMA mapping errors in the rx skb allocation and tx paths.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoNET: sa11x0-ir: fix documentation bug
Russell King [Sun, 8 Jan 2012 12:04:05 +0000 (12:04 +0000)]
NET: sa11x0-ir: fix documentation bug

Spell the module parameter correctly in comments.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: change devid to be a bitmask
Russell King [Wed, 25 Jan 2012 10:42:52 +0000 (10:42 +0000)]
ARM: sa1111: change devid to be a bitmask

Change the sa1111 device id to be a bitmask.  This allows us to
specify the actual device, while allowing a single driver to bind
to both PS2 devices.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: badge4: move board specific ohci initialization to badge4.c
Russell King [Thu, 26 Jan 2012 13:28:35 +0000 (13:28 +0000)]
ARM: sa11x0: badge4: move board specific ohci initialization to badge4.c

Move the handling of the 5v supply into badge4.c, removing this board
specific detail from the sa1111 ohci driver.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: add platform enable/disable functions
Russell King [Thu, 26 Jan 2012 13:25:47 +0000 (13:25 +0000)]
ARM: sa1111: add platform enable/disable functions

Add platform hooks to be called when individual sa1111 devices are
enabled and disabled.  This will allow us to move some platform
specifics out of the individual drivers.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: add shutdown hook to sa1111_driver structure
Russell King [Thu, 26 Jan 2012 11:01:18 +0000 (11:01 +0000)]
ARM: sa1111: add shutdown hook to sa1111_driver structure

Add a shutdown hook to the sa1111_driver structure to allow drivers
to be notified of system reboots and shutdowns.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: implement support for sparse IRQs
Russell King [Tue, 24 Jan 2012 21:25:20 +0000 (21:25 +0000)]
ARM: sa1111: implement support for sparse IRQs

Implement the necessary allocation/freeing functionality to support
sparse IRQs with the SA-1111 device.  On non-sparse IRQ platforms,
this allows us to dynamically allocate from within the available IRQ
number space.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: finish "allow cascaded IRQs to be used by platforms"
Russell King [Mon, 16 Jan 2012 00:09:22 +0000 (00:09 +0000)]
ARM: sa1111: finish "allow cascaded IRQs to be used by platforms"

Commit 19851c58e680 (sa1111: allow cascaded IRQs to be used by platforms)
moved the IRQ definitions to the .c file, and added an irq_base member
to the private data structure.

The inerrupt demultiplexer uses irq_base, but the interrupt setup code
does not.  Also, although the commit adds a private data structure to
pass this data, it isn't even referenced, resulting in irq_base being
zero.

We also copied the IRQ numbers from the device info array into the actual
devices, resulting in wrong interrupt numbers passed to the sub-devices.

The net effect of this is that we always overwrite IRQs 0-54, even if
they are allocated elsewhere in the system.

Add the code necessary to setup the private irq_base, and use it in the
IRQ setup code.  Make the SA-1111 probe fail with -EINVAL if there is no
platform data provided.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: add .owner initializer to sa1111 driver structures
Russell King [Thu, 26 Jan 2012 11:19:48 +0000 (11:19 +0000)]
ARM: sa1111: add .owner initializer to sa1111 driver structures

Add a .owner initializer to the sa1111 driver structures to allow
allow the modules to be associated with their driver structures.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: add sa1111 core driver .owner initializer
Russell King [Sat, 14 Jan 2012 16:09:22 +0000 (16:09 +0000)]
ARM: sa1111: add sa1111 core driver .owner initializer

Add an initializer for the struct device_driver .owner member.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: fix PWM state on suspend
Russell King [Fri, 3 Feb 2012 19:05:13 +0000 (19:05 +0000)]
ARM: sa1111: fix PWM state on suspend

We should not write to the SA1111 registers after setting the SLEEP
bit.  Moreover, the manual says that the PWM registers should be
disabled before we enter sleep.  So, move the clearing of these
registers earlier in the suspend sequence.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa1111: fix memory request/grant setup on PM events
Russell King [Fri, 3 Feb 2012 19:03:31 +0000 (19:03 +0000)]
ARM: sa1111: fix memory request/grant setup on PM events

We weren't re-enabling the memory request/grant signals on resume,
causing DMA devices on the sa1111 to fail.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: neponset: don't static map neponset registers
Russell King [Sun, 29 Jan 2012 11:23:33 +0000 (11:23 +0000)]
ARM: sa11x0: neponset: don't static map neponset registers

Now that we ioremap() the neponset register space, there's no need
to static map the neponset registers.  Get rid of this static mapping.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: neponset: move register definitions to neponset.c
Russell King [Sun, 29 Jan 2012 11:19:06 +0000 (11:19 +0000)]
ARM: sa11x0: neponset: move register definitions to neponset.c

Move the board specific neponset register definitions to the board
file, rather than mach/neponset.h.  However, as the NCR_0 register
definitions are used by some drivers, leave these behind.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: assabet/neponest: create neponset device in assabet.c
Russell King [Thu, 26 Jan 2012 11:50:23 +0000 (11:50 +0000)]
ARM: sa11x0: assabet/neponest: create neponset device in assabet.c

The neponset board is a daughter board for the Assabet.  Create the
neponset platform device in assabet.c, where we don't have to wrap
it with machine_is_assabet() stuff.  We also create this device
dynamically rather than keeping it as a static device.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: neponset: suspend/resume in _noirq state
Russell King [Tue, 24 Jan 2012 23:29:47 +0000 (23:29 +0000)]
ARM: sa11x0: neponset: suspend/resume in _noirq state

Suspend and resume in the _noirq state, so that we're saving the
state of the modem control signals as late as possible, and restoring
them as early as possible.  There's nothing to do in thaw/poweroff
methods as we've already saved the necessary state.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: neponset: place smc91x and sa1111 resources in neponset device
Russell King [Tue, 24 Jan 2012 23:17:37 +0000 (23:17 +0000)]
ARM: sa11x0: neponset: place smc91x and sa1111 resources in neponset device

Complete the neponset device resources by covering the children's
memory resources in the parent neponset device.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: neponset: get parent IRQ from neponset device resource
Russell King [Tue, 24 Jan 2012 23:05:08 +0000 (23:05 +0000)]
ARM: sa11x0: neponset: get parent IRQ from neponset device resource

Obtain the parent IRQ from the neponset device resource rather than
hard-coding it into the code.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: neponset: implement support for sparse IRQs
Russell King [Tue, 24 Jan 2012 22:22:18 +0000 (22:22 +0000)]
ARM: sa11x0: neponset: implement support for sparse IRQs

Implement the necessary allocation/freeing functionality to support
sparse IRQs with the Neponset device.  On non-sparse IRQ platforms,
this allows us to dynamically allocate from within the available IRQ
number space.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: neponset: dynamically create neponset child devices
Russell King [Tue, 24 Jan 2012 22:36:47 +0000 (22:36 +0000)]
ARM: sa11x0: neponset: dynamically create neponset child devices

Use platform_device_register_full() to dynamically create the various
neponset child platform devices, and place them below the neponset
device itself to ensure proper PM ordering and device structure.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: neponset: save and restore MDM_CTL_0
Russell King [Tue, 24 Jan 2012 22:10:02 +0000 (22:10 +0000)]
ARM: sa11x0: neponset: save and restore MDM_CTL_0

Save and restore the modem output control register across a suspend/
resume, as well as the NCR register.  Place these in a locally
allocated data structure rather than needing a new static variable.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: neponset: add driver .owner initializer
Russell King [Tue, 24 Jan 2012 23:33:28 +0000 (23:33 +0000)]
ARM: sa11x0: neponset: add driver .owner initializer

Ensure that the driver .owner field is properly initialized.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: neponset: shuffle some code around
Russell King [Tue, 24 Jan 2012 22:13:00 +0000 (22:13 +0000)]
ARM: sa11x0: neponset: shuffle some code around

Move the IRQ handler along side the rest of the IRQ code, and rearrange
the include files.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: sa11x0: neponset: provide function to manipulate NCR_0
Russell King [Mon, 16 Jan 2012 09:31:47 +0000 (09:31 +0000)]
ARM: sa11x0: neponset: provide function to manipulate NCR_0

Rather than having direct register accesses to NCR_0 scattered amongst
the code, provide a function instead.  This contains the necessary
race protection for this platform, ensuring that updates to this
register are safe.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>