diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-06-03 22:37:44 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-04 16:00:42 -0400 |
commit | 467429b475e56f154f93b3b14fd75f238d14597a (patch) | |
tree | 8c12b9b8aee222e55852659ef3f753e73084339b /drivers/ssb/main.c | |
parent | 39a6f4bce6b437046edf042f78f7a0529e253bff (diff) |
ssb: remove the ssb DMA API
Now they are unnecessary. We can use the generic DMA API with any bus.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Michael Buesch <mb@bu3sch.de>
Cc: Gary Zambrano <zambrano@broadcom.com>
Cc: Stefano Brivio <stefano.brivio@polimi.it>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/ssb/main.c')
-rw-r--r-- | drivers/ssb/main.c | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index a732b396e602..7cee7f4eb60b 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
@@ -1228,80 +1228,6 @@ u32 ssb_dma_translation(struct ssb_device *dev) | |||
1228 | } | 1228 | } |
1229 | EXPORT_SYMBOL(ssb_dma_translation); | 1229 | EXPORT_SYMBOL(ssb_dma_translation); |
1230 | 1230 | ||
1231 | int ssb_dma_set_mask(struct ssb_device *dev, u64 mask) | ||
1232 | { | ||
1233 | #ifdef CONFIG_SSB_PCIHOST | ||
1234 | int err; | ||
1235 | #endif | ||
1236 | |||
1237 | switch (dev->bus->bustype) { | ||
1238 | case SSB_BUSTYPE_PCI: | ||
1239 | #ifdef CONFIG_SSB_PCIHOST | ||
1240 | err = pci_set_dma_mask(dev->bus->host_pci, mask); | ||
1241 | if (err) | ||
1242 | return err; | ||
1243 | err = pci_set_consistent_dma_mask(dev->bus->host_pci, mask); | ||
1244 | return err; | ||
1245 | #endif | ||
1246 | case SSB_BUSTYPE_SSB: | ||
1247 | return dma_set_mask(dev->dev, mask); | ||
1248 | default: | ||
1249 | __ssb_dma_not_implemented(dev); | ||
1250 | } | ||
1251 | return -ENOSYS; | ||
1252 | } | ||
1253 | EXPORT_SYMBOL(ssb_dma_set_mask); | ||
1254 | |||
1255 | void * ssb_dma_alloc_consistent(struct ssb_device *dev, size_t size, | ||
1256 | dma_addr_t *dma_handle, gfp_t gfp_flags) | ||
1257 | { | ||
1258 | switch (dev->bus->bustype) { | ||
1259 | case SSB_BUSTYPE_PCI: | ||
1260 | #ifdef CONFIG_SSB_PCIHOST | ||
1261 | if (gfp_flags & GFP_DMA) { | ||
1262 | /* Workaround: The PCI API does not support passing | ||
1263 | * a GFP flag. */ | ||
1264 | return dma_alloc_coherent(&dev->bus->host_pci->dev, | ||
1265 | size, dma_handle, gfp_flags); | ||
1266 | } | ||
1267 | return pci_alloc_consistent(dev->bus->host_pci, size, dma_handle); | ||
1268 | #endif | ||
1269 | case SSB_BUSTYPE_SSB: | ||
1270 | return dma_alloc_coherent(dev->dev, size, dma_handle, gfp_flags); | ||
1271 | default: | ||
1272 | __ssb_dma_not_implemented(dev); | ||
1273 | } | ||
1274 | return NULL; | ||
1275 | } | ||
1276 | EXPORT_SYMBOL(ssb_dma_alloc_consistent); | ||
1277 | |||
1278 | void ssb_dma_free_consistent(struct ssb_device *dev, size_t size, | ||
1279 | void *vaddr, dma_addr_t dma_handle, | ||
1280 | gfp_t gfp_flags) | ||
1281 | { | ||
1282 | switch (dev->bus->bustype) { | ||
1283 | case SSB_BUSTYPE_PCI: | ||
1284 | #ifdef CONFIG_SSB_PCIHOST | ||
1285 | if (gfp_flags & GFP_DMA) { | ||
1286 | /* Workaround: The PCI API does not support passing | ||
1287 | * a GFP flag. */ | ||
1288 | dma_free_coherent(&dev->bus->host_pci->dev, | ||
1289 | size, vaddr, dma_handle); | ||
1290 | return; | ||
1291 | } | ||
1292 | pci_free_consistent(dev->bus->host_pci, size, | ||
1293 | vaddr, dma_handle); | ||
1294 | return; | ||
1295 | #endif | ||
1296 | case SSB_BUSTYPE_SSB: | ||
1297 | dma_free_coherent(dev->dev, size, vaddr, dma_handle); | ||
1298 | return; | ||
1299 | default: | ||
1300 | __ssb_dma_not_implemented(dev); | ||
1301 | } | ||
1302 | } | ||
1303 | EXPORT_SYMBOL(ssb_dma_free_consistent); | ||
1304 | |||
1305 | int ssb_bus_may_powerdown(struct ssb_bus *bus) | 1231 | int ssb_bus_may_powerdown(struct ssb_bus *bus) |
1306 | { | 1232 | { |
1307 | struct ssb_chipcommon *cc; | 1233 | struct ssb_chipcommon *cc; |