summaryrefslogtreecommitdiff
path: root/arch/sh/lib/io.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2025-03-10 21:42:23 +0100
committerArnd Bergmann <arnd@arndb.de>2025-03-11 10:41:18 +0100
commit2494fce26e434071a7ce994f3e4e89a310249f3b (patch)
treeafa5f205511de22692dffec71d381a620814f809 /arch/sh/lib/io.c
parent5c35018a54d8a45ea910210a0fcc0ab1af8d770c (diff)
sh: remove duplicate ioread/iowrite helpers
The ioread/iowrite functions on sh only do memory mapped I/O like the generic verion, and never map onto non-MMIO inb/outb variants, so they just add complexity. In particular, the use of asm-generic/iomap.h ties the declaration to the x86 implementation. Remove the custom versions and use the architecture-independent fallback code instead. Some of the calling conventions on sh are different here, so fix that by adding 'volatile' keywords where required by the generic implementation and change the cpg clock driver to no longer depend on the interesting choice of return types for ioread8/ioread16/ioread32. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/sh/lib/io.c')
-rw-r--r--arch/sh/lib/io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/lib/io.c b/arch/sh/lib/io.c
index ebcf7c0a7335..dc6345e4c53b 100644
--- a/arch/sh/lib/io.c
+++ b/arch/sh/lib/io.c
@@ -11,7 +11,7 @@
#include <linux/module.h>
#include <linux/io.h>
-void __raw_readsl(const void __iomem *addr, void *datap, int len)
+void __raw_readsl(const volatile void __iomem *addr, void *datap, int len)
{
u32 *data;
@@ -60,7 +60,7 @@ void __raw_readsl(const void __iomem *addr, void *datap, int len)
}
EXPORT_SYMBOL(__raw_readsl);
-void __raw_writesl(void __iomem *addr, const void *data, int len)
+void __raw_writesl(volatile void __iomem *addr, const void *data, int len)
{
if (likely(len != 0)) {
int tmp1;