|
19 | 19 | #include <linux/of.h> |
20 | 20 | #include <linux/of_dma.h> |
21 | 21 | #include <linux/acpi.h> |
22 | | -#include <linux/acpi_dma.h> |
23 | 22 |
|
24 | 23 | #include "internal.h" |
25 | 24 |
|
@@ -55,57 +54,6 @@ static struct dma_chan *dw_dma_of_xlate(struct of_phandle_args *dma_spec, |
55 | 54 | return dma_request_channel(cap, dw_dma_filter, &slave); |
56 | 55 | } |
57 | 56 |
|
58 | | -#ifdef CONFIG_ACPI |
59 | | -static bool dw_dma_acpi_filter(struct dma_chan *chan, void *param) |
60 | | -{ |
61 | | - struct acpi_dma_spec *dma_spec = param; |
62 | | - struct dw_dma_slave slave = { |
63 | | - .dma_dev = dma_spec->dev, |
64 | | - .src_id = dma_spec->slave_id, |
65 | | - .dst_id = dma_spec->slave_id, |
66 | | - .m_master = 0, |
67 | | - .p_master = 1, |
68 | | - }; |
69 | | - |
70 | | - return dw_dma_filter(chan, &slave); |
71 | | -} |
72 | | - |
73 | | -static void dw_dma_acpi_controller_register(struct dw_dma *dw) |
74 | | -{ |
75 | | - struct device *dev = dw->dma.dev; |
76 | | - struct acpi_dma_filter_info *info; |
77 | | - int ret; |
78 | | - |
79 | | - if (!has_acpi_companion(dev)) |
80 | | - return; |
81 | | - |
82 | | - info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL); |
83 | | - if (!info) |
84 | | - return; |
85 | | - |
86 | | - dma_cap_zero(info->dma_cap); |
87 | | - dma_cap_set(DMA_SLAVE, info->dma_cap); |
88 | | - info->filter_fn = dw_dma_acpi_filter; |
89 | | - |
90 | | - ret = acpi_dma_controller_register(dev, acpi_dma_simple_xlate, info); |
91 | | - if (ret) |
92 | | - dev_err(dev, "could not register acpi_dma_controller\n"); |
93 | | -} |
94 | | - |
95 | | -static void dw_dma_acpi_controller_free(struct dw_dma *dw) |
96 | | -{ |
97 | | - struct device *dev = dw->dma.dev; |
98 | | - |
99 | | - if (!has_acpi_companion(dev)) |
100 | | - return; |
101 | | - |
102 | | - acpi_dma_controller_free(dev); |
103 | | -} |
104 | | -#else /* !CONFIG_ACPI */ |
105 | | -static inline void dw_dma_acpi_controller_register(struct dw_dma *dw) {} |
106 | | -static inline void dw_dma_acpi_controller_free(struct dw_dma *dw) {} |
107 | | -#endif /* !CONFIG_ACPI */ |
108 | | - |
109 | 57 | #ifdef CONFIG_OF |
110 | 58 | static struct dw_dma_platform_data * |
111 | 59 | dw_dma_parse_dt(struct platform_device *pdev) |
|
0 commit comments