forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/arch/powerpc/platforms/pasemi/dma_lib.c
....@@ -1,20 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2006-2007 PA Semi, Inc
34 *
45 * Common functions for DMA access on PA Semi PWRficient
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, write to the Free Software
17
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
186 */
197
208 #include <linux/kernel.h>
....@@ -261,8 +249,6 @@
261249
262250 if (!chan->ring_virt)
263251 return -ENOMEM;
264
-
265
- memset(chan->ring_virt, 0, ring_size * sizeof(u64));
266252
267253 return 0;
268254 }
....@@ -576,7 +562,7 @@
576562 res.start = 0xfd800000;
577563 res.end = res.start + 0x1000;
578564 }
579
- dma_status = __ioremap(res.start, resource_size(&res), 0);
565
+ dma_status = ioremap_cache(res.start, resource_size(&res));
580566 pci_dev_put(iob_pdev);
581567
582568 for (i = 0; i < MAX_TXCH; i++)