Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0560cf5a authored by Russell King's avatar Russell King Committed by Russell King
Browse files

[ARM] Add a common typesafe __io implementation



As Al did for Versatile in 2ad4f86b,
add a typesafe __io implementation for platforms to use.  Convert
platforms to use this new simple typesafe implementation.

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent cd32a48d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -79,6 +79,14 @@ extern void __iounmap(volatile void __iomem *addr);
 */
extern void __readwrite_bug(const char *fn);

/*
 * A typesafe __io() helper
 */
static inline void __iomem *__typesafe_io(unsigned long addr)
{
	return (void __iomem *)addr;
}

/*
 * Now, pick up the machine-defined IO definitions
 */
+2 −2
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
 * We don't actually have real ISA nor PCI buses, but there is so many
 * drivers out there that might just work if we fake them...
 */
#define __io(a)			((void __iomem *)(a))
#define __io(a)		__typesafe_io(a)
#define __mem_pci(a)	(a)

#endif
+2 −2
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@

#define IO_SPACE_LIMIT		0xFFFFFFFF

#define __io(a)			((void __iomem *)(a))
#define __io(a)		__typesafe_io(a)
#define __mem_pci(a)	(a)


+2 −2
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@

#define IO_SPACE_LIMIT 0xffffffff

#define __io(a)			((void __iomem *)(a))
#define __io(a)		__typesafe_io(a)
#define __mem_pci(a)	(a)

/*
+1 −2
Original line number Diff line number Diff line
@@ -29,8 +29,7 @@
 * We don't actually have real ISA nor PCI buses, but there is so many
 * drivers out there that might just work if we fake them...
 */
#define PCIO_BASE               0
#define __io(a)			((void __iomem *)(PCIO_BASE + (a)))
#define __io(a)			__typesafe_io(a)
#define __mem_pci(a)		(a)
#define __mem_isa(a)		(a)

Loading