Commit graph

287492 commits

Author SHA1 Message Date
Russell King 7256ecc2b7 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
2012-03-25 23:57:10 +01:00
Russell King 18bbff9f67 Merge branch 'sa11x0-lcd' into sa11x0
Conflicts:
	arch/arm/mach-sa1100/assabet.c
2012-03-25 23:55:54 +01:00
Russell King e7d863d0f4 Merge branch 'sa11x0-mtd' into sa11x0 2012-03-25 23:55:43 +01:00
Russell King c21320104e 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>
2012-03-25 23:55:12 +01:00
Russell King 9903405be5 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>
2012-03-25 23:55:09 +01:00
Russell King 277dc7ae14 Merge branch 'sa11x0-ir' into sa11x0 2012-03-25 23:54:57 +01:00
Russell King 374da9da22 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
2012-03-25 23:54:16 +01:00
Russell King 81e6ca3eb7 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>
2012-03-24 11:30:14 +00:00
Russell King 846a70487e 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>
2012-03-24 11:30:13 +00:00
Russell King 132db99ae2 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>
2012-03-24 11:30:13 +00:00
Russell King 3f878dbcd6 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>
2012-03-24 11:30:13 +00:00
Russell King 9cb0f819eb 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>
2012-03-24 11:30:13 +00:00
Russell King 876c1f2785 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>
2012-03-24 11:30:13 +00:00
Russell King 22eeaff367 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>
2012-03-24 11:30:12 +00:00
Russell King 924e1d4910 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>
2012-03-24 11:30:12 +00:00
Russell King 21d1c7702e 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>
2012-03-24 11:30:12 +00:00
Russell King 09a2ba2fa0 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>
2012-03-24 11:30:12 +00:00
Russell King 2213536d78 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>
2012-03-24 11:30:12 +00:00
Russell King ea8c00ac18 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>
2012-03-24 11:30:11 +00:00
Russell King 4f8d9cae15 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>
2012-03-24 11:30:11 +00:00
Russell King 6995f5b007 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>
2012-03-24 11:30:11 +00:00
Russell King 07be45f57e 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>
2012-03-24 11:29:52 +00:00
Russell King d138dacb4b 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>
2012-03-07 11:46:19 +00:00
Russell King bf95154ff6 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>
2012-03-07 11:46:17 +00:00
Russell King bb8c95055a Merge branch 'sa11x0-dma' into sa11x0-ir 2012-03-07 11:46:12 +00:00
Russell King 7931d92f4f 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>
2012-03-07 11:32:21 +00:00
Russell King 6365bead25 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>
2012-03-07 11:32:21 +00:00
Russell King 7cb66dcc82 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>
2012-02-24 09:39:59 +00:00
Russell King 00d94979c3 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>
2012-02-21 11:56:21 +00:00
Russell King 9bb13eed37 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>
2012-02-21 11:56:21 +00:00
Russell King 058502eb38 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>
2012-02-21 11:56:21 +00:00
Russell King ba5fd193f4 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>
2012-02-21 11:56:21 +00:00
Russell King d1a378876c 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>
2012-02-21 11:56:20 +00:00
Russell King 086ada54ab 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>
2012-02-21 11:56:19 +00:00
Russell King e1b7a72aeb 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>
2012-02-21 11:56:19 +00:00
Russell King 9e6720fb0c 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>
2012-02-21 11:56:19 +00:00
Russell King 531060fc19 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>
2012-02-21 11:56:19 +00:00
Russell King 7988929668 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>
2012-02-21 11:56:18 +00:00
Russell King 58f5cbf275 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>
2012-02-21 11:56:18 +00:00
Russell King 4f7e34f8ef 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>
2012-02-21 11:56:18 +00:00
Russell King 66564d832f 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>
2012-02-21 11:56:16 +00:00
Russell King 6ed3e2acc7 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>
2012-02-18 23:15:44 +00:00
Russell King 54292a4649 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>
2012-02-18 23:15:44 +00:00
Russell King 69dde86aa6 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>
2012-02-18 23:15:43 +00:00
Russell King 3323761677 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>
2012-02-18 23:15:43 +00:00
Russell King a3364409c4 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>
2012-02-18 23:15:43 +00:00
Russell King cf4abfcc0d 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>
2012-02-18 23:15:42 +00:00
Russell King 5a09b7120a 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>
2012-02-18 23:15:42 +00:00
Russell King a4b54acf9e 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>
2012-02-18 23:15:42 +00:00
Russell King 2b4d9d2b00 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>
2012-02-18 23:15:41 +00:00