]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: add #define in asm/io.h for some device drivers
authorWei Fu <wefu@redhat.com>
Sat, 23 Oct 2021 16:31:12 +0000 (00:31 +0800)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Mon, 8 Nov 2021 07:35:55 +0000 (15:35 +0800)
This patch adds memcpy_fromio and memcpy_toio definitions for some device
drivers which have these definitions, like cadence_qspi_apb.c

Signed-off-by: Wei Fu <wefu@redhat.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/riscv/include/asm/io.h

index 3540773c4fea4ab1bafb2c4ec3c71d2913ec9cbb..fc39bb2c701ef42a00686f7ab316a7dc4656e062 100644 (file)
@@ -64,6 +64,10 @@ static inline phys_addr_t map_to_sysmem(const void *ptr)
 #define __raw_readl(a)                 __arch_getl(a)
 #define __raw_readq(a)                 __arch_getq(a)
 
+/* adding for cadence_qspi_apb.c */
+#define memcpy_fromio(a, c, l)         memcpy((a), (c), (l))
+#define memcpy_toio(c, a, l)           memcpy((c), (a), (l))
+
 #define dmb()          mb()
 #define __iormb()      rmb()
 #define __iowmb()      wmb()