]> git.karo-electronics.de Git - karo-tx-uboot.git/blob - arch/arm/mach-uniphier/ph1-pro4/lowlevel_debug.S
ARM: uniphier: fix glitch signal problem for low-level debug
[karo-tx-uboot.git] / arch / arm / mach-uniphier / ph1-pro4 / 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/sc-regs.h>
12 #include <mach/sg-regs.h>
13
14 #define UART_CLK                73728000
15 #include <mach/debug-uart.S>
16
17 ENTRY(setup_lowlevel_debug)
18                 /* UART Port 0 */
19                 sg_set_pinsel   127, 0, 4, 8, r0, r1
20                 sg_set_pinsel   128, 0, 4, 8, r0, r1
21
22                 ldr             r0, =SG_LOADPINCTRL
23                 mov             r1, #1
24                 str             r1, [r0]
25
26                 ldr             r0, =SC_CLKCTRL
27                 ldr             r1, [r0]
28                 orr             r1, r1, #SC_CLKCTRL_CEN_PERI
29                 str             r1, [r0]
30
31                 init_debug_uart r0, r1, r2
32
33                 mov             pc, lr
34 ENDPROC(setup_lowlevel_debug)