aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuthikulpanit, Suravee <Suravee.Suthikulpanit@amd.com>2015-10-28 18:50:51 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-11-06 19:29:22 -0500
commitab3d527329f01dd63dc852041006d1a24895d116 (patch)
tree992f8b6afc3af79edb8ce18c31b579f33cda8313
parent1831eff876bd0bb8d64e9965a7ff47486c9a3ecd (diff)
device property: ACPI: Remove unused DMA APIs
These DMA APIs are replaced with the newer versions, which return the enum dev_dma_attr. So, we can safely remove them. Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/base/property.c13
-rw-r--r--include/acpi/acpi_bus.h34
-rw-r--r--include/linux/acpi.h5
-rw-r--r--include/linux/property.h2
4 files changed, 0 insertions, 54 deletions
diff --git a/drivers/base/property.c b/drivers/base/property.c
index 05d57a2afa05..1325ff225cc4 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -598,19 +598,6 @@ unsigned int device_get_child_node_count(struct device *dev)
598} 598}
599EXPORT_SYMBOL_GPL(device_get_child_node_count); 599EXPORT_SYMBOL_GPL(device_get_child_node_count);
600 600
601bool device_dma_is_coherent(struct device *dev)
602{
603 bool coherent = false;
604
605 if (IS_ENABLED(CONFIG_OF) && dev->of_node)
606 coherent = of_dma_is_coherent(dev->of_node);
607 else
608 acpi_check_dma(ACPI_COMPANION(dev), &coherent);
609
610 return coherent;
611}
612EXPORT_SYMBOL_GPL(device_dma_is_coherent);
613
614bool device_dma_supported(struct device *dev) 601bool device_dma_supported(struct device *dev)
615{ 602{
616 /* For DT, this is always supported. 603 /* For DT, this is always supported.
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index e56e6520edce..e45d58d6b0a7 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -390,40 +390,6 @@ struct acpi_data_node {
390 struct completion kobj_done; 390 struct completion kobj_done;
391}; 391};
392 392
393static inline bool acpi_check_dma(struct acpi_device *adev, bool *coherent)
394{
395 bool ret = false;
396
397 if (!adev)
398 return ret;
399
400 /**
401 * Currently, we only support _CCA=1 (i.e. coherent_dma=1)
402 * This should be equivalent to specifyig dma-coherent for
403 * a device in OF.
404 *
405 * For the case when _CCA=0 (i.e. coherent_dma=0 && cca_seen=1),
406 * There are two cases:
407 * case 1. Do not support and disable DMA.
408 * case 2. Support but rely on arch-specific cache maintenance for
409 * non-coherence DMA operations.
410 * Currently, we implement case 2 above.
411 *
412 * For the case when _CCA is missing (i.e. cca_seen=0) and
413 * platform specifies ACPI_CCA_REQUIRED, we do not support DMA,
414 * and fallback to arch-specific default handling.
415 *
416 * See acpi_init_coherency() for more info.
417 */
418 if (adev->flags.coherent_dma ||
419 (adev->flags.cca_seen && IS_ENABLED(CONFIG_ARM64))) {
420 ret = true;
421 if (coherent)
422 *coherent = adev->flags.coherent_dma;
423 }
424 return ret;
425}
426
427static inline bool is_acpi_node(struct fwnode_handle *fwnode) 393static inline bool is_acpi_node(struct fwnode_handle *fwnode)
428{ 394{
429 return fwnode && (fwnode->type == FWNODE_ACPI 395 return fwnode && (fwnode->type == FWNODE_ACPI
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 292af3b69ede..b5868300df75 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -574,11 +574,6 @@ static inline int acpi_device_modalias(struct device *dev,
574 return -ENODEV; 574 return -ENODEV;
575} 575}
576 576
577static inline bool acpi_check_dma(struct acpi_device *adev, bool *coherent)
578{
579 return false;
580}
581
582static inline bool acpi_dma_supported(struct acpi_device *adev) 577static inline bool acpi_dma_supported(struct acpi_device *adev)
583{ 578{
584 return false; 579 return false;
diff --git a/include/linux/property.h b/include/linux/property.h
index 7200490b7e6f..0a3705a7c9f2 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -174,8 +174,6 @@ struct property_set {
174 174
175void device_add_property_set(struct device *dev, struct property_set *pset); 175void device_add_property_set(struct device *dev, struct property_set *pset);
176 176
177bool device_dma_is_coherent(struct device *dev);
178
179bool device_dma_supported(struct device *dev); 177bool device_dma_supported(struct device *dev);
180 178
181enum dev_dma_attr device_get_dma_attr(struct device *dev); 179enum dev_dma_attr device_get_dma_attr(struct device *dev);