Commit af282245462186b8b06047c379ee85f4d0ec7a9c
1 parent
a59abd1049
Exists in
v2017.01-smarct4x
and in
35 other branches
sandbox: Move CONFIG_SANDBOX_SERIAL to Kconfig
Move this over to Kconfig and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
Showing 5 changed files with 30 additions and 3 deletions Side-by-side Diff
configs/sandbox_defconfig
drivers/serial/Kconfig
... | ... | @@ -76,6 +76,26 @@ |
76 | 76 | value. Use this value to specify the shift to use, where 0=byte |
77 | 77 | registers, 2=32-bit word registers, etc. |
78 | 78 | |
79 | +config SANDBOX_SERIAL | |
80 | + bool "Sandbox UART support" | |
81 | + depends on SANDBOX && DM | |
82 | + help | |
83 | + Select this to enable a seral UART for sandbox. This is required to | |
84 | + operate correctly, otherwise you will see no serial output from | |
85 | + sandbox. The emulated UART will display to the console and console | |
86 | + input will be fed into the UART. This allows you to interact with | |
87 | + U-Boot. | |
88 | + | |
89 | + The operation of the console is controlled by the -t command-line | |
90 | + flag. In raw mode, U-Boot sees all characters from the terminal | |
91 | + before they are processed, including Ctrl-C. In cooked mode, Ctrl-C | |
92 | + is processed by the terminal, and terminates U-Boot. Valid options | |
93 | + are: | |
94 | + | |
95 | + -t raw-with-sigs Raw mode, Ctrl-C will terminate U-Boot | |
96 | + -t raw Raw mode, Ctrl-C is processed by U-Boot | |
97 | + -t cooked Cooked mode, Ctrl-C terminates | |
98 | + | |
79 | 99 | config UNIPHIER_SERIAL |
80 | 100 | bool "Support for UniPhier on-chip UART" |
81 | 101 | depends on ARCH_UNIPHIER && DM_SERIAL |
drivers/serial/serial-uclass.c
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | struct udevice *dev; |
33 | 33 | int node; |
34 | 34 | |
35 | - if (OF_CONTROL) { | |
35 | + if (OF_CONTROL && gd->fdt_blob) { | |
36 | 36 | /* Check for a chosen console */ |
37 | 37 | node = fdtdec_get_chosen_node(gd->fdt_blob, "stdout-path"); |
38 | 38 | if (node < 0) |
... | ... | @@ -54,7 +54,8 @@ |
54 | 54 | return; |
55 | 55 | } |
56 | 56 | } |
57 | - } else { | |
57 | + } | |
58 | + if (!SPL_BUILD || !OF_CONTROL || !gd->fdt_blob) { | |
58 | 59 | /* |
59 | 60 | * Try to use CONFIG_CONS_INDEX if available (it is numbered |
60 | 61 | * from 1!). |
include/configs/sandbox.h
include/fdtdec.h