The idea is good, but it would be nice if we just somehow use a commonYes, makes sense. Maybe __arch_inw() then? Not great either, but I think
asm-generic io.h definition directly in logic_pio.c, like:
asm-generic io.h:
#ifndef __raw_inw // name?
#define __raw_inw __raw_inw
static inline u16 __raw_inw(unsigned long addr)
{
u16 val;
__io_pbr();
val = __le16_to_cpu(__raw_readw(addr));
__io_par(val);
return val;
}
#endif
#include <linux/logic_pio.h>
#ifndef inw
#define inw __raw_inw
#endif
that's better than __raw_inw() because __raw_* would sound like it
mirrors __raw_readl() that lacks the barriers and byteswaps.