summaryrefslogtreecommitdiff
path: root/arch/arm/mach-nexell/reg-call.S
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-07-29 09:26:11 -0400
committerTom Rini <trini@konsulko.com>2020-07-29 09:26:11 -0400
commit423e08cb77015beab6a81595765ec1faa34bedde (patch)
tree268fb246e025b8a5fc4eddc3c207ef428f16eb68 /arch/arm/mach-nexell/reg-call.S
parent3b191c56c841596771b4120f09fb556adf958b5c (diff)
parent3fad1ca28d4c87346d18b89438bf2084fb2c3896 (diff)
Merge branch '2020-07-28-misc-soc-improvements'
- Assorted MediaTek improvements - s5p4418 support - QEMU ARM platform improvements - Qualcomm IPQ40xx support
Diffstat (limited to 'arch/arm/mach-nexell/reg-call.S')
-rw-r--r--arch/arm/mach-nexell/reg-call.S23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-nexell/reg-call.S b/arch/arm/mach-nexell/reg-call.S
new file mode 100644
index 0000000000..5fdf51520d
--- /dev/null
+++ b/arch/arm/mach-nexell/reg-call.S
@@ -0,0 +1,23 @@
+#include <asm-offsets.h>
+#include <config.h>
+#include <linux/linkage.h>
+
+#define ___asm_opcode_identity32(x) ((x) & 0xFFFFFFFF)
+#define __opcode_to_mem_arm(x) ___opcode_identity32(x)
+#define ___asm_opcode_to_mem_arm(x) ___asm_opcode_identity32(x)
+
+#define ___opcode_identity32(x) ((u32)(x))
+#define ___inst_arm(x) .long x
+#define __inst_arm(x) ___inst_arm(___asm_opcode_to_mem_arm(x))
+
+#define __inst_arm_thumb32(arm_opcode, thumb_opcode) __inst_arm(arm_opcode)
+
+#define __SMC(imm4) __inst_arm_thumb32( \
+ 0xE1600070 | (((imm4) & 0xF) << 0), \
+ 0xF7F08000 | (((imm4) & 0xF) << 16) \
+)
+
+ENTRY(__invoke_nexell_fn_smc)
+ __SMC(0)
+ bx lr
+ENDPROC(__invoke_nexell_fn_smc)