Commit f8f60615 authored by Linus Walleij's avatar Linus Walleij Committed by Mark Brown

regmap/hexagon: Properly fix the generic IO helpers

I was too naive in just including <asm-generic/io.h> into
hexagon: one has to specify defines for every call that uses
a (static) inline or this will not work.

Fix it up by providing proper defines for all shorthands that
hexagon provides.

Compile-tested with hexagon LLVM which is the only working cross
compiler for hexagon ATM after commenting out the
-fno-inline-functions-called-once switch which isn't working
with LLVM.

Cc: Brian Cain <bcain@quicinc.com>
Cc: linux-hexagon@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
Fixes: 81c0386c ("regmap: mmio: Support accelerared noinc operations")
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220818121227.151016-1-linus.walleij@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 81c0386c
......@@ -308,6 +308,29 @@ static inline void outsl(unsigned long port, const void *buffer, int count)
}
}
/*
* These defines are necessary to use the generic io.h for filling in
* the missing parts of the API contract. This is because the platform
* uses (inline) functions rather than defines and the generic helper
* fills in the undefined.
*/
#define virt_to_phys virt_to_phys
#define phys_to_virt phys_to_virt
#define memset_io memset_io
#define memcpy_fromio memcpy_fromio
#define memcpy_toio memcpy_toio
#define readb readb
#define readw readw
#define readl readl
#define writeb writeb
#define writew writew
#define writel writel
#define insb insb
#define insw insw
#define insl insl
#define outsb outsb
#define outsw outsw
#define outsl outsl
#include <asm-generic/io.h>
#endif /* __KERNEL__ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment