diff options
author | Daniel Drake <drake@endlessm.com> | 2019-04-29 08:14:26 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2019-05-06 12:55:39 +0300 |
commit | c671b6dede27f8a73b0f3554630ba0ed436f357d (patch) | |
tree | 48a138ca818ecd34460f82402b0c29ec6ea5d77a /include/linux/alcor_pci.h | |
parent | f19337d55fac5db6d703905077c5e251c87c37d3 (diff) | |
download | linux-c671b6dede27f8a73b0f3554630ba0ed436f357d.tar.xz |
mmc: alcor: work with multiple-entry sglists
DMA on this hardware is limited to dealing with a 4096 bytes at a
time. Previously, the driver was set up accordingly to request single-page
DMA buffers, however that had the effect of generating a large number
of small MMC requests for data I/O.
Improve the driver to accept multi-entry scatter-gather lists. The size of
each entry is already capped to 4096 bytes (AU6601_MAX_DMA_BLOCK_SIZE),
matching the hardware requirements. Existing driver code already iterates
through remaining sglist entries after each DMA transfer is complete.
Also add some comments to help clarify the situation, and clear up
some of the confusion I had regarding DMA vs PIO.
Testing with dd, this increases write performance from 2mb/sec to
10mb/sec, and increases read performance from 4mb/sec to 14mb/sec.
Signed-off-by: Daniel Drake <drake@endlessm.com>
Link: http://lkml.kernel.org/r/CAD8Lp47JYdZzbV9F+asNwvSfLF_po_J7ir6R_Vb-Dab21_=Krw@mail.gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'include/linux/alcor_pci.h')
-rw-r--r-- | include/linux/alcor_pci.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/alcor_pci.h b/include/linux/alcor_pci.h index da973e8a2da8..4416df597526 100644 --- a/include/linux/alcor_pci.h +++ b/include/linux/alcor_pci.h @@ -23,7 +23,7 @@ #define AU6601_BASE_CLOCK 31000000 #define AU6601_MIN_CLOCK 150000 #define AU6601_MAX_CLOCK 208000000 -#define AU6601_MAX_DMA_SEGMENTS 1 +#define AU6601_MAX_DMA_SEGMENTS 64 #define AU6601_MAX_PIO_SEGMENTS 1 #define AU6601_MAX_DMA_BLOCK_SIZE 0x1000 #define AU6601_MAX_PIO_BLOCK_SIZE 0x200 |