diff --git a/arch/arc/include/asm/posix_types.h b/arch/arc/include/asm/posix_types.h
index 20415f0705685730369ca3ba8d0f7b2b080cdcda..51347a48d4caa1b18af447f503e1c0cfab89e22e 100644
--- a/arch/arc/include/asm/posix_types.h
+++ b/arch/arc/include/asm/posix_types.h
@@ -16,7 +16,11 @@ typedef int			__kernel_pid_t;
 typedef unsigned short		__kernel_ipc_pid_t;
 typedef unsigned short		__kernel_uid_t;
 typedef unsigned short		__kernel_gid_t;
+#ifdef __GNUC__
+typedef __SIZE_TYPE__		__kernel_size_t;
+#else
 typedef unsigned int		__kernel_size_t;
+#endif
 typedef int			__kernel_ssize_t;
 typedef int			__kernel_ptrdiff_t;
 typedef long			__kernel_time_t;
diff --git a/board/synopsys/axs101/nand.c b/board/synopsys/axs101/nand.c
index c7f90c4400d48a3e5e3a4a08d4a139becb5b4016..ff35286c6efdb2e14474830fc6fc5cee6df9da31 100644
--- a/board/synopsys/axs101/nand.c
+++ b/board/synopsys/axs101/nand.c
@@ -62,8 +62,10 @@ struct nand_bd {
 	uint32_t buffer_ptr1;	/* DES3 */
 };
 
-#define NAND_REG_WRITE(r, v)	writel(v, CONFIG_SYS_NAND_BASE + r)
-#define NAND_REG_READ(r)	readl(CONFIG_SYS_NAND_BASE + r)
+#define NAND_REG_WRITE(r, v)	\
+	writel(v, (volatile void __iomem *)(CONFIG_SYS_NAND_BASE + r))
+#define NAND_REG_READ(r)		\
+	readl((const volatile void __iomem *)(CONFIG_SYS_NAND_BASE + r))
 
 static struct nand_bd *bd;	/* DMA buffer descriptors	*/