summary refs log tree commit diff
path: root/arch/arm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-29 10:22:49 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-03-24 11:30:12 +0000
commit21d1c7702e74337717a1133fe8665f6591768581 (patch)
tree7f90b864e45f53909a21897c46985973e3174463 /arch/arm
parent09a2ba2fa0eba3da747db860ac1c8c0956665316 (diff)
downloadlinux-21d1c7702e74337717a1133fe8665f6591768581.tar.gz
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>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/common/sa1111.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 7b4351b28a5e..d78499f84bd1 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -121,6 +121,7 @@ static struct sa1111 *g_sa1111;
 struct sa1111_dev_info {
 	unsigned long	offset;
 	unsigned long	skpcr_mask;
+	bool		dma;
 	unsigned int	devid;
 	unsigned int	irq[6];
 };
@@ -129,6 +130,7 @@ static struct sa1111_dev_info sa1111_devices[] = {
 	{
 		.offset		= SA1111_USB,
 		.skpcr_mask	= SKPCR_UCLKEN,
+		.dma		= true,
 		.devid		= SA1111_DEVID_USB,
 		.irq = {
 			IRQ_USBPWR,
@@ -142,6 +144,7 @@ static struct sa1111_dev_info sa1111_devices[] = {
 	{
 		.offset		= 0x0600,
 		.skpcr_mask	= SKPCR_I2SCLKEN | SKPCR_L3CLKEN,
+		.dma		= true,
 		.devid		= SA1111_DEVID_SAC,
 		.irq = {
 			AUDXMTDMADONEA,
@@ -641,10 +644,10 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
 		dev->irq[i] = sachip->irq_base + info->irq[i];
 
 	/*
-	 * If the parent device has a DMA mask associated with it,
-	 * propagate it down to the children.
+	 * If the parent device has a DMA mask associated with it, and
+	 * this child supports DMA, propagate it down to the children.
 	 */
-	if (sachip->dev->dma_mask) {
+	if (info->dma && sachip->dev->dma_mask) {
 		dev->dma_mask = *sachip->dev->dma_mask;
 		dev->dev.dma_mask = &dev->dma_mask;
 		dev->dev.coherent_dma_mask = sachip->dev->coherent_dma_mask;