ARM: uniphier: fix glitch signal problem for low-level debug
[platform/kernel/u-boot.git] / arch / arm / mach-uniphier / ph1-sld8 / lowlevel_debug.S
1 /*
2  * On-chip UART initializaion for low-level debugging
3  *
4  * Copyright (C) 2014 Panasonic Corporation
5  *   Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
6  *
7  * SPDX-License-Identifier:     GPL-2.0+
8  */
9
10 #include <linux/linkage.h>
11 #include <mach/sg-regs.h>
12
13 #define UART_CLK                80000000
14 #include <mach/debug-uart.S>
15
16 ENTRY(setup_lowlevel_debug)
17                 ldr             r0, =SG_IECTRL
18                 ldr             r1, [r0]
19                 orr             r1, r1, #1
20                 str             r1, [r0]
21
22                 /* UART Port 0 */
23                 sg_set_pinsel   70, 3, 8, 4, r0, r1
24                 sg_set_pinsel   71, 3, 8, 4, r0, r1
25
26                 init_debug_uart r0, r1, r2
27
28                 mov             pc, lr
29 ENDPROC(setup_lowlevel_debug)