aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ste_dma40.c
Commit message (Collapse)AuthorAge
* dmaengine: dma40: Add support to split up large elementsPer Forlin2011-01-04
| | | | | | | | | The maximum transfer size of the stedma40 is (64k-1) x data-width. If the transfer size of one element exceeds this limit the job is split up and sent as linked transfer. Signed-off-by: Per Forlin <per.forlin@linaro.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* Merge branch 'dma40' into dmaengineDan Williams2010-10-19
|\
| * ste_dma40: remove enum for endianessRabin Vincent2010-10-19
| | | | | | | | | | | | | | | | | | A bool will suffice. The default is little endian. Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * ste_dma40: move mode_opt to separate configRabin Vincent2010-10-19
| | | | | | | | | | | | | | | | | | | | Defaults are "basic mode" for physical channels, and "logical source logical destination" for logical channels. Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * ste_dma40: move channel mode to a separate fieldRabin Vincent2010-10-19
| | | | | | | | | | | | | | | | | | And keep it logical by default. Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| * ste_dma40: add variable to indicate valid dma_cfgRabin Vincent2010-10-19
| | | | | | | | | | | | | | | | | | | | | | Since we want to reduce the amount of required channel configuration and remove channel_type, don't depend on it to indicate whether the configuration is valid. Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| |
| \
*-. \ Merge branches 'dma40', 'pl08x', 'fsldma', 'imx' and 'intel-mid' into dmaengineDan Williams2010-10-07
|\ \ \ | |_|/ |/| |
| | * ste_dma40: implement support for scatterlist to scatterlist copyIra Snyder2010-10-07
| |/ | | | | | | | | | | | | | | | | | | Now that the DMAEngine API has support for scatterlist to scatterlist copy, implement support for the STE DMA40 DMA controller. Cc: Linus Walleij <linus.ml.walleij@gmail.com> Acked-by: Per Fridén <per.friden@stericsson.com> Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: Remove stedma40_set_psize and pre_transfer hook in ste_dma40Per Forlin2010-10-07
| | | | | | | | | | | | | | | | | | | | | | Remove obsolete pre_transfer hook in stedma40_chan_cfg. The intent of this hook is merely to handle burst size compensation for ux500 variant MMCI. Remove obsolete stedma40_set_psize since it is only called from pre_transfer. DMAEngine device_control replaces the functionality of stedma40_set_psize. Signed-off-by: Per Forlin <per.forlin@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: Set burst size for phy and log chans in ste_dma40 dev_controlPer Forlin2010-10-07
| | | | | | | | | | | | | | | | | | | | Set burst for physical or logical channels respectively. Convert the values in dma_cfg to dma reg bits for physical or logical channels. Signed-off-by: Per Forlin <per.forlin@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: fix resource leaks in error paths.Rabin Vincent2010-10-07
| | | | | | | | | | | | | | | | | | Fix some leaks of allocated descriptors in error paths. Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: fix desc_getRabin Vincent2010-10-07
| | | | | | | | | | | | | | | | | | | | | | Fix desc_get to alloc a descriptor from the cache if the ones in the list are waiting for the ack. Also, memzero the descriptor when allocated from the list to ensure all fields are cleared. Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: fix clk_get failure pathRabin Vincent2010-10-07
| | | | | | | | | | | | | | | | | | clk_get returns an ERR_PTR. Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: fix disabled channels listRabin Vincent2010-10-07
| | | | | | | | | | | | | | | | | | | | The value in the array, not the index, specifies the channel to be disabled. Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: don't pause/resume non-executing channelsJonas Aaberg2010-09-22
| | | | | | | | | | | | | | | | There is no point in pausing what isn't running. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: rewrote LCLA entries allocation codeJonas Aaberg2010-09-22
| | | | | | | | | | | | | | | | | | | | | | | | LLI allocation is now done on job level instead of channel level. Previously the maximum length of a linked job in hw on a logical channel was 8, since the LLIs where evenly divided. Now only executing jobs have allocated LLIs which increase the length to a maximum of 64 links in HW. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: fix possible use of uninitialized variableJonas Aaberg2010-09-22
| | | | | | | | | | | | Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: corrected is_paused behaviorJonas Aaberg2010-09-22
| | | | | | | | | | | | | | | | The handling of pause detection was slightly incorrect. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: code clean-upJonas Aaberg2010-09-22
| | | | | | | | | | | | | | | | | | This patch includes non functional code clean up changes, file header updates and a few magic numbers got defined. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: added support for link jobs in hwJonas Aaberg2010-09-22
| | | | | | | | | | | | | | | | | | | | If a new job is added on a physical channel that already has a job, the new job is linked in hw to the old job instead of queueing up the jobs. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: removed a few magic numbersJonas Aaberg2010-09-22
| | | | | | | | | | | | | | | | | | Make sure to extract the revision field explicitly and document what bits are being accessed here without magic numbers. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: fix bug related to callback handlingJonas Aaberg2010-09-22
| | | | | | | | | | | | | | | | | | The callback got called even when it was not supposed to. Also removed some not needed interrupt trigger on/off code. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: Code clean-up and removed an unneeded suspend requestJonas Aaberg2010-09-22
| | | | | | | | | | | | | | | | | | This patch cleans up some code and removes a suspend request that was pointless since the hw was never configured nor running when it was called. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: No need reading, masking and setting a set registerJonas Aaberg2010-09-22
| | | | | | | | | | | | | | | | Removes an unnecessary register read and a few lines of code. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: Fix failed to restart logical channel bugJonas Aaberg2010-09-22
| | | | | | | | | | | | | | | | | | A transfer that runs in the different direction on the same channel will now be resumed when the other is suspend/stopped. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | DMAENGINE: ste_dma40: config checksLinus Walleij2010-09-22
|/ | | | | | | | Added various configuration checks. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: add runtime slave config to DMA40 v3Linus Walleij2010-08-04
| | | | | | | | | This extends the DMA engine driver for the DMA40 used in the U8500 platform with the generic runtime slave configuration interface. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: ste_dma40: support older siliconLinus Walleij2010-06-22
| | | | | | | | | | | This makes sure the DMA40 driver will also work on the oldest silicon revisions that have the on-chip memory on another location in the DB8500 and also requires explicit suspend before starting or resuming a logical channel. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> [added parenthesis to the definition of U8500_DMA_LCPA_BASE_ED] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: ste_dma40: support disabling physical channelsJonas Aaberg2010-06-22
| | | | | | | | This makes it possible to disable physical channels. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: ste_dma40: fix suspend bugJonas Aaberg2010-06-22
| | | | | | | | | This fixes a bug when suspending channels: first make the checks, then suspend the channel, not the other way around. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: ste_dma40: allocate LCLA dynamicallyLinus Walleij2010-06-22
| | | | | | | | | Switch to allocating LCLA in memory instead of having a fixed address. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: ste_dma40: no premature stopJonas Aaberg2010-06-22
| | | | | | | | Correct bug that could cause paused channels to stop. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: ste_dma40: interrupts only on dstJonas Aaberg2010-06-22
| | | | | | | | | | We don't want interrupts when the source is done, only when the destination is done and everything is complete at the recieveing end of a transfer. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: ste_dma40: avoid doing unnessecary suspendJonas Aaberg2010-06-22
| | | | | | | | Avoid doing unnessecary suspend when modifying logical channels. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: ste_dma40: lock fixJonas Aaberg2010-06-22
| | | | | | | | Fix up some locking issues found by enabling lock debugging. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: ste_dma40: deny ops on non-alloc channelsJonas Aaberg2010-06-22
| | | | | | | | Added checks to deny operating on none-allocated channels. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: ste_dma40: various cosmetic clean-upsJonas Aaberg2010-06-22
| | | | | | | | | This cleans up some extra newlines, removes some code duplication and moves the code to comply better with checkpatch. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: ste_dma40: improve allocation error handlingJonas Aaberg2010-06-22
| | | | | | | | Better error handling when channel allocation fails. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: ste_dma40: use kmem cacheJonas Aaberg2010-06-22
| | | | | | | | | Use kmem cache instead of own cache, reducing code duplication and bug sources. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: ste_dma40: moved freeing of client owned descPer Friden2010-06-22
| | | | | | | | fixed typo and moved freeing of client owned desc to free_dma. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: ste_dma40: only write phy channel config first timeLinus Walleij2010-06-22
| | | | | | | | | We only need to write the configuration to a physical channel if it is free, else it is already written. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: ste_dma40: fixed lli_max=1 issuePer Friden2010-06-22
| | | | | | | | | Fixed lli_max=1 issue in case of full lcla, currently this case is not properly handled. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: extend the control command to include an argLinus Walleij2010-05-17
| | | | | | | | | | | This adds an argument to the DMAengine control function, so that we can later provide control commands that need some external data passed in through an argument akin to the ioctl() operation prototype. [dan.j.williams@intel.com: fix up some missed conversions] Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: DMA40 fix for allocation of logical channel 0Marcin Mielczarczyk2010-05-17
| | | | | | | | | Fix for allocation failure of logical channel when event line happens to be number 0. Signed-off-by: Marcin Mielczarczyk <marcin.mielczarczyk@tieto.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: DMA40 support paused channel statusJonas Aaberg2010-05-17
| | | | | | | | | Support determining whether a channel is paused or not using the status function. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* DMAENGINE: Support for ST-Ericssons DMA40 block v3Linus Walleij2010-04-14
This is a straightforward driver for the ST-Ericsson DMA40 DMA controller found in U8500, implemented akin to the existing COH 901 318 driver. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Srinidh Kasagar <srinidhi.kasagar@stericsson.com> Cc: STEricsson_nomadik_linux@list.st.com Cc: Alessandro Rubini <rubini@unipv.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com>