|
30 | 30 | #include <linux/soc/ixp4xx/cpu.h> |
31 | 31 | #include <linux/irqchip/irq-ixp4xx.h> |
32 | 32 | #include <linux/platform_data/timer-ixp4xx.h> |
33 | | -#include <linux/dma-map-ops.h> |
34 | 33 | #include <mach/hardware.h> |
35 | 34 | #include <linux/uaccess.h> |
36 | 35 | #include <asm/page.h> |
@@ -330,59 +329,3 @@ void ixp4xx_restart(enum reboot_mode mode, const char *cmd) |
330 | 329 | *IXP4XX_OSWE = IXP4XX_WDT_RESET_ENABLE | IXP4XX_WDT_COUNT_ENABLE; |
331 | 330 | } |
332 | 331 | } |
333 | | - |
334 | | -#ifdef CONFIG_PCI |
335 | | -static int ixp4xx_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size) |
336 | | -{ |
337 | | - return (dma_addr + size) > SZ_64M; |
338 | | -} |
339 | | - |
340 | | -static int ixp4xx_platform_notify_remove(struct device *dev) |
341 | | -{ |
342 | | - if (dev_is_pci(dev)) |
343 | | - dmabounce_unregister_dev(dev); |
344 | | - |
345 | | - return 0; |
346 | | -} |
347 | | -#endif |
348 | | - |
349 | | -/* |
350 | | - * Setup DMA mask to 64MB on PCI devices and 4 GB on all other things. |
351 | | - */ |
352 | | -static int ixp4xx_platform_notify(struct device *dev) |
353 | | -{ |
354 | | - dev->dma_mask = &dev->coherent_dma_mask; |
355 | | - |
356 | | -#ifdef CONFIG_PCI |
357 | | - if (dev_is_pci(dev)) { |
358 | | - dev->coherent_dma_mask = DMA_BIT_MASK(28); /* 64 MB */ |
359 | | - dmabounce_register_dev(dev, 2048, 4096, ixp4xx_needs_bounce); |
360 | | - return 0; |
361 | | - } |
362 | | -#endif |
363 | | - |
364 | | - dev->coherent_dma_mask = DMA_BIT_MASK(32); |
365 | | - return 0; |
366 | | -} |
367 | | - |
368 | | -int dma_set_coherent_mask(struct device *dev, u64 mask) |
369 | | -{ |
370 | | - if (dev_is_pci(dev)) |
371 | | - mask &= DMA_BIT_MASK(28); /* 64 MB */ |
372 | | - |
373 | | - if ((mask & DMA_BIT_MASK(28)) == DMA_BIT_MASK(28)) { |
374 | | - dev->coherent_dma_mask = mask; |
375 | | - return 0; |
376 | | - } |
377 | | - |
378 | | - return -EIO; /* device wanted sub-64MB mask */ |
379 | | -} |
380 | | -EXPORT_SYMBOL(dma_set_coherent_mask); |
381 | | - |
382 | | -void __init ixp4xx_init_early(void) |
383 | | -{ |
384 | | - platform_notify = ixp4xx_platform_notify; |
385 | | -#ifdef CONFIG_PCI |
386 | | - platform_notify_remove = ixp4xx_platform_notify_remove; |
387 | | -#endif |
388 | | -} |
0 commit comments