summaryrefslogtreecommitdiff
path: root/drivers/dma
AgeCommit message (Collapse)Author
2011-12-16Squashandroid-20111223Benn Pörscke
Change-Id: I2fcf46d1fc4b0cd4c61e5be3654c43b80db86015
2011-10-25dmaengine/ste_dma40: limit burst size to 16Per Forlin
The client is not aware of the maximum burst size in the dma driver. If the size exceeds 16 set max to 16. ST-Ericsson ID: 363565 ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: NA Change-Id: I298b779db3d42944f2fcc9688fe519f640cca99d Signed-off-by: Per Forlin <per.forlin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34361 Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-25dmaengine/ste_dma40: set dma max seg to 0xffffPer Forlin
Maximum DMA seg size is (0xffff x data_width). If max seg size is not set it deafults to 64k. This results in failure if transferring 64k in byte mode. Large seg sizes may be supported by splitting large transfer. ---------------- commit d49278e3351b34870cbffffc5067348a318e7b06 Author: Per Forlin <per.forlin@stericsson.com> Date: Mon Dec 20 18:31:38 2010 +0100 dmaengine: dma40: Add support to split up large elements ---------------- This patch has been rejected or lost on kernel 3.0. It exists on mainline kernel 3.0. ST-Ericsson ID: 363565 ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: NA Change-Id: I7c0bf09df04cb20da2164c5c40f3a0ae73e65289 Signed-off-by: Per Forlin <per.forlin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34405 Reviewed-by: QATOOLS Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-24dmaengine/ste_dma40: fix memory leak due to prepared descriptorsPer Forlin
Prepared descriptors that are not submitted will not be freed. Add prepared descriptor to a list to be able to release them upon dmaengine_terminate_all(). ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: I93bb2bd072851c435c0dcf0a50deab63d9c1b735 Signed-off-by: Per Forlin <per.forlin@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34968 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: Per FORLIN <per.forlin@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-10-22dmaengine/ste_dma40: fix Oops due to double free of client descriptorPer Forlin
The client list may exist in two lists at the same time. This makes free fail since the same desc is freed multiple times. Remove desc from client list when adding it to the pending queue. Move free of client owned descriptors from free_dma() to terminate_all(). Unable to handle kernel paging request at virtual address 00100104 pgd = dea8c000 [00100104] *pgd=1ea62831, *pte=00000000, *ppte=00000000 Internal error: Oops: 817 [#1] PREEMPT SMP Modules linked in: CPU: 0 Not tainted (3.1.0-rc3+ #58) PC is at d40_free_chan_resources+0x64/0x330 ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: I66946e99ec5a47f6c5600bffc62ea9f56b6ff257 Signed-off-by: Per Forlin <per.forlin@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34964 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: Per FORLIN <per.forlin@stericsson.com> Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-22dmaengine/ste_dma40: add missing kernel doc for pending_queuePer Forlin
ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: I1f1ebdc763a3213cad3c1a4ef85159ea4cf303bb Signed-off-by: Per Forlin <per.forlin@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34962 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: Per FORLIN <per.forlin@stericsson.com> Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-22dmaengine/ste_dma40: add a separate queue for pending requestsPer Forlin
ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA tx_submit will add descriptors to the pending queue. Issue pending will then move the pending descriptors to the transfer queue. Change-Id: I788d74f7680e050b85a6245505c43285a1a027fc Signed-off-by: Per Forlin <per.forlin@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34960 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: Per FORLIN <per.forlin@stericsson.com> Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-22dmaengine/ste_dma40: remove duplicate call to d40_pool_lli_free().Per Forlin
d40_desc_free() already calls d40_pool_lli_free(). ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: I1c967138a0683eceef3f11cc7f8a977dcfcdfecb Signed-off-by: Per Forlin <per.forlin@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34949 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-22dmaengine/ste_dma40: use AMBA PrimeCell helper macrosLinus Walleij
The DMA40 is not a PrimeCell from ARM, but it still use the same ID registers. So let's utilize the existing macros in the PrimeCell header to identify manufacturer and revision of the IP block instead of reinventing the wheel. ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: I212b38f374a877b1a335e6324e8a437602cbda6c Cc: Robert Marklund <robert.marklund@stericsson.com> Cc: Per Forlin <per.forlin@linaro.org> Cc: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34940 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-22dma40: use flags to reduce parameter countRabin Vincent
ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: I9e7b1b347c56d320ec573e68cd40581866bf0882 Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34911 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: QATOOLS
2011-10-22dma40: unify src/dst addr checkRabin Vincent
ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: I571cdaf0970306e78b69a443883c699cc18772d7 Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34896 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: QATOOLS Reviewed-by: QABUILD
2011-10-22dma40: pass the info pointer all the way to reduce argument countRabin Vincent
ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: I3279e5a337ca319ec9a8f21eef8dfbfec6e8182f Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34884 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com>
2011-10-22dma40: unify d40_log_sg_to_lli funcs for mem and slaveRabin Vincent
ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: Ibaa0c8dc66be8aed389f80aec866b68e5ddc6295 Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34857 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: QABUILD
2011-10-20dma40: combine duplicated code in log_sg_to_devRabin Vincent
ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: If9c32d98633fb88fc04b1ef948f197fb0fc63387 Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34700 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com>
2011-10-20dma40: move lli_load to main source fileRabin Vincent
These register writes are better placed in the main source file rather than ll.c. ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: Ic96a59376f85ad9c2cb1fdb79eb1155fe7d3c19e Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34585 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com>
2011-10-20dma40: combine mem and slave prep_sg functionsRabin Vincent
ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: I5f0b88074e4f53a34fb1edef34e94654095bbe8c Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34580 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: QATOOLS
2011-10-20dma40: remove export of stedma40_memcpy_sgRabin Vincent
The dmaengine framework has the API for this now. ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: I60e6df6532ec0d263bf40bb4b52f3f86d01b9989 Depends-on: I8ad8fb94eca418f889d31a37940b2d6fa09da404 Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34417 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: QATOOLS
2011-10-18dma40: combine mem and slave sg-to-lli functionsRabin Vincent
ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: I3ff1e801c557a9ba692ff87d01a01d0555627458 Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34354 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com>
2011-10-18dma40: remove duplicated dev addr codeRabin Vincent
ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: If0e126c3b0705714347ab2cbde980f02f2dfb160 Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34222 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com>
2011-10-18dma40: combine duplicated d40_pool_lli_alloc() callsRabin Vincent
ST-Ericsson ID: 362972 ST-Ericsson FOSS-OUT ID: NA ST-Ericsson Linux next: NA Change-Id: I997bdea14410be097652f6618bf1ee6e88ff2c62 Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34197 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com>
2011-10-13dma40: Handle esram regulator in dma driverNarayanan G
If the esram is used for LCLA region, this patch will hold the regulator during when the DMA driver is active. The regulator will be disabled on a suspend and will be enabled again on resume. The dma driver initcall has been moved to subsys_initcall(), to ensure that the regulators are available before we do a regulator_get(). ST-Ericsson ID: 364165 ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: NA Change-Id: Ieee3c329c26e9fb43f282716fa57810211f79d85 Signed-off-by: Narayanan G <narayanan.gopalakrishnan@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33434 Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
2011-10-12dmaengine/ste_dma40: use writel_relaxed for lcxaPer Forlin
lcpa and lcla are written often and the cache_sync() overhead in writel is costly, especially for wlan where every single network packet (in RX mode) corresponds to a separate DMA transfer. ST-Ericsson Linux next: TESTED ST-Ericsson ID: 357764 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I8339704de95f2355d22681ac4bd542795770fa89 Signed-off-by: Per Forlin <per.forlin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33009 Reviewed-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: QABUILD Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
2011-10-11dma40: combine desc init functionsRabin Vincent
The desc init code can be shared between the mem and slave prep routines. Change-Id: I37de7699f6f0dbe44c12e4d9cadacaafb37a5ee0 Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33220 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-09-29Revert "dma40: combine desc init functions"Narayanan G
This patch is introducing a bug in width/maxburst. Hence, Will fix and update a new patch This reverts commit a6ea748b15c4932e17ebc516cf9a74f09ceb1d67. Change-Id: I6ea178f433e37f688aaa579788679a41ba5e8ca6 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32504 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
2011-09-28dma40: combine desc init functionsRabin Vincent
The desc init code can be shared between the mem and slave prep routines. Change-Id: I4567ec077535cc24b4ebe68f94e8e7e34394de23 Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32256 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: QATEST Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-09-26dma40: implement prep_memcpy as a wrapper around memcpy_sgRabin Vincent
To simplify the code. Change-Id: I960ce6b3cb670b906cca2be9856030f2231ce525 Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31935 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com>
2011-09-26dma40: remove unnecessary castsRabin Vincent
Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Change-Id: I473d8a99b84c6b77acfeb58e80ced8159e632699 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31930 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-09-26dma40: Resetting priority bit for logical channelsNarayanan
This patch will set the SSCFG/SDCFG bit[7] PRI only for physical channel requests with high priority. For logical channels, this bit will be zero. ST-Ericsson ID: 361435 ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: NA Change-Id: I1afb5c039387f9f9295c73e9dee92dc87bb15aeb Signed-off-by: Narayanan G <narayanan.gopalakrishnan@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30839 Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31929
2011-09-23dma40: fix DMA API usage for LLIsRabin Vincent
Map and unmap the LLIs and use dma_sync_single_for_device() appropriately instead of mapping and never unmapping them. Change-Id: Iabd78760a6adfa4b637e1db8943f6b93bc318a5f Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31863 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-09-23dma40: fix DMA API usage for LCLARabin Vincent
Map the buffer once and use dma_sync*() appropriately instead of mapping the buffer over and over without unmapping it. Change-Id: I4a16dc96409ba657b4994329e53668320393e0e0 Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31856 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-09-23dma40: use helpers for error functionsRabin Vincent
Almost every use of dev_err in this driver prints the function name. Abstract out wrappers to help with this and reduce code duplication. Change-Id: I7ba0ef93da329737aec777489c82907d9c58027a Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31853 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-09-23dma40: use helper for channel registers baseRabin Vincent
The register offset computation for accessing channel registers is copy/pasted in several places. Create a helper function to do it. Change-Id: If40e4cb06ef7f218edac5ab349a3e17d91010e1b Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31815 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-09-23dma40: remove unnecessary ALIGN()sRabin Vincent
ALIGN(x * y, y) == x * y ALIGN(aligned + x * y, y) == aligned + x * y Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Change-Id: I913881ee95c8ec2ca9b88fc9ba2b288df22c0be7 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31814 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-09-22dma40: Add support to use lcla area from esramNarayanan G
This patch provides an option of having the lcla in ESRAM instead of allocating it. The bool value (use_esram_lcla) in the stedma40_platform_data if set to true, then the lcla address would be taken from platform resources. This patch does not enable the feature, as the other dependencies related to keeping the esram34 regulator on, changes in mcde for releasing 8k from esram bank4 and the changes needed in cmdma have to be merged. ST-Ericsson ID: 362066 ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: NA Change-Id: I590751f732021c5f2f4da9b7d51ae5dc10087be7 Signed-off-by: Narayanan G <narayanan.gopalakrishnan@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31123 Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
2011-09-22dma40: make init function staticRabin Vincent
Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Change-Id: I4124016624c79babfa65f87d3c551568678c77a3 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31719 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com>
2011-09-22dma40: fix DMA_SG capability and channelsRabin Vincent
The DMA_SG cap is enabled on the wrong channel, and the pointers are repeatedly set incorrectly. Fix it and combine the ops settings to a common function. Change-Id: I93644620f54c8773405a54dbcfc7f2c59af73d00 Acked-by: Per Forlin <per.forlin@stericsson.com> 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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31683 Tested-by: Narayanan GOPALAKRISHNAN <narayanan.gopalakrishnan@stericsson.com>
2011-09-19dma40: provide support for new standard cyclic APIRabin Vincent
Change-Id: I58869efb9e77218ab05481cf8576959189e8611f Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
2011-09-19dma40: unconfigure on allocation failureRabin Vincent
Set the channel configured state to false on an allocation failure so that if the channel is later attempted to be allocated as a memcpy channel (i.e. no filter function to reconfigure it), it is correctly configured as memcpy instead of incorrectly using a left-over slave configuration. Change-Id: I021b39a45867a09ba0282ac370637f7b2dcf6190 Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
2011-09-19dma40: updateRabin Vincent
commit 7bb629e3f96864a04ee5e1feb6c1c50bf8e80ae9 Author: Rabin Vincent <rabin.vincent@stericsson.com> Date: Thu Aug 4 15:28:45 2011 +0530 dma40: allow fixed physical channel Allow logical channels to specify the physical channel they want to use. ST-Ericsson ID: 342919 commit 8d4b34d2de7b7a82311c883551ad5239f4a820bb Author: Rabin Vincent <rabin.vincent@stericsson.com> Date: Tue Jan 25 11:18:06 2011 +0100 dma40: remove "hardware link with previous jobs" code This link in hardware with previous jobs code is: - unused, no clients using or requiring this feature Remove it. This allows us to get rid of the channel pause in the submit_tx() routine. ST-Ericsson ID: 348184 commit ec216eae7aa6d7ba9755e95830632563185a9385 Author: Rabin Vincent <rabin.vincent@stericsson.com> Date: Thu May 5 11:29:24 2011 +0530 dma40: allow memory buswidth/burst to be configured Currently the runtime config implementation forces the memory side parameters to be the same as the peripheral side. Allow these to be different, and check for misconfiguration. ST-Ericsson ID: ER330353 commit f25304bdc62eddc38b45189b73ffce46639b4caa Author: Rabin Vincent <rabin.vincent@stericsson.com> Date: Wed Mar 2 15:02:56 2011 +0530 dma40: mark the correct channel as reserved Mark the channel number, and not the array index, as reserved. ST-Ericsson ID: ER326316 commit 8c763d54ae24ba62b79ec860533859d653386285 Author: Rabin Vincent <rabin.vincent@stericsson.com> Date: Tue Jan 18 14:22:48 2011 +0530 dma40: fix races in channel stopping When dma40_terminate_all() is called for a logical channel, there exists a potential race where the underlying physical channel can be stopped even if it has other active logical channels. This is because chan_has_events() and config_set_event() are not protected by appropriate locks. Fix this by moving chan event manipulation under the phy channel lock, and making STOP do a SUSPEND_REQ internally. ST-Ericsson ID: AP322557 commit 843b0b02f1c9cce4746a3c98f558e25ad7c6e82e Author: Rabin Vincent <rabin.vincent@stericsson.com> Date: Thu Feb 3 09:06:02 2011 +0530 dma40: clear LNK on channel startup Otherwise if a previously physical channel is used as a logical channel, the LNK may have old values which affect the operation of the logical channel since the LNK register has different semantics between physical and logical channels. ST-Ericsson ID: AP322557 Change-Id: I1ed20b202a4a286872c3b405fd487d190a008fcb
2011-09-19dmaengine/ste_dma40: use AMBA PrimeCell helper macrosLinus Walleij
The DMA40 is not a PrimeCell from ARM, but it still use the same ID registers. So let's utilize the existing macros in the PrimeCell header to identify manufacturer and revision of the IP block instead of reinventing the wheel. Cc: Robert Marklund <robert.marklund@stericsson.com> Cc: Per Forlin <per.forlin@linaro.org> Cc: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Change-Id: I2f6fbab5d572ed6655daa16aa07d0a524b68ed26 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25894 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-09-19dmaengine/ste_dma40: allow memory buswidth/burst to be configuredRabin Vincent
Currently the runtime config implementation forces the memory side parameters to be the same as the peripheral side. Allow these to be different, and check for misconfiguration. Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com> Tested-by: Stefan Nilsson <stefan.xk.nilsson@stericsson.com> Reviewed-by: Per Forlin <per.forlin@stericsson.com> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Robert Marklund <robert.marklund@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Change-Id: If3c1c91c8efa54ebbadb98f0c70532413514788c Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25893 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-09-19kernel-doc: fix kernel-doc warningsom prakash
fix the potential kernel-doc warnings ST-Ericsson Linux next: - ST-Ericsson ID: 327425 ST-Ericsson FOSS-OUT ID: Trivial Signed-off-by: om prakash <omprakash.pal@stericsson.com> Change-Id: Ibaa302ddbaa8e223b81bd047fceaf7c3b97af491 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23345 Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Reviewed-by: QATEST Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
2011-09-19dma: Make the cycic alloc NOWAITRobert Marklund
ST-Ericsson Linux next: OK ST-Ericsson ID: 342253 ST-Ericsson FOSS-OUT ID: Trivial Signed-off-by: Robert Marklund <robert.marklund@stericsson.com> Change-Id: I7e792ed1d9d9c04d3af598caf30f1c26744c1183 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/24723 Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-07-21Revert "Merge remote-tracking branch 'arm-soc/for-next' into linaro-3.0"Nicolas Pitre
This reverts commit c7e0c8535d73f8c5bf760926a2bd71c9840cf2ef, reversing changes made to dfee09c8acf18e84fe197bb5d821d1e4e02d020f. John Stultz reports that Panda doesn't boot anymore and 'git bisect' indicated the merge commit itself as the culprit. The resulting kernel log is: [ 1.734802] OMAP DSS rev 4.0 [ 1.740417] omap_hwmod: dss_core: _wait_target_disable failed [ 1.746429] omap_device: omapdss_dss.-1: new worst case deactivate latency 01 [ 1.755035] omapdss DISPC error: can't get dss_clk [ 1.760101] omapdss_dispc: probe of omapdss_dispc failed with error -2 [ 1.767333] omapdss HDMI error: can't get hdmi_clk [ 1.772399] omapdss_hdmi: probe of omapdss_hdmi failed with error -2 [ 1.780273] ------------[ cut here ]------------ [ 1.785125] WARNING: at drivers/video/omap2/dss/dispc.c:553dispc_runtime_ge) [ 1.793640] Modules linked in: [ 1.796905] ---[ end trace 6fcb132ac310d004 ]--- [ 1.801757] Unable to handle kernel NULL pointer dereference at virtualaddr0 [...] Revert it so a later version of the arm-soc merge result can be used instead.
2011-07-07dmaengine: imx-sdma: pass sdma firmware name via platform dataShawn Guo
It is not good to have cpu_name and to_version encoded into sdma firmware name as variables. For example, there are three TOs of imx51 soc, the sdma script never changes since TO1, which means all three TOs of imx51 uses TO1 version of sdma script. But we have to prepare three identical firmwares, sdma-imx51-to1.bin sdma-imx51-to2.bin and sdma-imx51-to3.bin, to have the kernel capable of running on all three TOs. The patch removes cpu_name and to_version from sdma platform data, and instead uses fw_name to pass the firmware name, so that we can pass the TO version where it's relevant and skip it where only one firmware exists. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-07ARM i.MX dma: Fix burstsize settingsSascha Hauer
dmaengine expects the maxburst parameter in words, not bytes. The imxdma driver and its users do this wrong. Fix this. As a side note the imx-pcm-dma-mx2 driver was 'fixed' to work with imx-dma. This broke the driver with imx-sdma support which correctly takes the maxburst parameter in words. This patch puts the sdma based sound back to work. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-06-14dmaengine: shdma: SH_DMAC_MAX_CHANNELS message fixMagnus Damm
Fix the recently added SH_DMAC_MAX_CHANNELS handling code in 300e5f9 dmaengine: shdma: Fix SH_DMAC_MAX_CHANNELS handling Without this fix the shdma driver outputs silly messages in case SH_DMAC_MAX_CHANNELS happens to match the platform data: sh-dma-engine sh-dma-engine.0: Attempting to register 20 DMA channels when a max imum of 20 are supported. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-02dmaengine: shdma: fix a regression: initialise DMA channels for memcpyGuennadi Liakhovetski
A recent patch has introduced a regression, where repeating a memcpy DMA test with shdma module unloading between them skips the DMA channel configuration. Fix this regression by always configuring the channel during its allocation. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-31dmaengine: shdma: Fix up fallout from runtime PM changes.Paul Mundt
The runtime PM changes introduce sh_dmae_rst() wrapping via the runtime_resume helper, depending on dev_get_drvdata() to fetch the platform data needed for the DMAOR initialization default at a time where drvdata hasn't yet been established by the probe path, resulting in general probe misery: Unable to handle kernel NULL pointer dereference at virtual address 000000c4 pc = 8025adee *pde = 00000000 Oops: 0000 [#1] Modules linked in: Pid : 1, Comm: swapper CPU : 0 Not tainted (3.0.0-rc1-00012-g9436b4a-dirty #1456) PC is at sh_dmae_rst+0x28/0x86 PR is at sh_dmae_rst+0x22/0x86 PC : 8025adee SP : 9e803d10 SR : 400080f1 TEA : 000000c4 R0 : 000000c4 R1 : 0000fff8 R2 : 00000000 R3 : 00000040 R4 : 000000f0 R5 : 00000000 R6 : 00000000 R7 : 804f184c R8 : 00000000 R9 : 804dd0e8 R10 : 80283204 R11 : ffffffda R12 : 000000a0 R13 : 804dd18c R14 : 9e803d10 MACH: 00000000 MACL: 00008f20 GBR : 00000000 PR : 8025ade8 Call trace: [<8025ae70>] sh_dmae_runtime_resume+0x24/0x34 [<80283238>] pm_generic_runtime_resume+0x34/0x3c [<80283370>] rpm_callback+0x4a/0x7e [<80283efc>] rpm_resume+0x240/0x384 [<80283f54>] rpm_resume+0x298/0x384 [<8028428c>] __pm_runtime_resume+0x44/0x7c [<8038a358>] __ioremap_caller+0x0/0xec [<80284296>] __pm_runtime_resume+0x4e/0x7c [<8038a358>] __ioremap_caller+0x0/0xec [<80666254>] sh_dmae_probe+0x180/0x6a0 [<802803ae>] platform_drv_probe+0x26/0x2e Fix up the ordering accordingly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-28Merge branch 'next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (33 commits) x86: poll waiting for I/OAT DMA channel status maintainers: add dma engine tree details dmaengine: add TODO items for future work on dma drivers dmaengine: Add API documentation for slave dma usage dmaengine/dw_dmac: Update maintainer-ship dmaengine: move link order dmaengine/dw_dmac: implement pause and resume in dwc_control dmaengine/dw_dmac: Replace spin_lock* with irqsave variants and enable submission from callback dmaengine/dw_dmac: Divide one sg to many desc, if sg len is greater than DWC_MAX_COUNT dmaengine/dw_dmac: set residue as total len in dwc_tx_status if status is !DMA_SUCCESS dmaengine/dw_dmac: don't call callback routine in case dmaengine_terminate_all() is called dmaengine: at_hdmac: pause: no need to wait for FIFO empty pch_dma: modify pci device table definition pch_dma: Support new device ML7223 IOH pch_dma: Support I2S for ML7213 IOH pch_dma: Fix DMA setting issue pch_dma: modify for checkpatch pch_dma: fix dma direction issue for ML7213 IOH video-in dmaengine: at_hdmac: use descriptor chaining help function dmaengine: at_hdmac: implement pause and resume in atc_control ... Fix up trivial conflict in drivers/dma/dw_dmac.c