History log of /arch/microblaze/kernel/dma.c
Revision Date Author Comments
6b3f246e398cc9afc61e3a65a116fabb6d5ca7aa 16-May-2014 Michal Simek <michal.simek@xilinx.com> microblaze: Do not setup empty unmap_sg function

No reason to setup empty function. Core is checking
if this function should be called or not.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
193bca5934db1ca1d0ffcedf551030ff5556a07c 16-May-2014 Michal Simek <michal.simek@xilinx.com> microblaze: Cleanup PCI_DRAM_OFFSET handling

PCI_DRAM_OFFSET/pci_dram_offset is 0 all the time and there
is no difference for PCI and !PCI cases.
Also remove the whole code which setup archdata.dma_data
which is completely unused.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6bd55f0bbaebb79b39e147aa864401fd0c94db82 27-Dec-2012 Michal Simek <monstr@monstr.eu> microblaze: Fix coding style issues

Fix coding style issues reported by checkpatch.pl.

Signed-off-by: Michal Simek <monstr@monstr.eu>
988624ec13e87680eb3eaa0f1e921fedd48b4ac4 27-Mar-2012 Andrzej Pietrasiewicz <andrzej.p@samsung.com> Microblaze: adapt for dma_map_ops changes

Adapt core Microblaze architecture code for dma_map_ops changes: replace
alloc/free_coherent with generic alloc/free methods.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
[fixed coding style issues]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
66421a648d11c60e75d1ec4876f0748341598f5d 22-Sep-2011 Paul Gortmaker <paul.gortmaker@windriver.com> microblaze: Add export.h to arch/microblaze files as required

For access to the EXPORT_SYMBOL variants and THIS_MODULE macros.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
0fb2a6f283f25731217841f961cefa0a19bd449d 11-Sep-2011 Eli Billauer <eli.billauer@gmail.com> microblaze: Added DMA sync operations

Added support gor dma_direct_sync_single_for_*() and dma_direct_sync_sg_for_*()

Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
cf560c1801e518abfe0951008c4f2df4bbb3f5e8 11-Sep-2011 Eli Billauer <eli.billauer@gmail.com> microblaze: Moved __dma_sync() to dma-mapping.h

__dma_sync_page() was replaced by __dma_sync(), and parameters of calls to
the new function were adjusted to match __dma_sync()'s format.

Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
5323c48b0cfd98d93eb29907450ca48d009545ad 10-Feb-2011 Michal Simek <monstr@monstr.eu> microblaze: Add support for DMA_BIDIRECTIONAL

CDMA requires DMA_BIDIRECTIONAL option.

Signed-off-by: Michal Simek <monstr@monstr.eu>
fcdcddbcbbd39a3363bd48414bfe44553b6d698a 08-Jun-2010 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> microblaze: Fix sg_dma_len() regression

The commit "asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len()"
18e98307de0d746cb0845ebf66535ce2184c25a2 broke microblaze compilation.

dma_direct_map_sg() sets sg->dma_length, however microblaze doesn't
set NEED_SG_DMA_LENGTH so scatterlist strcutres doesn't include
dma_length.

sg->dma_length is always equal to sg->length on microblaze. So we
don't need to set set dma_length, that is, microblaze can simply use
sg->length.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Michal Simek <monstr@monstr.eu>
f1525765fb9c432f5dc5d0d18102fbe9980a14ae 10-Apr-2010 Michal Simek <monstr@monstr.eu> microblaze: Fix consistent code

This patch fix consistent code which had problems with consistent_free
function.
I am not sure if we need to call flush_tlb_all after it but it keeps
tlbs synced.
I added noMMU and MMU version together.

Uncached shadow feature is not tested.

Signed-off-by: Michal Simek <monstr@monstr.eu>
78ebfa884bcef125464399f8d1cb05937bfeb6e1 23-Mar-2010 Michal Simek <monstr@monstr.eu> microblaze: Adding likely macros

On the base on GCOV analytics is helpful to add likely/unlikely
macros.

Signed-off-by: Michal Simek <monstr@monstr.eu>
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
1be53e084a5bd8f59850348e1066d25aa0200031 11-Mar-2010 Michal Simek <monstr@monstr.eu> microblaze: Fix dma alloc and free coherent dma functions

We have to use consistent code to be able to do coherent dma
function. In consistent code is used cache inhibit page mapping.
Xilinx reported that there is bug in Microblaze for WB and
d-cache_always use option. Microblaze 7.30.a should be first version
where is this bug removed.

Signed-off-by: Michal Simek <monstr@monstr.eu>
dcbae4be907488df5e1cc8a89b7df1a0565c257c 09-Feb-2010 Michal Simek <monstr@monstr.eu> microblaze: Preliminary support for dma drivers

I found several problems for ll_temac driver and on system with WB.
This early fix should fix it. I will clean this patch before I will add
it to mainline

Signed-off-by: Michal Simek <monstr@monstr.eu>
d79f3b06a9e40b382bd5d5ae8dea9b3210eda9ce 08-Feb-2010 Michal Simek <monstr@monstr.eu> microblaze: Preliminary support for dma drivers

I found several problems for ll_temac driver and on system with WB.
This early fix should fix it. I will clean this patch before I will add
it to mainline

Signed-off-by: Michal Simek <monstr@monstr.eu>
2549edd353196d7de9c18e08146d7a8836f97235 20-Jan-2010 Michal Simek <monstr@monstr.eu> microblaze: Implement __dma_sync_page

There is necessary to do some cache handling for dma operations.

Signed-off-by: Michal Simek <monstr@monstr.eu>
ccfe27d7000668b02d10fc3e06aa49e3e3603162 14-Jan-2010 Michal Simek <monstr@monstr.eu> microblaze: Support DMA

Add DMA support for Microblaze. There are some part of this new feature:
1. Basic DMA support
2. Enable DMA debug option
3. Setup notifier

Ad 1. dma-mapping come from powerpc and x86 version and it is based on
generic dma-mapping-common.h

Ad 2. DMA support debug features which is used in generic file.
For more information please look at Documentation/DMA-API.txt

Ad 3. notifier is very important to setup dma_ops. Without this part
for example ll_temac driver failed because there are no setup dma operations.

Signed-off-by: Michal Simek <monstr@monstr.eu>