ARM: mvebu: use hardware I/O coherency also for PCI devices
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 13 May 2014 16:04:30 +0000 (18:04 +0200)
committerJason Cooper <jason@lakedaemon.net>
Fri, 16 May 2014 05:34:24 +0000 (05:34 +0000)
commitb0063aad5dd86308c9b9c433ac8f3ab5b49aab1b
tree1ca398f9819bc449bd1a0b48d0bbb3ba851c191f
parent9f0affcf3e21fc56d8bce625bb3d5800b7a7d284
ARM: mvebu: use hardware I/O coherency also for PCI devices

Since the beginning of the introduction of hardware I/O coherency
support for Armada 370 and Armada XP, the special DMA operations
should have applied to all DMA capable devices. Unfortunately, while
the original code properly took into account platform devices, it
didn't take into account PCI devices, which can also be DMA masters.

This commit fixes that by registering a bus notifier on pci_bus_type,
to register our custom DMA operations, like is already done for
platform devices. While doing this, we also rename
mvebu_hwcc_platform_notifier() to mvebu_hwcc_notifier() and
mvebu_hwcc_platform_nb to mvebu_hwcc_nb because they are no longer
specific to platform devices.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1399997070-11434-1-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/mach-mvebu/coherency.c