.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * DMA Engine support for Tsi721 PCIExpress-to-SRIO bridge |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2011-2014 Integrated Device Technology, Inc. |
---|
5 | 6 | * Alexandre Bounine <alexandre.bounine@idt.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify it |
---|
8 | | - * under the terms of the GNU General Public License as published by the Free |
---|
9 | | - * Software Foundation; either version 2 of the License, or (at your option) |
---|
10 | | - * any later version. |
---|
11 | | - * |
---|
12 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
---|
13 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
14 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
15 | | - * more details. |
---|
16 | | - * |
---|
17 | | - * The full GNU General Public License is included in this distribution in the |
---|
18 | | - * file called COPYING. |
---|
19 | 7 | */ |
---|
20 | 8 | |
---|
21 | 9 | #include <linux/io.h> |
---|
.. | .. |
---|
90 | 78 | * Allocate space for DMA descriptors |
---|
91 | 79 | * (add an extra element for link descriptor) |
---|
92 | 80 | */ |
---|
93 | | - bd_ptr = dma_zalloc_coherent(dev, |
---|
94 | | - (bd_num + 1) * sizeof(struct tsi721_dma_desc), |
---|
95 | | - &bd_phys, GFP_ATOMIC); |
---|
| 81 | + bd_ptr = dma_alloc_coherent(dev, |
---|
| 82 | + (bd_num + 1) * sizeof(struct tsi721_dma_desc), |
---|
| 83 | + &bd_phys, GFP_ATOMIC); |
---|
96 | 84 | if (!bd_ptr) |
---|
97 | 85 | return -ENOMEM; |
---|
98 | 86 | |
---|
.. | .. |
---|
108 | 96 | sts_size = ((bd_num + 1) >= TSI721_DMA_MINSTSSZ) ? |
---|
109 | 97 | (bd_num + 1) : TSI721_DMA_MINSTSSZ; |
---|
110 | 98 | sts_size = roundup_pow_of_two(sts_size); |
---|
111 | | - sts_ptr = dma_zalloc_coherent(dev, |
---|
| 99 | + sts_ptr = dma_alloc_coherent(dev, |
---|
112 | 100 | sts_size * sizeof(struct tsi721_dma_sts), |
---|
113 | 101 | &sts_phys, GFP_ATOMIC); |
---|
114 | 102 | if (!sts_ptr) { |
---|