Skip to content

Commit f8f6061

Browse files
linuswbroonie
authored andcommitted
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 <[email protected]> Cc: [email protected] Cc: Arnd Bergmann <[email protected]> Fixes: 81c0386 ("regmap: mmio: Support accelerared noinc operations") Signed-off-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 81c0386 commit f8f6061

File tree

1 file changed

+23
-0
lines changed
  • arch/hexagon/include/asm

1 file changed

+23
-0
lines changed

arch/hexagon/include/asm/io.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,29 @@ static inline void outsl(unsigned long port, const void *buffer, int count)
308308
}
309309
}
310310

311+
/*
312+
* These defines are necessary to use the generic io.h for filling in
313+
* the missing parts of the API contract. This is because the platform
314+
* uses (inline) functions rather than defines and the generic helper
315+
* fills in the undefined.
316+
*/
317+
#define virt_to_phys virt_to_phys
318+
#define phys_to_virt phys_to_virt
319+
#define memset_io memset_io
320+
#define memcpy_fromio memcpy_fromio
321+
#define memcpy_toio memcpy_toio
322+
#define readb readb
323+
#define readw readw
324+
#define readl readl
325+
#define writeb writeb
326+
#define writew writew
327+
#define writel writel
328+
#define insb insb
329+
#define insw insw
330+
#define insl insl
331+
#define outsb outsb
332+
#define outsw outsw
333+
#define outsl outsl
311334
#include <asm-generic/io.h>
312335

313336
#endif /* __KERNEL__ */

0 commit comments

Comments
 (0)