diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-27 21:09:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-29 05:13:15 -0400 |
commit | 738f2b7b813913e651f39387d007dd961755dee2 (patch) | |
tree | 022ca4d144cba51495e6f26a8f55d3046d16c2e3 /drivers/atm/fore200e.c | |
parent | 944c67dff7a88f0a775e5b604937f9e30d2de555 (diff) |
sparc: Convert all SBUS drivers to dma_*() interfaces.
And all the SBUS dma interfaces are deleted.
A private implementation remains inside of the 32-bit sparc port which
exists only for the sake of the implementation of dma_*().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm/fore200e.c')
-rw-r--r-- | drivers/atm/fore200e.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index c5ab44fc13df..f607e59bffae 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
@@ -680,7 +680,7 @@ fore200e_sba_dma_map(struct fore200e* fore200e, void* virt_addr, int size, int d | |||
680 | { | 680 | { |
681 | struct sbus_dev *sdev = fore200e->bus_dev; | 681 | struct sbus_dev *sdev = fore200e->bus_dev; |
682 | struct device *dev = &sdev->ofdev.dev; | 682 | struct device *dev = &sdev->ofdev.dev; |
683 | u32 dma_addr = sbus_map_single(dev, virt_addr, size, direction); | 683 | u32 dma_addr = dma_map_single(dev, virt_addr, size, direction); |
684 | 684 | ||
685 | DPRINTK(3, "SBUS DVMA mapping: virt_addr = 0x%p, size = %d, direction = %d --> dma_addr = 0x%08x\n", | 685 | DPRINTK(3, "SBUS DVMA mapping: virt_addr = 0x%p, size = %d, direction = %d --> dma_addr = 0x%08x\n", |
686 | virt_addr, size, direction, dma_addr); | 686 | virt_addr, size, direction, dma_addr); |
@@ -698,7 +698,7 @@ fore200e_sba_dma_unmap(struct fore200e* fore200e, u32 dma_addr, int size, int di | |||
698 | DPRINTK(3, "SBUS DVMA unmapping: dma_addr = 0x%08x, size = %d, direction = %d,\n", | 698 | DPRINTK(3, "SBUS DVMA unmapping: dma_addr = 0x%08x, size = %d, direction = %d,\n", |
699 | dma_addr, size, direction); | 699 | dma_addr, size, direction); |
700 | 700 | ||
701 | sbus_unmap_single(dev, dma_addr, size, direction); | 701 | dma_unmap_single(dev, dma_addr, size, direction); |
702 | } | 702 | } |
703 | 703 | ||
704 | 704 | ||
@@ -710,7 +710,7 @@ fore200e_sba_dma_sync_for_cpu(struct fore200e* fore200e, u32 dma_addr, int size, | |||
710 | 710 | ||
711 | DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction); | 711 | DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction); |
712 | 712 | ||
713 | sbus_dma_sync_single_for_cpu(dev, dma_addr, size, direction); | 713 | dma_sync_single_for_cpu(dev, dma_addr, size, direction); |
714 | } | 714 | } |
715 | 715 | ||
716 | static void | 716 | static void |
@@ -721,7 +721,7 @@ fore200e_sba_dma_sync_for_device(struct fore200e* fore200e, u32 dma_addr, int si | |||
721 | 721 | ||
722 | DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction); | 722 | DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction); |
723 | 723 | ||
724 | sbus_dma_sync_single_for_device(dev, dma_addr, size, direction); | 724 | dma_sync_single_for_device(dev, dma_addr, size, direction); |
725 | } | 725 | } |
726 | 726 | ||
727 | 727 | ||
@@ -738,8 +738,8 @@ fore200e_sba_dma_chunk_alloc(struct fore200e* fore200e, struct chunk* chunk, | |||
738 | chunk->alloc_size = chunk->align_size = size * nbr; | 738 | chunk->alloc_size = chunk->align_size = size * nbr; |
739 | 739 | ||
740 | /* returned chunks are page-aligned */ | 740 | /* returned chunks are page-aligned */ |
741 | chunk->alloc_addr = sbus_alloc_consistent(dev, chunk->alloc_size, | 741 | chunk->alloc_addr = dma_alloc_coherent(dev, chunk->alloc_size, |
742 | &chunk->dma_addr); | 742 | &chunk->dma_addr, GFP_ATOMIC); |
743 | 743 | ||
744 | if ((chunk->alloc_addr == NULL) || (chunk->dma_addr == 0)) | 744 | if ((chunk->alloc_addr == NULL) || (chunk->dma_addr == 0)) |
745 | return -ENOMEM; | 745 | return -ENOMEM; |
@@ -758,8 +758,8 @@ fore200e_sba_dma_chunk_free(struct fore200e* fore200e, struct chunk* chunk) | |||
758 | struct sbus_dev *sdev = (struct sbus_dev *) fore200e->bus_dev; | 758 | struct sbus_dev *sdev = (struct sbus_dev *) fore200e->bus_dev; |
759 | struct device *dev = &sdev->ofdev.dev; | 759 | struct device *dev = &sdev->ofdev.dev; |
760 | 760 | ||
761 | sbus_free_consistent(dev, chunk->alloc_size, | 761 | dma_free_coherent(dev, chunk->alloc_size, |
762 | chunk->alloc_addr, chunk->dma_addr); | 762 | chunk->alloc_addr, chunk->dma_addr); |
763 | } | 763 | } |
764 | 764 | ||
765 | 765 | ||