scan.c (69e6cdd0cf16f645be39038e5ccc9379e3923d00) scan.c (d760a1baf20e067d3a063aa134834ddd3d183e2f)
1/*
2 * scan.c - support for transforming the ACPI namespace into individual objects
3 */
4
5#include <linux/module.h>
6#include <linux/init.h>
7#include <linux/slab.h>
8#include <linux/kernel.h>

--- 1356 unchanged lines hidden (view full) ---

1365 return DEV_DMA_NOT_SUPPORTED;
1366
1367 if (adev->flags.coherent_dma)
1368 return DEV_DMA_COHERENT;
1369 else
1370 return DEV_DMA_NON_COHERENT;
1371}
1372
1/*
2 * scan.c - support for transforming the ACPI namespace into individual objects
3 */
4
5#include <linux/module.h>
6#include <linux/init.h>
7#include <linux/slab.h>
8#include <linux/kernel.h>

--- 1356 unchanged lines hidden (view full) ---

1365 return DEV_DMA_NOT_SUPPORTED;
1366
1367 if (adev->flags.coherent_dma)
1368 return DEV_DMA_COHERENT;
1369 else
1370 return DEV_DMA_NON_COHERENT;
1371}
1372
1373/**
1374 * acpi_dma_configure - Set-up DMA configuration for the device.
1375 * @dev: The pointer to the device
1376 * @attr: device dma attributes
1377 */
1378void acpi_dma_configure(struct device *dev, enum dev_dma_attr attr)
1379{
1380 /*
1381 * Set default coherent_dma_mask to 32 bit. Drivers are expected to
1382 * setup the correct supported mask.
1383 */
1384 if (!dev->coherent_dma_mask)
1385 dev->coherent_dma_mask = DMA_BIT_MASK(32);
1386
1387 /*
1388 * Set it to coherent_dma_mask by default if the architecture
1389 * code has not set it.
1390 */
1391 if (!dev->dma_mask)
1392 dev->dma_mask = &dev->coherent_dma_mask;
1393
1394 /*
1395 * Assume dma valid range starts at 0 and covers the whole
1396 * coherent_dma_mask.
1397 */
1398 arch_setup_dma_ops(dev, 0, dev->coherent_dma_mask + 1, NULL,
1399 attr == DEV_DMA_COHERENT);
1400}
1401EXPORT_SYMBOL_GPL(acpi_dma_configure);
1402
1403/**
1404 * acpi_dma_deconfigure - Tear-down DMA configuration for the device.
1405 * @dev: The pointer to the device
1406 */
1407void acpi_dma_deconfigure(struct device *dev)
1408{
1409 arch_teardown_dma_ops(dev);
1410}
1411EXPORT_SYMBOL_GPL(acpi_dma_deconfigure);
1412
1373static void acpi_init_coherency(struct acpi_device *adev)
1374{
1375 unsigned long long cca = 0;
1376 acpi_status status;
1377 struct acpi_device *parent = adev->parent;
1378
1379 if (parent && parent->flags.cca_seen) {
1380 /*

--- 768 unchanged lines hidden ---
1413static void acpi_init_coherency(struct acpi_device *adev)
1414{
1415 unsigned long long cca = 0;
1416 acpi_status status;
1417 struct acpi_device *parent = adev->parent;
1418
1419 if (parent && parent->flags.cca_seen) {
1420 /*

--- 768 unchanged lines hidden ---