diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-29 05:22:49 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-03-24 07:30:12 -0400 |
commit | 21d1c7702e74337717a1133fe8665f6591768581 (patch) | |
tree | 7f90b864e45f53909a21897c46985973e3174463 /arch/arm/common | |
parent | 09a2ba2fa0eba3da747db860ac1c8c0956665316 (diff) |
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/common')
-rw-r--r-- | arch/arm/common/sa1111.c | 9 |
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; | |||
121 | struct sa1111_dev_info { | 121 | struct sa1111_dev_info { |
122 | unsigned long offset; | 122 | unsigned long offset; |
123 | unsigned long skpcr_mask; | 123 | unsigned long skpcr_mask; |
124 | bool dma; | ||
124 | unsigned int devid; | 125 | unsigned int devid; |
125 | unsigned int irq[6]; | 126 | unsigned int irq[6]; |
126 | }; | 127 | }; |
@@ -129,6 +130,7 @@ static struct sa1111_dev_info sa1111_devices[] = { | |||
129 | { | 130 | { |
130 | .offset = SA1111_USB, | 131 | .offset = SA1111_USB, |
131 | .skpcr_mask = SKPCR_UCLKEN, | 132 | .skpcr_mask = SKPCR_UCLKEN, |
133 | .dma = true, | ||
132 | .devid = SA1111_DEVID_USB, | 134 | .devid = SA1111_DEVID_USB, |
133 | .irq = { | 135 | .irq = { |
134 | IRQ_USBPWR, | 136 | IRQ_USBPWR, |
@@ -142,6 +144,7 @@ static struct sa1111_dev_info sa1111_devices[] = { | |||
142 | { | 144 | { |
143 | .offset = 0x0600, | 145 | .offset = 0x0600, |
144 | .skpcr_mask = SKPCR_I2SCLKEN | SKPCR_L3CLKEN, | 146 | .skpcr_mask = SKPCR_I2SCLKEN | SKPCR_L3CLKEN, |
147 | .dma = true, | ||
145 | .devid = SA1111_DEVID_SAC, | 148 | .devid = SA1111_DEVID_SAC, |
146 | .irq = { | 149 | .irq = { |
147 | AUDXMTDMADONEA, | 150 | AUDXMTDMADONEA, |
@@ -641,10 +644,10 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
641 | dev->irq[i] = sachip->irq_base + info->irq[i]; | 644 | dev->irq[i] = sachip->irq_base + info->irq[i]; |
642 | 645 | ||
643 | /* | 646 | /* |
644 | * If the parent device has a DMA mask associated with it, | 647 | * If the parent device has a DMA mask associated with it, and |
645 | * propagate it down to the children. | 648 | * this child supports DMA, propagate it down to the children. |
646 | */ | 649 | */ |
647 | if (sachip->dev->dma_mask) { | 650 | if (info->dma && sachip->dev->dma_mask) { |
648 | dev->dma_mask = *sachip->dev->dma_mask; | 651 | dev->dma_mask = *sachip->dev->dma_mask; |
649 | dev->dev.dma_mask = &dev->dma_mask; | 652 | dev->dev.dma_mask = &dev->dma_mask; |
650 | dev->dev.coherent_dma_mask = sachip->dev->coherent_dma_mask; | 653 | dev->dev.coherent_dma_mask = sachip->dev->coherent_dma_mask; |