hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/sh/kernel/iomap.c
....@@ -1,41 +1,38 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * arch/sh/kernel/iomap.c
34 *
45 * Copyright (C) 2000 Niibe Yutaka
56 * Copyright (C) 2005 - 2007 Paul Mundt
6
- *
7
- * This file is subject to the terms and conditions of the GNU General Public
8
- * License. See the file "COPYING" in the main directory of this archive
9
- * for more details.
107 */
118 #include <linux/module.h>
129 #include <linux/io.h>
1310
14
-unsigned int ioread8(void __iomem *addr)
11
+unsigned int ioread8(const void __iomem *addr)
1512 {
1613 return readb(addr);
1714 }
1815 EXPORT_SYMBOL(ioread8);
1916
20
-unsigned int ioread16(void __iomem *addr)
17
+unsigned int ioread16(const void __iomem *addr)
2118 {
2219 return readw(addr);
2320 }
2421 EXPORT_SYMBOL(ioread16);
2522
26
-unsigned int ioread16be(void __iomem *addr)
23
+unsigned int ioread16be(const void __iomem *addr)
2724 {
2825 return be16_to_cpu(__raw_readw(addr));
2926 }
3027 EXPORT_SYMBOL(ioread16be);
3128
32
-unsigned int ioread32(void __iomem *addr)
29
+unsigned int ioread32(const void __iomem *addr)
3330 {
3431 return readl(addr);
3532 }
3633 EXPORT_SYMBOL(ioread32);
3734
38
-unsigned int ioread32be(void __iomem *addr)
35
+unsigned int ioread32be(const void __iomem *addr)
3936 {
4037 return be32_to_cpu(__raw_readl(addr));
4138 }
....@@ -77,7 +74,7 @@
7774 * convert to CPU byte order. We write in "IO byte
7875 * order" (we also don't have IO barriers).
7976 */
80
-static inline void mmio_insb(void __iomem *addr, u8 *dst, int count)
77
+static inline void mmio_insb(const void __iomem *addr, u8 *dst, int count)
8178 {
8279 while (--count >= 0) {
8380 u8 data = __raw_readb(addr);
....@@ -86,7 +83,7 @@
8683 }
8784 }
8885
89
-static inline void mmio_insw(void __iomem *addr, u16 *dst, int count)
86
+static inline void mmio_insw(const void __iomem *addr, u16 *dst, int count)
9087 {
9188 while (--count >= 0) {
9289 u16 data = __raw_readw(addr);
....@@ -95,7 +92,7 @@
9592 }
9693 }
9794
98
-static inline void mmio_insl(void __iomem *addr, u32 *dst, int count)
95
+static inline void mmio_insl(const void __iomem *addr, u32 *dst, int count)
9996 {
10097 while (--count >= 0) {
10198 u32 data = __raw_readl(addr);
....@@ -128,19 +125,19 @@
128125 }
129126 }
130127
131
-void ioread8_rep(void __iomem *addr, void *dst, unsigned long count)
128
+void ioread8_rep(const void __iomem *addr, void *dst, unsigned long count)
132129 {
133130 mmio_insb(addr, dst, count);
134131 }
135132 EXPORT_SYMBOL(ioread8_rep);
136133
137
-void ioread16_rep(void __iomem *addr, void *dst, unsigned long count)
134
+void ioread16_rep(const void __iomem *addr, void *dst, unsigned long count)
138135 {
139136 mmio_insw(addr, dst, count);
140137 }
141138 EXPORT_SYMBOL(ioread16_rep);
142139
143
-void ioread32_rep(void __iomem *addr, void *dst, unsigned long count)
140
+void ioread32_rep(const void __iomem *addr, void *dst, unsigned long count)
144141 {
145142 mmio_insl(addr, dst, count);
146143 }