diff --git a/arch/nios2/cpu/interrupts.c b/arch/nios2/cpu/interrupts.c
index 9d85eb03a6e813f6def8463dc5597f87387e9e55..1599674353c6b80214260185329c415f8e7f7e6e 100644
--- a/arch/nios2/cpu/interrupts.c
+++ b/arch/nios2/cpu/interrupts.c
@@ -8,12 +8,12 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
+#include <command.h>
 #include <asm/nios2.h>
 #include <asm/types.h>
 #include <asm/io.h>
 #include <asm/ptrace.h>
-#include <common.h>
-#include <command.h>
 
 /*************************************************************************/
 struct	irq_action {
diff --git a/arch/nios2/include/asm/io.h b/arch/nios2/include/asm/io.h
index 69ab23e5f0ab604b718b728cffea04b07efa5bee..b4bd20f475dc2d41a893ce9e6f18e66994f6c3e0 100644
--- a/arch/nios2/include/asm/io.h
+++ b/arch/nios2/include/asm/io.h
@@ -42,6 +42,11 @@ static inline phys_addr_t virt_to_phys(void * vaddr)
 	return (phys_addr_t)(vaddr);
 }
 
+static inline void *ioremap(unsigned long physaddr, unsigned long size)
+{
+	return (void *)(IO_REGION_BASE | physaddr);
+}
+
 extern unsigned char inb (unsigned char *port);
 extern unsigned short inw (unsigned short *port);
 extern unsigned inl (unsigned port);