diff options
author | Martin Sperl <kernel@martin.sperl.org> | 2015-05-10 20:47:28 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-05-11 19:24:27 +0100 |
commit | 3ecd37edaa2a6ba3246e2c35714be9316b1087fe (patch) | |
tree | 98124c0cdb4f3f541de9dbc799dee36cba1cbc8b /Documentation/ko_KR | |
parent | e0d58cdcaedd90e42162772f9b642e4ee680dd03 (diff) | |
download | linux-3ecd37edaa2a6ba3246e2c35714be9316b1087fe.tar.bz2 |
spi: bcm2835: enable dma modes for transfers meeting certain conditions
Conditions per spi_transfer are:
* transfer.len >= 96 bytes (to avoid mapping overhead costs)
* transfer.len < 65536 bytes (limitaion by spi-hw block - could get extended)
* an individual scatter/gather transfer length must be a multiple of 4
for anything but the last transfer - spi-hw block limit.
(some shortcut has been taken in can_dma to avoid unnecessary mapping of
pages which, for which there is a chance that there is a split with a
transfer length not a multiple of 4)
If it becomes a necessity these restrictions can get removed by additional
code.
Note that this patch requires a patch to dma-bcm2835.c by Noralf to
enable scatter-gather mode inside the dmaengine, which has not been
merged yet.
That is why no patch to arch/arm/boot/dts/bcm2835.dtsi is included - the
code works as before without dma when tx/rx are not set, but it writes
a message warning about dma not used:
spi-bcm2835 20204000.spi: no tx-dma configuration found - not using dma mode
To enable dma-mode add the following lines to the device-tree:
dmas = <&dma 6>, <&dma 7>;
dma-names = "tx", "rx";
Tested-by: Noralf Trønnes <noralf@tronnes.org> (private communication)
Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/ko_KR')
0 files changed, 0 insertions, 0 deletions