.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Core driver for the Intel integrated DMA 64-bit |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2015 Intel Corporation |
---|
5 | 6 | * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify |
---|
8 | | - * it under the terms of the GNU General Public License version 2 as |
---|
9 | | - * published by the Free Software Foundation. |
---|
10 | 7 | */ |
---|
11 | 8 | |
---|
12 | 9 | #include <linux/bitops.h> |
---|
.. | .. |
---|
19 | 16 | #include <linux/platform_device.h> |
---|
20 | 17 | #include <linux/slab.h> |
---|
21 | 18 | |
---|
22 | | -#include "idma64.h" |
---|
| 19 | +#include <linux/dma/idma64.h> |
---|
23 | 20 | |
---|
24 | | -/* Platform driver name */ |
---|
25 | | -#define DRV_NAME "idma64" |
---|
| 21 | +#include "idma64.h" |
---|
26 | 22 | |
---|
27 | 23 | /* For now we support only two channels */ |
---|
28 | 24 | #define IDMA64_NR_CHAN 2 |
---|
.. | .. |
---|
142 | 138 | { |
---|
143 | 139 | struct idma64_chan *idma64c = &idma64->chan[c]; |
---|
144 | 140 | struct idma64_desc *desc; |
---|
145 | | - unsigned long flags; |
---|
146 | 141 | |
---|
147 | | - spin_lock_irqsave(&idma64c->vchan.lock, flags); |
---|
| 142 | + spin_lock(&idma64c->vchan.lock); |
---|
148 | 143 | desc = idma64c->desc; |
---|
149 | 144 | if (desc) { |
---|
150 | 145 | if (status_err & (1 << c)) { |
---|
.. | .. |
---|
161 | 156 | if (idma64c->desc == NULL || desc->status == DMA_ERROR) |
---|
162 | 157 | idma64_stop_transfer(idma64c); |
---|
163 | 158 | } |
---|
164 | | - spin_unlock_irqrestore(&idma64c->vchan.lock, flags); |
---|
| 159 | + spin_unlock(&idma64c->vchan.lock); |
---|
165 | 160 | } |
---|
166 | 161 | |
---|
167 | 162 | static irqreturn_t idma64_irq(int irq, void *dev) |
---|
.. | .. |
---|
407 | 402 | struct dma_slave_config *config) |
---|
408 | 403 | { |
---|
409 | 404 | struct idma64_chan *idma64c = to_idma64_chan(chan); |
---|
410 | | - |
---|
411 | | - /* Check if chan will be configured for slave transfers */ |
---|
412 | | - if (!is_slave_direction(config->direction)) |
---|
413 | | - return -EINVAL; |
---|
414 | 405 | |
---|
415 | 406 | memcpy(&idma64c->config, config, sizeof(idma64c->config)); |
---|
416 | 407 | |
---|
.. | .. |
---|
704 | 695 | .probe = idma64_platform_probe, |
---|
705 | 696 | .remove = idma64_platform_remove, |
---|
706 | 697 | .driver = { |
---|
707 | | - .name = DRV_NAME, |
---|
| 698 | + .name = LPSS_IDMA64_DRIVER_NAME, |
---|
708 | 699 | .pm = &idma64_dev_pm_ops, |
---|
709 | 700 | }, |
---|
710 | 701 | }; |
---|
.. | .. |
---|
714 | 705 | MODULE_LICENSE("GPL v2"); |
---|
715 | 706 | MODULE_DESCRIPTION("iDMA64 core driver"); |
---|
716 | 707 | MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>"); |
---|
717 | | -MODULE_ALIAS("platform:" DRV_NAME); |
---|
| 708 | +MODULE_ALIAS("platform:" LPSS_IDMA64_DRIVER_NAME); |
---|