Commit Message

Since a number of powerpc chips are SoCs we end up having dma-able
devices that are registered as platform or of_platform devices. We need
to hook the archdata to setup proper dma_ops for these devices.
Rather than having to add a bus_notify to each platform we add a default
one at the highest priority (called first) to set the default dma_ops for
of_platform and platform devices to dma_direct_ops. This allows platform
code to override the ops by providing their own notifier call back.
In the future to enable >4G DMA support on ppc32 we can hook swiotlb ops.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
* Use bus notifiers instead of platform_notify
arch/powerpc/kernel/setup-common.c | 36 +++++++++++++++++++++++++++++
arch/powerpc/platforms/cell/qpace_setup.c | 13 ----------
2 files changed, 36 insertions(+), 13 deletions(-)

Comments

* Kumar Gala | 2009-03-19 08:40:51 [-0500]:
>Since a number of powerpc chips are SoCs we end up having dma-able>devices that are registered as platform or of_platform devices. We need>to hook the archdata to setup proper dma_ops for these devices.>>Rather than having to add a bus_notify to each platform we add a default>one at the highest priority (called first) to set the default dma_ops for>of_platform and platform devices to dma_direct_ops. This allows platform>code to override the ops by providing their own notifier call back.>>In the future to enable >4G DMA support on ppc32 we can hook swiotlb ops.>>Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Benjamin Krill <ben@codiert.org>
Tested on QPACE node card.