summaryrefslogtreecommitdiffstats
path: root/arch/mips/loongson1
diff options
context:
space:
mode:
authorHuacai Chen <chenhc@lemote.com>2014-03-21 11:44:06 +0100
committerRalf Baechle <ralf@linux-mips.org>2014-03-31 18:17:12 +0200
commit1299b0e05e106f621fff1504df5251f2a678097e (patch)
treecc73f2aee3497afa11142cc397e8f702164a06aa /arch/mips/loongson1
parentMIPS: Loongson 3: Add serial port support (diff)
downloadlinux-1299b0e05e106f621fff1504df5251f2a678097e.tar.xz
linux-1299b0e05e106f621fff1504df5251f2a678097e.zip
MIPS: Loongson: Add swiotlb to support All-Memory DMA
Loongson doesn't support DMA address above 4GB traditionally. If memory is more than 4GB, CONFIG_SWIOTLB and ZONE_DMA32 should be selected. In this way, DMA pages are allocated below 4GB preferably. However, if low memory is not enough, high pages are allocated and swiotlb is used for bouncing. Moreover, we provide a platform-specific dma_map_ops::set_dma_mask() to set a device's dma_mask and coherent_dma_mask. We use these masks to distinguishes an allocated page can be used for DMA directly, or need swiotlb to bounce. Recently, we found that 32-bit DMA isn't a hardware bug, but a hardware configuration issue. So, latest firmware has enable the DMA support as high as 40-bit. To support all-memory DMA for all devices (besides the Loongson platform limit, there are still some devices have their own DMA32 limit), and also to be compatible with old firmware, we keep use swiotlb. Signed-off-by: Huacai Chen <chenhc@lemote.com> Signed-off-by: Hongliang Tao <taohl@lemote.com> Signed-off-by: Hua Yan <yanh@lemote.com> Tested-by: Alex Smith <alex.smith@imgtec.com> Reviewed-by: Alex Smith <alex.smith@imgtec.com> Cc: John Crispin <john@phrozen.org> Cc: Steven J. Hill <Steven.Hill@imgtec.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Patchwork: https://patchwork.linux-mips.org/patch/6636 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/loongson1')
0 files changed, 0 insertions, 0 deletions