diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 21:19:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 21:19:05 -0400 |
commit | 61464c8357c8f6b780e4c44f5c79471799c51ca7 (patch) | |
tree | 4509cf075403965528f380f2f825c46908fb7d4e /arch/arm/plat-omap/dma.c | |
parent | 47061eda2584b9e4516d1e3a9713406a3a559ac8 (diff) | |
parent | 9cf1c871526cf6bfec2a653e1e068ee72592542c (diff) |
Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM soc general cleanups from Olof Johansson:
"This is a large branch that contains a handful of different cleanups:
- Fixing up the I/O space remapping on PCI on ARM. This is a series
from Rob Herring that restructures how all pci devices allocate I/O
space, and it's part of the work to allow multiplatform kernels.
- A number of cleanup series for OMAP, moving and removing some
headers, sparse irq rework and in general preparation for
multiplatform.
- Final removal of all non-DT boards for Tegra, it is now
device-tree-only!
- Removal of a stale platform, nxp4008. It's an old mobile chipset
that is no longer in use, and was very likely never really used
with a mainline kernel. We have not been able to find anyone
interested in keeping it around in the kernel.
- Removal of the legacy dmaengine driver on tegra
+ A handful of other things that I haven't described above."
Fix up some conflicts with the staging tree (and because nxp4008 was
removed)
* tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (184 commits)
ARM: OMAP2+: serial: Change MAX_HSUART_PORTS to 6
ARM: OMAP4: twl-common: Support for additional devices on i2c1 bus
ARM: mmp: using for_each_set_bit to simplify the code
ARM: tegra: harmony: fix ldo7 regulator-name
ARM: OMAP2+: Make omap4-keypad.h local
ARM: OMAP2+: Make l4_3xxx.h local
ARM: OMAP2+: Make l4_2xxx.h local
ARM: OMAP2+: Make l3_3xxx.h local
ARM: OMAP2+: Make l3_2xxx.h local
ARM: OMAP1: Move irda.h from plat to mach
ARM: OMAP2+: Make hdq1w.h local
ARM: OMAP2+: Make gpmc-smsc911x.h local
ARM: OMAP2+: Make gpmc-smc91x.h local
ARM: OMAP1: Move flash.h from plat to mach
ARM: OMAP2+: Make debug-devices.h local
ARM: OMAP1: Move board-voiceblue.h from plat to mach
ARM: OMAP1: Move board-sx1.h from plat to mach
ARM: OMAP2+: Make omap-wakeupgen.h local
ARM: OMAP2+: Make omap-secure.h local
ARM: OMAP2+: Make ctrl_module_wkup_44xx.h local
...
Diffstat (limited to 'arch/arm/plat-omap/dma.c')
-rw-r--r-- | arch/arm/plat-omap/dma.c | 54 |
1 files changed, 23 insertions, 31 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 7fe626761e53..c76ed8bff838 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -36,9 +36,8 @@ | |||
36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
38 | 38 | ||
39 | #include <mach/hardware.h> | 39 | #include <plat/cpu.h> |
40 | #include <plat/dma.h> | 40 | #include <plat/dma.h> |
41 | |||
42 | #include <plat/tc.h> | 41 | #include <plat/tc.h> |
43 | 42 | ||
44 | /* | 43 | /* |
@@ -969,8 +968,7 @@ void omap_stop_dma(int lch) | |||
969 | l = p->dma_read(CCR, lch); | 968 | l = p->dma_read(CCR, lch); |
970 | } | 969 | } |
971 | if (i >= 100) | 970 | if (i >= 100) |
972 | printk(KERN_ERR "DMA drain did not complete on " | 971 | pr_err("DMA drain did not complete on lch %d\n", lch); |
973 | "lch %d\n", lch); | ||
974 | /* Restore OCP_SYSCONFIG */ | 972 | /* Restore OCP_SYSCONFIG */ |
975 | p->dma_write(sys_cf, OCP_SYSCONFIG, lch); | 973 | p->dma_write(sys_cf, OCP_SYSCONFIG, lch); |
976 | } else { | 974 | } else { |
@@ -1154,8 +1152,7 @@ void omap_dma_link_lch(int lch_head, int lch_queue) | |||
1154 | 1152 | ||
1155 | if ((dma_chan[lch_head].dev_id == -1) || | 1153 | if ((dma_chan[lch_head].dev_id == -1) || |
1156 | (dma_chan[lch_queue].dev_id == -1)) { | 1154 | (dma_chan[lch_queue].dev_id == -1)) { |
1157 | printk(KERN_ERR "omap_dma: trying to link " | 1155 | pr_err("omap_dma: trying to link non requested channels\n"); |
1158 | "non requested channels\n"); | ||
1159 | dump_stack(); | 1156 | dump_stack(); |
1160 | } | 1157 | } |
1161 | 1158 | ||
@@ -1181,15 +1178,13 @@ void omap_dma_unlink_lch(int lch_head, int lch_queue) | |||
1181 | 1178 | ||
1182 | if (dma_chan[lch_head].next_lch != lch_queue || | 1179 | if (dma_chan[lch_head].next_lch != lch_queue || |
1183 | dma_chan[lch_head].next_lch == -1) { | 1180 | dma_chan[lch_head].next_lch == -1) { |
1184 | printk(KERN_ERR "omap_dma: trying to unlink " | 1181 | pr_err("omap_dma: trying to unlink non linked channels\n"); |
1185 | "non linked channels\n"); | ||
1186 | dump_stack(); | 1182 | dump_stack(); |
1187 | } | 1183 | } |
1188 | 1184 | ||
1189 | if ((dma_chan[lch_head].flags & OMAP_DMA_ACTIVE) || | 1185 | if ((dma_chan[lch_head].flags & OMAP_DMA_ACTIVE) || |
1190 | (dma_chan[lch_queue].flags & OMAP_DMA_ACTIVE)) { | 1186 | (dma_chan[lch_queue].flags & OMAP_DMA_ACTIVE)) { |
1191 | printk(KERN_ERR "omap_dma: You need to stop the DMA channels " | 1187 | pr_err("omap_dma: You need to stop the DMA channels before unlinking\n"); |
1192 | "before unlinking\n"); | ||
1193 | dump_stack(); | 1188 | dump_stack(); |
1194 | } | 1189 | } |
1195 | 1190 | ||
@@ -1831,16 +1826,15 @@ static int omap1_dma_handle_ch(int ch) | |||
1831 | if ((csr & 0x3f) == 0) | 1826 | if ((csr & 0x3f) == 0) |
1832 | return 0; | 1827 | return 0; |
1833 | if (unlikely(dma_chan[ch].dev_id == -1)) { | 1828 | if (unlikely(dma_chan[ch].dev_id == -1)) { |
1834 | printk(KERN_WARNING "Spurious interrupt from DMA channel " | 1829 | pr_warn("Spurious interrupt from DMA channel %d (CSR %04x)\n", |
1835 | "%d (CSR %04x)\n", ch, csr); | 1830 | ch, csr); |
1836 | return 0; | 1831 | return 0; |
1837 | } | 1832 | } |
1838 | if (unlikely(csr & OMAP1_DMA_TOUT_IRQ)) | 1833 | if (unlikely(csr & OMAP1_DMA_TOUT_IRQ)) |
1839 | printk(KERN_WARNING "DMA timeout with device %d\n", | 1834 | pr_warn("DMA timeout with device %d\n", dma_chan[ch].dev_id); |
1840 | dma_chan[ch].dev_id); | ||
1841 | if (unlikely(csr & OMAP_DMA_DROP_IRQ)) | 1835 | if (unlikely(csr & OMAP_DMA_DROP_IRQ)) |
1842 | printk(KERN_WARNING "DMA synchronization event drop occurred " | 1836 | pr_warn("DMA synchronization event drop occurred with device %d\n", |
1843 | "with device %d\n", dma_chan[ch].dev_id); | 1837 | dma_chan[ch].dev_id); |
1844 | if (likely(csr & OMAP_DMA_BLOCK_IRQ)) | 1838 | if (likely(csr & OMAP_DMA_BLOCK_IRQ)) |
1845 | dma_chan[ch].flags &= ~OMAP_DMA_ACTIVE; | 1839 | dma_chan[ch].flags &= ~OMAP_DMA_ACTIVE; |
1846 | if (likely(dma_chan[ch].callback != NULL)) | 1840 | if (likely(dma_chan[ch].callback != NULL)) |
@@ -1880,21 +1874,19 @@ static int omap2_dma_handle_ch(int ch) | |||
1880 | 1874 | ||
1881 | if (!status) { | 1875 | if (!status) { |
1882 | if (printk_ratelimit()) | 1876 | if (printk_ratelimit()) |
1883 | printk(KERN_WARNING "Spurious DMA IRQ for lch %d\n", | 1877 | pr_warn("Spurious DMA IRQ for lch %d\n", ch); |
1884 | ch); | ||
1885 | p->dma_write(1 << ch, IRQSTATUS_L0, ch); | 1878 | p->dma_write(1 << ch, IRQSTATUS_L0, ch); |
1886 | return 0; | 1879 | return 0; |
1887 | } | 1880 | } |
1888 | if (unlikely(dma_chan[ch].dev_id == -1)) { | 1881 | if (unlikely(dma_chan[ch].dev_id == -1)) { |
1889 | if (printk_ratelimit()) | 1882 | if (printk_ratelimit()) |
1890 | printk(KERN_WARNING "IRQ %04x for non-allocated DMA" | 1883 | pr_warn("IRQ %04x for non-allocated DMA channel %d\n", |
1891 | "channel %d\n", status, ch); | 1884 | status, ch); |
1892 | return 0; | 1885 | return 0; |
1893 | } | 1886 | } |
1894 | if (unlikely(status & OMAP_DMA_DROP_IRQ)) | 1887 | if (unlikely(status & OMAP_DMA_DROP_IRQ)) |
1895 | printk(KERN_INFO | 1888 | pr_info("DMA synchronization event drop occurred with device %d\n", |
1896 | "DMA synchronization event drop occurred with device " | 1889 | dma_chan[ch].dev_id); |
1897 | "%d\n", dma_chan[ch].dev_id); | ||
1898 | if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ)) { | 1890 | if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ)) { |
1899 | printk(KERN_INFO "DMA transaction error with device %d\n", | 1891 | printk(KERN_INFO "DMA transaction error with device %d\n", |
1900 | dma_chan[ch].dev_id); | 1892 | dma_chan[ch].dev_id); |
@@ -2014,8 +2006,9 @@ static int __devinit omap_system_dma_probe(struct platform_device *pdev) | |||
2014 | 2006 | ||
2015 | p = pdev->dev.platform_data; | 2007 | p = pdev->dev.platform_data; |
2016 | if (!p) { | 2008 | if (!p) { |
2017 | dev_err(&pdev->dev, "%s: System DMA initialized without" | 2009 | dev_err(&pdev->dev, |
2018 | "platform data\n", __func__); | 2010 | "%s: System DMA initialized without platform data\n", |
2011 | __func__); | ||
2019 | return -EINVAL; | 2012 | return -EINVAL; |
2020 | } | 2013 | } |
2021 | 2014 | ||
@@ -2090,8 +2083,8 @@ static int __devinit omap_system_dma_probe(struct platform_device *pdev) | |||
2090 | } | 2083 | } |
2091 | ret = setup_irq(dma_irq, &omap24xx_dma_irq); | 2084 | ret = setup_irq(dma_irq, &omap24xx_dma_irq); |
2092 | if (ret) { | 2085 | if (ret) { |
2093 | dev_err(&pdev->dev, "set_up failed for IRQ %d" | 2086 | dev_err(&pdev->dev, "set_up failed for IRQ %d for DMA (error %d)\n", |
2094 | "for DMA (error %d)\n", dma_irq, ret); | 2087 | dma_irq, ret); |
2095 | goto exit_dma_lch_fail; | 2088 | goto exit_dma_lch_fail; |
2096 | } | 2089 | } |
2097 | } | 2090 | } |
@@ -2099,8 +2092,7 @@ static int __devinit omap_system_dma_probe(struct platform_device *pdev) | |||
2099 | /* reserve dma channels 0 and 1 in high security devices */ | 2092 | /* reserve dma channels 0 and 1 in high security devices */ |
2100 | if (cpu_is_omap34xx() && | 2093 | if (cpu_is_omap34xx() && |
2101 | (omap_type() != OMAP2_DEVICE_TYPE_GP)) { | 2094 | (omap_type() != OMAP2_DEVICE_TYPE_GP)) { |
2102 | printk(KERN_INFO "Reserving DMA channels 0 and 1 for " | 2095 | pr_info("Reserving DMA channels 0 and 1 for HS ROM code\n"); |
2103 | "HS ROM code\n"); | ||
2104 | dma_chan[0].dev_id = 0; | 2096 | dma_chan[0].dev_id = 0; |
2105 | dma_chan[1].dev_id = 1; | 2097 | dma_chan[1].dev_id = 1; |
2106 | } | 2098 | } |
@@ -2108,8 +2100,8 @@ static int __devinit omap_system_dma_probe(struct platform_device *pdev) | |||
2108 | return 0; | 2100 | return 0; |
2109 | 2101 | ||
2110 | exit_dma_irq_fail: | 2102 | exit_dma_irq_fail: |
2111 | dev_err(&pdev->dev, "unable to request IRQ %d" | 2103 | dev_err(&pdev->dev, "unable to request IRQ %d for DMA (error %d)\n", |
2112 | "for DMA (error %d)\n", dma_irq, ret); | 2104 | dma_irq, ret); |
2113 | for (irq_rel = 0; irq_rel < ch; irq_rel++) { | 2105 | for (irq_rel = 0; irq_rel < ch; irq_rel++) { |
2114 | dma_irq = platform_get_irq(pdev, irq_rel); | 2106 | dma_irq = platform_get_irq(pdev, irq_rel); |
2115 | free_irq(dma_irq, (void *)(irq_rel + 1)); | 2107 | free_irq(dma_irq, (void *)(irq_rel + 1)); |