Граф коммитов

64944 Коммитов

Автор SHA1 Сообщение Дата
Rob Herring f314f33be7 ARM: 7342/2: sa1100: prepare for sparse irq conversion
In preparation to convert SA1100 to sparse irq, set .nr_irqs for each machine
and explicitly include mach/irqs.h as needed.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-03-25 23:57:20 +01:00
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 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 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 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 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 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 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 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 abe06082d0 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>
2012-02-18 23:15:30 +00:00
Russell King e5c0fc4185 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>
2012-02-09 15:34:52 +00:00
Russell King 3259701cc2 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>
2012-02-09 15:34:51 +00:00
Russell King ae99ddbc97 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>
2012-02-09 15:34:50 +00:00
Russell King 6bd72f0562 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>
2012-02-09 15:34:50 +00:00
Russell King 36d3121302 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>
2012-02-09 15:34:50 +00:00
Russell King f03ecaa0aa ARM: sa1111: finish "allow cascaded IRQs to be used by platforms"
Commit 19851c58e6 (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>
2012-02-09 15:34:49 +00:00
Russell King 4d5d11285c 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>
2012-02-09 15:34:49 +00:00
Russell King a22db0f382 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>
2012-02-09 15:34:48 +00:00
Russell King 29c140b623 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>
2012-02-09 15:34:48 +00:00
Russell King fbae0f8912 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>
2012-02-09 15:34:18 +00:00
Russell King f942b0fd6c 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>
2012-02-09 15:34:17 +00:00
Russell King bab50a35ee 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>
2012-02-09 15:34:17 +00:00
Russell King 51f93390c2 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>
2012-02-09 15:34:17 +00:00
Russell King d2e539a5eb 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>
2012-02-09 15:34:16 +00:00
Russell King b6bdfcf5ae 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>
2012-02-09 15:34:16 +00:00
Russell King ced8d21cf1 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>
2012-02-09 15:34:16 +00:00
Russell King 9590e89874 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>
2012-02-09 15:34:15 +00:00
Russell King ae14c2e28c 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>
2012-02-09 15:34:15 +00:00
Russell King 398e58d09d 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>
2012-02-09 15:34:15 +00:00
Russell King 92e617d9e6 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>
2012-02-09 15:34:14 +00:00
Russell King 6ad1b61400 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>
2012-02-09 15:34:14 +00:00
Russell King 710455201f ARM: sa11x0: neponset: fix interrupt setup
Since ARM was converted to genirq, the neponset IRQ implementation has
gradually broken as a result of various subtle changes being introduced
into genirq.

It used to be that simple IRQs did not need an IRQ chip.  This is no
longer the case, and genirq barfs in irq_set_handler().  Fix this by
introducing a dummy no-op chip, and registering it along with the flow
handler.

Neponset IRQs really don't have any masking ability - all we have is a
status register to allow us to decode the source, and a three input OR
gate inside a CPLD.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-02-09 15:34:13 +00:00
Russell King 49e01e3fb6 ARM: sa11x0: assabet: ensure that GPIO27 is driven
GPIO27 is just connected to a CPLD input without any pull-ups or pull-
downs.  If GPIO27 is left as an input, it will float around mid-supply,
which for CMOS inputs is the worst place for a pin to be.  Ensure that
this pin is driven.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-02-09 15:34:13 +00:00
Russell King 4f592e6d1a ARM: sa11x0: assabet: avoid glitching GPIOs when setting outputs
Avoid glitching the GPIO signals during initialization, which can
have undesirable effects.  Ensure that the desired pin state is set
before we change the GPIO pin direction to be an output.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-02-09 15:34:12 +00:00
Russell King 7186fb9fd7 ARM: sa11x0: assabet: deassert QMUTE to codec while codec is unpowered
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-02-09 15:34:12 +00:00