hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/mips/pci/pci-ar2315.c
....@@ -1,16 +1,5 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
2
- * This program is free software; you can redistribute it and/or
3
- * modify it under the terms of the GNU General Public License
4
- * as published by the Free Software Foundation; either version 2
5
- * of the License, or (at your option) any later version.
6
- *
7
- * This program is distributed in the hope that it will be useful,
8
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
- * GNU General Public License for more details.
11
- *
12
- * You should have received a copy of the GNU General Public License
13
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
143 */
154
165 /**
....@@ -181,12 +170,12 @@
181170 return 0;
182171 }
183172
184
-dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t paddr)
173
+dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
185174 {
186175 return paddr + ar2315_dev_offset(dev);
187176 }
188177
189
-phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t dma_addr)
178
+phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dma_addr)
190179 {
191180 return dma_addr - ar2315_dev_offset(dev);
192181 }
....@@ -434,9 +423,8 @@
434423 return -EINVAL;
435424 apc->irq = irq;
436425
437
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
438
- "ar2315-pci-ctrl");
439
- apc->mmr_mem = devm_ioremap_resource(dev, res);
426
+ apc->mmr_mem = devm_platform_ioremap_resource_byname(pdev,
427
+ "ar2315-pci-ctrl");
440428 if (IS_ERR(apc->mmr_mem))
441429 return PTR_ERR(apc->mmr_mem);
442430
....@@ -452,7 +440,7 @@
452440 apc->mem_res.flags = IORESOURCE_MEM;
453441
454442 /* Remap PCI config space */
455
- apc->cfg_mem = devm_ioremap_nocache(dev, res->start,
443
+ apc->cfg_mem = devm_ioremap(dev, res->start,
456444 AR2315_PCI_CFG_SIZE);
457445 if (!apc->cfg_mem) {
458446 dev_err(dev, "failed to remap PCI config space\n");