summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap1/dma.c
AgeCommit message (Collapse)Author
2017-06-06ARM: OMAP1: DMA: Delete an unnecessary return statement in omap1_show_dma_caps()Markus Elfring
The script "checkpatch.pl" pointed information out like the following. WARNING: void function return statements are not generally useful Thus remove such a statement in the affected function. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-06ARM: OMAP1: DMA: Delete an error message for a failed memory allocation in ↵Markus Elfring
omap1_system_dma_init() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-06ARM: OMAP1: DMA: Improve a size determination in omap1_system_dma_init()Markus Elfring
Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-01-06ARM: OMAP1: DMA: Correct the number of logical channelsPeter Ujfalusi
OMAP1510, OMAP5910 and OMAP310 have only 9 logical channels. OMAP1610, OMAP5912, OMAP1710, OMAP730, and OMAP850 have 16 logical channels available. The wired 17 for the lch_count must have been used to cover the 16 + 1 dedicated LCD channel, in reality we can only use 9 or 16 channels. The d->chan_count is not used by the omap-dma stack, so we can skip the setup. chan_count was configured to the number of logical channels and not the actual number of physical channels anyways. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-02-22ARM: OMAP1: DMA: Provide dma_slave_map to omap-dmaPeter Ujfalusi
OMAP1 can not boot in DT mode and to be able to clean up the driver regarding to the dmaengine API use (switching to the new API) the device/slave -> filter mapping needs to be provided to the omap-dma driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-05-20ARM: OMAP1: Change interrupt numbering for sparse IRQTony Lindgren
Change interrupt numbering for sparse IRQ. We do this using a fixed offset until we can drop irqs.h once all it's users have been updated. Note that this depends on the GPIO fix for the MPUIO IRQs "gpio: omap: Fix regression for MPUIO interrupts". Also note that this patch adds some extra irq alloc warnings that will go away when we stop calling irq_alloc_descs in gpio-omap.c with a follow-up patch. Cc: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-04-04dmaengine: omap-dma: move register read/writes into omap-dma.cRussell King
Export the DMA register information from the SoC specific data, such that we can access the registers directly in omap-dma.c, mapping the register region ourselves as well. Rather than calculating the DMA channel register in its entirety for each access, we pre-calculate an offset base address for the allocated DMA channel and then just use the appropriate register offset. Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-04ARM: omap: dma: get rid of 'p' allocation and clean upRussell King
The omap_system_dma_plat_info structure is only seven words, it's not worth the expense of kmalloc()'ing backing store for this only to release it later. Note that platform_device_add_data() copies the data anyway. Clean up the initialisation of this structure - we don't even need code to initialise most of this structure. Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-04ARM: omap: move dma channel allocation into plat-omap codeRussell King
This really needs to be there, because otherwise the plat-omap code can kfree() this data structure, and then re-use the pointer later. Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-04ARM: omap: dma: get rid of errata globalRussell King
There's no need for this to be a global variable; move it into the errata configuration function instead. Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-04ARM: omap: clean up DMA register accessesRussell King
We can do much better with this by using a structure to describe each register, rather than code. Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-04ARM: omap: remove almost-const variablesRussell King
dma_stride and dma_common_ch_start are only ever initialised to one known value at initialisation, and are private to each of these files. There's no point these being variables at all. Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-04-04ARM: omap: remove references to disable_irq_lchRussell King
The disable_irq_lch method is never actually used, so there's not much point it existing; remove it. Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-18ARM: OMAP1: Remove dma.hJarkko Nikula
Add definitions in arch/arm/mach-omap1/dma.h are now removed so remove the file and include statements from dma.c and lcd_dma.c. Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-05-16ARM: OMAP: fix error return code in omap1_system_dma_init()Wei Yongjun
Fix to return -ENOMEM in the d->chan alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-05-08ARM: OMAP1: DMA: fix error handling in omap1_system_dma_init()Wei Yongjun
Add the missing iounmap() before return from omap1_system_dma_init() in the error handling case. Also removed platform_device_del() on add resources error case which cause dup device delete. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-01-11ARM: OMAP: Fix dmaengine init for multiplatformTony Lindgren
Otherwise omap dmaengine will initialized when booted on other SoCs. Fix this by initializing the platform device in arch/arm/*omap*/dma.c instead. Cc: Russell King <linux@arm.linux.org.uk> Cc: Dan Williams <djbw@fb.com> Cc: Vinod Koul <vinod.koul@intel.com> Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-11-30ARM: OMAP: Move plat-omap/dma-omap.h to include/linux/omap-dma.hTony Lindgren
Based on earlier discussions[1] we attempted to find a suitable location for the omap DMA header in commit 2b6c4e73 (ARM: OMAP: DMA: Move plat/dma.h to plat-omap/dma-omap.h) until the conversion to dmaengine is complete. Unfortunately that was before I was able to try to test compile of the ARM multiplatform builds for omap2+, and the end result was not very good. So I'm creating yet another all over the place patch to cut the last dependency for building omap2+ for ARM multiplatform. After this, we have finally removed the driver dependencies to the arch/arm code, except for few drivers that are being worked on. The other option was to make the <plat-omap/dma-omap.h> path to work, but we'd have to add some new header directory to for multiplatform builds. Or we would have to manually include arch/arm/plat-omap/include again from arch/arm/Makefile for omap2+. Neither of these alternatives sound appealing as they will likely lead addition of various other headers exposed to the drivers, which we want to avoid for the multiplatform kernels. Since we already have a minimal include/linux/omap-dma.h, let's just use that instead and add a note to it to not use the custom omap DMA functions any longer where possible. Note that converting omap DMA to dmaengine depends on dmaengine supporting automatically incrementing the FIFO address at the device end, and converting all the remaining legacy drivers. So it's going to be few more merge windows. [1] https://patchwork.kernel.org/patch/1519591/# cc: Russell King <linux@arm.linux.org.uk> cc: Kevin Hilman <khilman@ti.com> cc: "Benoît Cousson" <b-cousson@ti.com> cc: Herbert Xu <herbert@gondor.apana.org.au> cc: "David S. Miller" <davem@davemloft.net> cc: Vinod Koul <vinod.koul@intel.com> cc: Dan Williams <djbw@fb.com> cc: Mauro Carvalho Chehab <mchehab@infradead.org> cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> cc: David Woodhouse <dwmw2@infradead.org> cc: Kyungmin Park <kyungmin.park@samsung.com> cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> cc: Tomi Valkeinen <tomi.valkeinen@ti.com> cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> cc: Hans Verkuil <hans.verkuil@cisco.com> cc: Vaibhav Hiremath <hvaibhav@ti.com> cc: Lokesh Vutla <lokeshvutla@ti.com> cc: Rusty Russell <rusty@rustcorp.com.au> cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> cc: Afzal Mohammed <afzal@ti.com> cc: linux-crypto@vger.kernel.org cc: linux-media@vger.kernel.org cc: linux-mtd@lists.infradead.org cc: linux-usb@vger.kernel.org cc: linux-fbdev@vger.kernel.org Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-31ARM: OMAP: Remove cpu_is_omap usage from plat-omap/dma.cTony Lindgren
This code will be eventually in drivers, and for the code in the drivers we don't want to have any cpu_is_omap usage. Those macros should be private to arch/arm/mach-omap1 and arch/arm/mach-omap2. To fix this, let's move the define for dma_omap2plus() to dma-omap.h, and use the existing dma_attr passed in the platform_data as the revision registers are what they are. Note that we can now also remove the relative includes introduced by the recent clean-up patches. Cc: Russell King <linux@arm.linux.org.uk> Cc: Vinod Koul <vinod.koul@intel.com> Cc: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17ARM: OMAP1: Move plat/tc.h to mach/tc.h for omap1Tony Lindgren
We cannot keep this in plat as it causes problems with the ARM single zImage support. Cc: Felipe Balbi <balbi@ti.com> Cc: linux-pcmcia@lists.infradead.org Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-15ARM: OMAP: DMA: Move plat/dma.h to plat-omap/dma-omap.hLokesh Vutla
Move plat/dma.h to plat-omap/dma-omap.h as part of single zImage work Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-15ARM: OMAP1: DMA: Moving OMAP1 DMA channel definitions to mach-omap1Lokesh Vutla
Some of the omap1 dma channel definitions are used by some drivers. For moving omap1 dma channel definitions to mach-omap1/, the used ones should be defined locally to driver. Driver can eliminate it by using DT, platform data, or IORESOURCE_DMA. And moving OMAP1 DMA channel definitions to mach-omap1 Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-12Merge tag 'omap-cleanup-b-for-3.7' of ↵Tony Lindgren
git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into cleanup-makefile-sparse smatch and string-wrapping cleanups for the OMAP subarch code. These changes fix some of the more meaningful warnings that smatch returns for the OMAP subarch code, and unwraps strings that are wrapped at the 80-column boundary, to conform with the current practice. Basic build, boot, and PM logs are available here: http://www.pwsan.com/omap/testlogs/warnings_a_cleanup_3.7/20120912025927/
2012-09-12ARM: OMAP1: Move plat/irqs.h to mach/irqs.hTony Lindgren
This is now omap1 specific files. Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-12ARM: OMAP: unwrap stringsPaul Walmsley
Find and unwrap wrapped strings in the style: pr_debug("clockdomain: hardware cannot set/clear wake up of " "%s when %s wakes up\n", clkdm1->name, clkdm2->name); Keeping these strings contiguous seems to be the current Linux kernel policy. The offending lines were found with the following command: pcregrep -rnM '"\s*$\s*"' arch/arm/*omap* While here, some messages have been clarified, some pr_warning( ... calls have been converted to pr_warn( ..., and some printk(KERN_* ... have been converted to pr_*. Signed-off-by: Paul Walmsley <paul@pwsan.com>
2012-02-24ARM: OMAP1: Move most of plat/io.h into local iomap.hTony Lindgren
There's no need to have these in plat/io.h. While at it, clean up the includes to group them like they typically are grouped. Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-06-01arch/arm/mach-omap1/dma.c: Invert calls to platform_device_put and ↵Julia Lawall
platform_device_del Platform_device_del should be called before platform_device_put, as platform_device_put can delete the structure. Additionally, improve the error handling code for the call to ioremap, so that it calls platform_device_put. The semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e1,e2; @@ *platform_device_put(e1); ... when != e1 = e2 *platform_device_del(e1); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-12-20OMAP: DMA: Convert DMA library into platform driverG, Manjunath Kondaiah
Convert DMA library into DMA platform driver and make use of platform data provided by hwmod data base for OMAP2+ onwards. For OMAP1 processors, the DMA driver in mach-omap uses resource structures for getting platform data. Thanks to Tony Lindgren <tony@atomide.com> for fixing various omap1 issues and testing the same on OSK5912 board. Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com> Tested-by: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-12-20OMAP1: DMA: Implement in platform device modelG, Manjunath Kondaiah
Implement OMAP1 DMA as platform device and add support for registering through platform device layer using resource structures. Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Tony Lindgren <tony@atomide.com>