]>
Commit | Line | Data |
---|---|---|
3365b4eb MY |
1 | /* |
2 | * On-chip UART initializaion for low-level debugging | |
3 | * | |
4 | * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com> | |
5 | * | |
6 | * SPDX-License-Identifier: GPL-2.0+ | |
7 | */ | |
8 | ||
9 | #include <linux/linkage.h> | |
10 | #include <mach/bcu-regs.h> | |
11 | #include <mach/sc-regs.h> | |
12 | #include <mach/sg-regs.h> | |
94bd3699 MY |
13 | |
14 | #define UART_CLK 36864000 | |
3365b4eb MY |
15 | #include <mach/debug-uart.S> |
16 | ||
17 | ENTRY(setup_lowlevel_debug) | |
18 | ldr r0, =BCSCR5 | |
19 | ldr r1, =0x24440000 | |
20 | str r1, [r0] | |
21 | ||
22 | ldr r0, =SC_CLKCTRL | |
23 | ldr r1, [r0] | |
24 | orr r1, r1, #SC_CLKCTRL_CEN_PERI | |
25 | str r1, [r0] | |
26 | ||
27 | init_debug_uart r0, r1, r2 | |
28 | ||
29 | set_pinsel 63, 0, r0, r1 | |
30 | set_pinsel 64, 1, r0, r1 | |
31 | ||
32 | mov pc, lr | |
33 | ENDPROC(setup_lowlevel_debug) |