aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/ps3/system-bus.c
diff options
context:
space:
mode:
authorMark Nelson <markn@au1.ibm.com>2008-07-04 15:05:42 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-09 02:30:43 -0400
commit3affedc4e1ce837033b6c5e9289d2ce2f5a62d31 (patch)
tree83296af2c727e5b5f64b88b629dcf37f8e60e3f0 /arch/powerpc/platforms/ps3/system-bus.c
parentc8692362db3db3a6f644e05a477161d967430aac (diff)
powerpc/dma: implement new dma_*map*_attrs() interfaces
Update powerpc to use the new dma_*map*_attrs() interfaces. In doing so update struct dma_mapping_ops to accept a struct dma_attrs and propagate these changes through to all users of the code (generic IOMMU and the 64bit DMA code, and the iseries and ps3 platform code). The old dma_*map_*() interfaces are reimplemented as calls to the corresponding new interfaces. Signed-off-by: Mark Nelson <markn@au1.ibm.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/ps3/system-bus.c')
-rw-r--r--arch/powerpc/platforms/ps3/system-bus.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index cf215e981c3e..d66c3628a112 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -555,7 +555,7 @@ static void ps3_free_coherent(struct device *_dev, size_t size, void *vaddr,
555 */ 555 */
556 556
557static dma_addr_t ps3_sb_map_single(struct device *_dev, void *ptr, size_t size, 557static dma_addr_t ps3_sb_map_single(struct device *_dev, void *ptr, size_t size,
558 enum dma_data_direction direction) 558 enum dma_data_direction direction, struct dma_attrs *attrs)
559{ 559{
560 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); 560 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
561 int result; 561 int result;
@@ -575,7 +575,8 @@ static dma_addr_t ps3_sb_map_single(struct device *_dev, void *ptr, size_t size,
575 575
576static dma_addr_t ps3_ioc0_map_single(struct device *_dev, void *ptr, 576static dma_addr_t ps3_ioc0_map_single(struct device *_dev, void *ptr,
577 size_t size, 577 size_t size,
578 enum dma_data_direction direction) 578 enum dma_data_direction direction,
579 struct dma_attrs *attrs)
579{ 580{
580 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); 581 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
581 int result; 582 int result;
@@ -608,7 +609,7 @@ static dma_addr_t ps3_ioc0_map_single(struct device *_dev, void *ptr,
608} 609}
609 610
610static void ps3_unmap_single(struct device *_dev, dma_addr_t dma_addr, 611static void ps3_unmap_single(struct device *_dev, dma_addr_t dma_addr,
611 size_t size, enum dma_data_direction direction) 612 size_t size, enum dma_data_direction direction, struct dma_attrs *attrs)
612{ 613{
613 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); 614 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
614 int result; 615 int result;
@@ -622,7 +623,7 @@ static void ps3_unmap_single(struct device *_dev, dma_addr_t dma_addr,
622} 623}
623 624
624static int ps3_sb_map_sg(struct device *_dev, struct scatterlist *sgl, 625static int ps3_sb_map_sg(struct device *_dev, struct scatterlist *sgl,
625 int nents, enum dma_data_direction direction) 626 int nents, enum dma_data_direction direction, struct dma_attrs *attrs)
626{ 627{
627#if defined(CONFIG_PS3_DYNAMIC_DMA) 628#if defined(CONFIG_PS3_DYNAMIC_DMA)
628 BUG_ON("do"); 629 BUG_ON("do");
@@ -651,14 +652,15 @@ static int ps3_sb_map_sg(struct device *_dev, struct scatterlist *sgl,
651 652
652static int ps3_ioc0_map_sg(struct device *_dev, struct scatterlist *sg, 653static int ps3_ioc0_map_sg(struct device *_dev, struct scatterlist *sg,
653 int nents, 654 int nents,
654 enum dma_data_direction direction) 655 enum dma_data_direction direction,
656 struct dma_attrs *attrs)
655{ 657{
656 BUG(); 658 BUG();
657 return 0; 659 return 0;
658} 660}
659 661
660static void ps3_sb_unmap_sg(struct device *_dev, struct scatterlist *sg, 662static void ps3_sb_unmap_sg(struct device *_dev, struct scatterlist *sg,
661 int nents, enum dma_data_direction direction) 663 int nents, enum dma_data_direction direction, struct dma_attrs *attrs)
662{ 664{
663#if defined(CONFIG_PS3_DYNAMIC_DMA) 665#if defined(CONFIG_PS3_DYNAMIC_DMA)
664 BUG_ON("do"); 666 BUG_ON("do");
@@ -666,7 +668,8 @@ static void ps3_sb_unmap_sg(struct device *_dev, struct scatterlist *sg,
666} 668}
667 669
668static void ps3_ioc0_unmap_sg(struct device *_dev, struct scatterlist *sg, 670static void ps3_ioc0_unmap_sg(struct device *_dev, struct scatterlist *sg,
669 int nents, enum dma_data_direction direction) 671 int nents, enum dma_data_direction direction,
672 struct dma_attrs *attrs)
670{ 673{
671 BUG(); 674 BUG();
672} 675}