hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/arch/powerpc/sysdev/fsl_85xx_cache_sram.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright 2009-2010 Freescale Semiconductor, Inc.
34 *
....@@ -7,20 +8,6 @@
78 *
89 * This file is derived from the original work done
910 * by Sylvain Munaut for the Bestcomm SRAM allocator.
10
- *
11
- * This program is free software; you can redistribute it and/or modify it
12
- * under the terms of the GNU General Public License as published by the
13
- * Free Software Foundation; either version 2 of the License, or (at your
14
- * option) any later version.
15
- *
16
- * This program is distributed in the hope that it will be useful,
17
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- * GNU General Public License for more details.
20
- *
21
- * You should have received a copy of the GNU General Public License
22
- * along with this program; if not, write to the Free Software
23
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2411 */
2512
2613 #include <linux/kernel.h>
....@@ -28,7 +15,7 @@
2815 #include <linux/slab.h>
2916 #include <linux/err.h>
3017 #include <linux/of_platform.h>
31
-#include <asm/pgtable.h>
18
+#include <linux/pgtable.h>
3219 #include <asm/fsl_85xx_cache_sram.h>
3320
3421 #include "fsl_85xx_cache_ctlr.h"
....@@ -107,11 +94,11 @@
10794 goto out_free;
10895 }
10996
110
- cache_sram->base_virt = ioremap_prot(cache_sram->base_phys,
111
- cache_sram->size, _PAGE_COHERENT | PAGE_KERNEL);
97
+ cache_sram->base_virt = ioremap_coherent(cache_sram->base_phys,
98
+ cache_sram->size);
11299 if (!cache_sram->base_virt) {
113
- dev_err(&dev->dev, "%pOF: ioremap_prot failed\n",
114
- dev->dev.of_node);
100
+ dev_err(&dev->dev, "%pOF: ioremap_coherent failed\n",
101
+ dev->dev.of_node);
115102 ret = -ENOMEM;
116103 goto out_release;
117104 }