diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-06-29 02:38:06 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-06-29 22:31:18 +0900 |
commit | 69492fb4c56d82142e0312474369d8da97d5182d (patch) | |
tree | 2ca572f75e9644a215679dca55e197981f5910cf /arch/arm/mach-uniphier/arm32 | |
parent | e3d5d3ac5bbbddddf830a918e59c13f7a8d9ef6c (diff) |
ARM: uniphier: move sg_set_{pinsel, iectrl} to more relevant places
Move the sg_set_pinsel macro to arch/arm/mach-uniphier/arm32/debug_ll.S
since it is not used anywhere else.
Move the C functions sg_set_{pinsel,iectrl} to debug-uart.c since they
are not used anywhere else.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch/arm/mach-uniphier/arm32')
-rw-r--r-- | arch/arm/mach-uniphier/arm32/debug_ll.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-uniphier/arm32/debug_ll.S b/arch/arm/mach-uniphier/arm32/debug_ll.S index c68522f9c5..e56e1f679c 100644 --- a/arch/arm/mach-uniphier/arm32/debug_ll.S +++ b/arch/arm/mach-uniphier/arm32/debug_ll.S @@ -21,6 +21,14 @@ #define BAUDRATE 115200 #define DIV_ROUND(x, d) (((x) + ((d) / 2)) / (d)) +.macro sg_set_pinsel, pin, muxval, mux_bits, reg_stride, ra, rd + ldr \ra, =(SG_PINCTRL_BASE + \pin * \mux_bits / 32 * \reg_stride) + ldr \rd, [\ra] + and \rd, \rd, #~(((1 << \mux_bits) - 1) << (\pin * \mux_bits % 32)) + orr \rd, \rd, #(\muxval << (\pin * \mux_bits % 32)) + str \rd, [\ra] +.endm + ENTRY(debug_ll_init) ldr r0, =SG_REVISION ldr r1, [r0] |