.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright 2009-2010 Freescale Semiconductor, Inc. |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * |
---|
8 | 9 | * This file is derived from the original work done |
---|
9 | 10 | * 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. |
---|
24 | 11 | */ |
---|
25 | 12 | |
---|
26 | 13 | #include <linux/kernel.h> |
---|
.. | .. |
---|
28 | 15 | #include <linux/slab.h> |
---|
29 | 16 | #include <linux/err.h> |
---|
30 | 17 | #include <linux/of_platform.h> |
---|
31 | | -#include <asm/pgtable.h> |
---|
| 18 | +#include <linux/pgtable.h> |
---|
32 | 19 | #include <asm/fsl_85xx_cache_sram.h> |
---|
33 | 20 | |
---|
34 | 21 | #include "fsl_85xx_cache_ctlr.h" |
---|
.. | .. |
---|
107 | 94 | goto out_free; |
---|
108 | 95 | } |
---|
109 | 96 | |
---|
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); |
---|
112 | 99 | 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); |
---|
115 | 102 | ret = -ENOMEM; |
---|
116 | 103 | goto out_release; |
---|
117 | 104 | } |
---|