Commit afee59cd49449e7b7d538d919b6e8ab5184e5b93
Committed by
Tom Rini
1 parent
196311dc72
Exists in
v2017.01-smarct4x
and in
40 other branches
keystone: init: enable UART1 to be able use it from kernel
Currently PWREMU_MGMT is not configured in the Linux generic UART driver as this register seems to be specific TI UART IP. So this needs to be enabled in u-boot to use UART1 from kernel space. Acked-By: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Showing 4 changed files with 14 additions and 3 deletions Side-by-side Diff
arch/arm/cpu/armv7/keystone/init.c
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | */ |
9 | 9 | |
10 | 10 | #include <common.h> |
11 | +#include <ns16550.h> | |
11 | 12 | #include <asm/io.h> |
12 | 13 | #include <asm/arch/clock.h> |
13 | 14 | #include <asm/arch/hardware.h> |
... | ... | @@ -29,6 +30,14 @@ |
29 | 30 | share_all_segments(10); /* QM PDSP */ |
30 | 31 | share_all_segments(11); /* PCIE */ |
31 | 32 | #endif |
33 | + | |
34 | + /* | |
35 | + * just initialise the COM2 port so that TI specific | |
36 | + * UART register PWREMU_MGMT is initialized. Linux UART | |
37 | + * driver doesn't handle this. | |
38 | + */ | |
39 | + NS16550_init((NS16550_t)(CONFIG_SYS_NS16550_COM2), | |
40 | + CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE); | |
32 | 41 | |
33 | 42 | return 0; |
34 | 43 | } |
arch/arm/include/asm/arch-keystone/hardware-k2hk.h
arch/arm/include/asm/arch-keystone/hardware.h
include/configs/k2hk_evm.h
... | ... | @@ -71,7 +71,8 @@ |
71 | 71 | #define CONFIG_SYS_NS16550_SERIAL |
72 | 72 | #define CONFIG_SYS_NS16550_MEM32 |
73 | 73 | #define CONFIG_SYS_NS16550_REG_SIZE -4 |
74 | -#define CONFIG_SYS_NS16550_COM1 K2HK_UART0_BASE | |
74 | +#define CONFIG_SYS_NS16550_COM1 KS2_UART0_BASE | |
75 | +#define CONFIG_SYS_NS16550_COM2 KS2_UART1_BASE | |
75 | 76 | #define CONFIG_SYS_NS16550_CLK clk_get_rate(K2HK_CLK1_6) |
76 | 77 | #define CONFIG_CONS_INDEX 1 |
77 | 78 | #define CONFIG_BAUDRATE 115200 |