Message ID | 20210930115202.447083-1-tekkamanv@163.com |
---|---|
State | Superseded |
Delegated to: | Andes |
Headers | show |
Series | riscv: add #define in asm/io.h for some device drivers | expand |
Hi Wei, On Thu, Sep 30, 2021 at 7:52 PM <tekkamanv@163.com> wrote: > > From: TekkamanV <tekkamanv@starfivetech.com> > > This patch add memcpy_fromio and memcpy_toio definitions for some device %s/add/adds > drivers which has these definitions, like cadence_qspi_apb.c %s/has/have > > Signed-off-by: TekkamanV <tekkamanv@starfivetech.com> Please use real name for the contribution, i.e.: following kernel submitting-patches.rst https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n409 > --- > arch/riscv/include/asm/io.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/riscv/include/asm/io.h b/arch/riscv/include/asm/io.h > index acf5a96449..b693fd8cd6 100644 > --- a/arch/riscv/include/asm/io.h > +++ b/arch/riscv/include/asm/io.h > @@ -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 some drivers, like 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() Otherwise, LGTM: Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Regards, Bin
diff --git a/arch/riscv/include/asm/io.h b/arch/riscv/include/asm/io.h index acf5a96449..b693fd8cd6 100644 --- a/arch/riscv/include/asm/io.h +++ b/arch/riscv/include/asm/io.h @@ -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 some drivers, like 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()