07 May, 2014
1 commit
-
There is no need to use *_noirq version of suspend and resume PM callbacks. The
suspend_late / resume_early suit better (it was discussed in [1]) and in future
could be used for runtime PM support.[1] http://www.spinics.net/lists/kernel/msg1650974.html
Signed-off-by: Andy Shevchenko
Signed-off-by: Vinod Koul
03 May, 2014
10 commits
-
Fix mpc_dma_probe() error path and mpc_dma_remove(): manually free IRQs and
dispose IRQ mappings before devm_* takes care of other resources.
Moreover replace devm_request_irq() with request_irq() since there is no need
to use it because the original code always frees IRQ manually with
devm_free_irq(). Replace devm_free_irq() with free_irq() accordingly.Signed-off-by: Alexander Popov
Signed-off-by: Vinod Koul -
MPC512x and MPC8308 have similar DMA controllers, but are independent SoCs.
DMA controller driver should have separate 'compatible' values for these SoCs.Signed-off-by: Alexander Popov
Signed-off-by: Vinod Koul -
Concentrate the specific code for MPC8308 in the 'if' branch
and handle MPC512x in the 'else' branch.
This modification only reorders instructions but doesn't change behaviour.Signed-off-by: Alexander Popov
Acked-by: Anatolij Gustschin
Signed-off-by: Vinod Koul -
These functions will be modified in the next patch in the series. By moving the
function in a patch separate from the changes, it will make review easier.Signed-off-by: Hongbo Zhang
Signed-off-by: Qiang Liu
Signed-off-by: Vinod Koul -
There are several places where descriptors are freed using identical code.
This patch puts this code into a function to reduce code duplication.Signed-off-by: Hongbo Zhang
Signed-off-by: Qiang Liu
Signed-off-by: Vinod Koul -
Delete attribute DMA_INTERRUPT because fsldma doesn't support this function,
exception will be thrown if talitos is used to offload xor at the same time.Signed-off-by: Hongbo Zhang
Signed-off-by: Qiang Liu
Signed-off-by: Vinod Koul -
Methods of accessing DMA controller registers are inconsistent, some registers
are accessed by DMA_IN/OUT directly, while others are accessed by functions
get/set_* which are wrappers of DMA_IN/OUT, and even for the BCR register, it
is read by get_bcr but written by DMA_OUT.
This patch unifies the inconsistent methods, all registers are accessed by
get/set_* now.Signed-off-by: Hongbo Zhang
Signed-off-by: Vinod Koul -
Some codes are calling chan_dbg with FSL_DMA_LD_DEBUG surrounded, it is really
unnecessary to use such a macro because chan_dbg is a wrapper of dev_dbg, we do
have corresponding DEBUG macro to switch on/off dev_dbg, and most of the other
codes are also calling chan_dbg directly without using FSL_DMA_LD_DEBUG.Signed-off-by: Hongbo Zhang
Signed-off-by: Vinod Koul -
This patch add cyclic transfer support and enables dmaengine_prep_dma_cyclic()
Signed-off-by: Kuninori Morimoto
[reflown changelog for readablity]
Signed-off-by: Vinod Koul -
Current shdma is using "last" which indicates last desc which needs to have
callback function. But that desc's chunks is always 1, we can use it as finderSigned-off-by: Kuninori Morimoto
[reflown changelog for readablity]
Signed-off-by: Vinod Koul
02 May, 2014
3 commits
-
Use sizeof(*var) instead of sizeof(type) when calling devm_k*alloc().
This avoids using the wrong type as was done to allocate the physical
channels array.Signed-off-by: Laurent Pinchart
Signed-off-by: Vinod Koul -
As the physical channel and virtual channel point to each other,
pchan->phy->vchan is always equal to pchan. Simplify the code
accordingly.Signed-off-by: Laurent Pinchart
Signed-off-by: Vinod Koul -
The property is optional and defaults to 32. Document it as such.
Cc: devicetree@vger.kernel.org
Signed-off-by: Laurent Pinchart
Signed-off-by: Vinod Koul
30 Apr, 2014
8 commits
-
edma param struct is now within an edma_pset struct introduced in Thomas
Gleixner's edma tx status series. Update memcpy function for the same.Cc: Thomas Gleixner
Signed-off-by: Joel Fernandes
Signed-off-by: Vinod Koul -
The granular residue accounting code uses certain variables specifically
for residue accounting. Document these in the structure declaration.
Also move around some elements and group them together.Cc: Thomas Gleixner
Signed-off-by: Joel Fernandes
Signed-off-by: Vinod Koul -
The first slot in the ParamRAM of EDMA holds the current active
subtransfer. Depending on the direction we read either the source or
the destination address from there. In the internal psets we have the
address of the buffer(s).In the cyclic case we only use the internal pset[0] which holds the
start address of the circular buffer and calculate the remaining room
to the end of the buffer.In the SG case we read the current address and compare it to the
internal psets address and length.- If the current address is outside of this range, the pset has been
processed already and we mark it done, update the residue_stat value
and process the next set. That avoids that we need to walk all
processed psets for every invocation of tx_status.- If its inside the range we know that we look at the current active
set and stop the walk.- In case of intermediate transfers we update the stats in the
interrupt callback function before starting the next batch of
transfers. The tx_status callback and the interrupt callback are
serialized via vchan.lock.Signed-off-by: Thomas Gleixner
[joelf@ti.com: Hunk #2 in original patch manually applied]
Signed-off-by: Joel Fernandes
Signed-off-by: Vinod Koul -
As Joel pointed out, edma_read_position() uses memcpy_fromio() to read
the parameter ram. That's not synchronized with the internal update as
it does a byte by byte copy. We need to do a 32bit read to get a
consistent value.Further reading destination and source is pointless. In DEV_TO_MEM
transfers we are only interested in the destination, in MEM_TO_DEV we
care about the source. In MEM_TO_MEM it really does not matter which
one you read.Simple solution: Remove the pointers, select dest/source via a bool
and return the read value.Remove the export of this function while at it. The only potential
user is the dmaengine and that's always builtin.Signed-off-by: Thomas Gleixner
Acked-by: Sekhar Nori
Signed-off-by: Joel Fernandes
Signed-off-by: Vinod Koul -
For granular accounting we need to store the direction and the
information for the individual psets:- source or destination address, depending on direction
- lengthSigned-off-by: Thomas Gleixner
Signed-off-by: Joel Fernandes
Signed-off-by: Vinod Koul -
Preparatory patch to support finer grained accounting.
Move the edma_params array out of edma_desc so we can add further per
pset data to it.Signed-off-by: Thomas Gleixner
[joelf@ti.com: Fixed up hunk #3 in original patch to apply]
Signed-off-by: Joel Fernandes
Signed-off-by: Vinod Koul -
It's likely that the caller investigates the status of a currently
active descriptor. Make that simple check first and only rumage in the
vchan list if that fails.Signed-off-by: Thomas Gleixner
Signed-off-by: Joel Fernandes
Signed-off-by: Vinod Koul -
The residue reporting in edma_tx_status() is just broken. It blindly
walks the psets and recalculates the lenght of the transfer from the
hardware parameters. For cyclic transfers it adds the link pset, which
results in interestingly large residues. For non-cyclic it adds the
dummy pset, which is stupid as well.Aside of that it's silly to walk through the pset params when the per
descriptor residue is known at the point of creating it.Store the information in edma_desc and use it.
Signed-off-by: Thomas Gleixner
Signed-off-by: Joel Fernandes
Signed-off-by: Vinod Koul
29 Apr, 2014
1 commit
-
It helps to identify issues if we have some information regarding to the
channel which the event is associated.Signed-off-by: Peter Ujfalusi
Acked-by: Joel Fernandes
Signed-off-by: Vinod Koul
23 Apr, 2014
11 commits
-
The vchan lock in edma_callback is acquired in hard interrupt context. As
interrupts are already disabled, there's no point in save/restoring interrupt
mask bit or cpsr flags.Get rid of flags local variable and use spin_lock instead of spin_lock_irqsave.
Signed-off-by: Joel Fernandes
Signed-off-by: Vinod Koul -
We add DMA memcpy support to EDMA driver. Successful tests performed using
dmatest kernel module. Copy alignment is set to DMA_SLAVE_BUSWIDTH_4_BYTES and
users must ensure length is aligned so that copy is performed fully.Signed-off-by: Joel Fernandes
Signed-off-by: Vinod Koul -
In case of not supported direction it is better to print the direction also.
It is unlikely, but in such an event it helps with the debugging.Signed-off-by: Peter Ujfalusi
Acked-by: Joel Fernandes
Reviewed-and-Tested-by: Joel Fernandes
Signed-off-by: Vinod Koul -
prep_slave_sg and prep_dma_cyclic callbacks have mostly same failure cases
with the same texts printed in case we hit them. It helps when debugging if
we know exactly which callback generated the errors.
At the same time change the debug level for descriptor allocation failure
from dbg to err since all other error cases are dev_err and this failure is
similarly fatal as the other ones.Signed-off-by: Peter Ujfalusi
Acked-by: Joel Fernandes
Reviewed-and-Tested-by: Joel Fernandes
Signed-off-by: Vinod Koul -
With the callback implemented omap-dma can provide information to client
drivers regarding to supported address widths, directions, residue
granularity, etc.Signed-off-by: Peter Ujfalusi
Acked-by: Joel Fernandes
Reviewed-and-Tested-by: Joel Fernandes
Signed-off-by: Vinod Koul -
Do not print the paRAM information when verbose debugging is not asked and
also reduce the number of lines printed in edma_prep_dma_cyclic()Signed-off-by: Peter Ujfalusi
Acked-by: Joel Fernandes
Reviewed-and-Tested-by: Joel Fernandes
Signed-off-by: Vinod Koul -
Indicate that the edma dmaengine driver has support for cyclic mode.
Signed-off-by: Peter Ujfalusi
Acked-by: Joel Fernandes
Reviewed-and-Tested-by: Joel Fernandes
Signed-off-by: Vinod Koul -
Pause/Resume can be used by the audio stack when the stream is paused/resumed
The edma platform code has support for this and the legacy audio stack used
this.Signed-off-by: Peter Ujfalusi
Acked-by: Joel Fernandes
Reviewed-and-Tested-by: Joel Fernandes
Signed-off-by: Vinod Koul -
When clients asks for maxburst = 0 it is basically the same case as if they
were asking for maxburst = 1 since in both case ASYNC need to be used and
the eDMA is expected to write/read one word per DMA request.Signed-off-by: Peter Ujfalusi
Acked-by: Joel Fernandes
Reviewed-and-Tested-by: Joel Fernandes
Signed-off-by: Vinod Koul -
For later use save the number of queues available for the CC.
Signed-off-by: Peter Ujfalusi
Acked-by: Joel Fernandes
Reviewed-and-Tested-by: Joel Fernandes
Signed-off-by: Vinod Koul -
The edmacc_param struct should follow the layout of the paRAM area in the
HW. Be explicit on the size of the fields (u32) and also mark the struct
as packed to avoid any padding on non 32bit architectures.Signed-off-by: Peter Ujfalusi
Acked-by: Joel Fernandes
Reviewed-and-Tested-by: Joel Fernandes
Signed-off-by: Vinod Koul
21 Apr, 2014
4 commits
-
Pull slave-dmaengine fixes from Vinod Koul:
"Back from long weekend here in India and now the time to send fixes
for slave dmaengine.
- Dan's fix of sirf xlate code
- Jean's fix for timberland
- edma fixes by Sekhar for SG handling and Yuan for changing init
call"* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
dma: fix eDMA driver as a subsys_initcall
dmaengine: sirf: off by one in of_dma_sirfsoc_xlate()
platform: Fix timberdale dependencies
dma: edma: fix incorrect SG list handling -
Pull iommu fixes from Joerg Roedel:
"Fixes for regressions:- fix wrong IOMMU enumeration causing some SCSI device drivers
initialization failures
- ARM-SMMU fixes for a panic condition and a wrong return value"* tag 'iommu-fixes-v3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
iommu/arm-smmu: fix panic in arm_smmu_alloc_init_pte
iommu/arm-smmu: Return 0 on unmap failure
iommu/vt-d: fix bug in matching PCI devices with DRHD/RMRR descriptors
iommu/vt-d: Fix get_domain_for_dev() handling of upstream PCIe bridges
iommu/vt-d: fix memory leakage caused by commit ea8ea46 -
Pull perf tooling fixes from Ingo Molnar:
"Three small tooling fixes"* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf tools: Improve error reporting
perf tools: Adjust symbols in VDSO
perf kvm: Fix 'Min time' counting in report command
20 Apr, 2014
2 commits
-
…it/jolsa/perf into perf/urgent
Pull perf/urgent fixes from Jiri Olsa:
User visible changes:
* Adjust symbols in VDSO to properly resolve its function names (Vladimir Nikulichev)
* Improve error reporting for record session failure (Adrien BAK)
* Fix 'Min time' counting in report command (Alexander Yarygin)
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org> -
In the current version, when using perf record, if something goes
wrong in tools/perf/builtin-record.c:375
session = perf_session__new(file, false, NULL);The error message:
"Not enough memory for reading per file header"is issued. This error message seems to be outdated and is not very
helpful. This patch proposes to replace this error message by
"Perf session creation failed"I believe this issue has been brought to lkml:
https://lkml.org/lkml/2014/2/24/458
although this patch only tackles a (small) part of the issue.Additionnaly, this patch improves error reporting in
tools/perf/util/data.c open_file_write.Currently, if the call to open fails, the user is unaware of it.
This patch logs the error, before returning the error code to
the caller.Reported-by: Will Deacon
Signed-off-by: Adrien BAK
Link: http://lkml.kernel.org/r/1397786443.3093.4.camel@beast
[ Reorganize the changelog into paragraphs ]
[ Added empty line after fd declaration in open_file_write ]
Signed-off-by: Jiri Olsa