- 12 8月, 2019 1 次提交
-
-
由 Simon Glass 提交于
Move env_set() over to the new header file. Acked-by: NJoe Hershberger <joe.hershberger@ni.com> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 08 8月, 2019 2 次提交
-
-
由 Patrick Delaunay 提交于
Avoid to flush buffer when silent console is activated as the console can be reactivate later, after relocation, when the env will be updated with the saved one. Solve issue (missing beginning of U-Boot trace) when: - CONFIG_SILENT_CONSOLE is activated - silent=1 is defined in default environment (CONFIG_EXTRA_ENV_SETTINGS) - silent is removed in saved environment with: > env delete silent; env save Only functional when PRE_CONSOLE_BUFFER is activated. Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Signed-off-by: NPatrice Chotard <patrice.chotard@st.com>
-
由 Patrick Delaunay 提交于
Update the "silent" property with the variable "silent" get from saved environment, it solves the issue when: - CONFIG_SILENT_CONSOLE and CONFIG_SYS_CONSOLE_IS_IN_ENV are activated - silent is not defined in default environment - silent is requested in saved environment with: > env set silent 1; env save On next reboot the console is not disabled as expected after relocation and the environment load from flash (the callback is not called when the INSERT is requested in the created hash table) Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Signed-off-by: NPatrice Chotard <patrice.chotard@st.com>
-
- 26 11月, 2018 1 次提交
-
-
由 Simon Glass 提交于
We support putc() in this case but not puts(), but this is more useful since it is what printf() uses. This particularly affects debugging early in SPL, where currently printf() statements result in no output. Fix this by adding a special case into puts() for sandbox, just like putc(). Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 11 9月, 2018 1 次提交
-
-
由 Patrick Delaunay 提交于
Unify the fgetc function when MUX is activated or not: - always call tstc() : it is the normal behavior expected by serial uclass (call tstc then getc) and that avoids issue when SERIAL_RX_BUFFER is activated - reload WATCHDOG in the char waiting loop This patch allow to have the same behavior when CONSOLE_MUX is activated or not and avoid regression when this feature is deactivated. Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 27 7月, 2018 2 次提交
-
-
由 Joe Hershberger 提交于
In raw mode, handle ctrl-c as normal. This allows normal ctrl-c behavior such as aborting a command that is timing out without completely terminating the sandbox executable. In [1], Simon disabled this. His reason for it was that it interferes with piping test scripts. Piping should be done in cooked mode, so this change should still not interfere. [1] commit 8969ea3e ("sandbox: Disable Ctrl-C") Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
We don't necessarily want to re-enable ctrl-c if it was already disabled when calling tstc(). Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 19 6月, 2018 1 次提交
-
-
由 Simon Glass 提交于
Both putc() and puts() can be called before global_data is set up. Some of the code paths don't handle this correctly. Add an explicit test before any member is accessed. Reported-by: Coverity (CID: 169030) Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
-
- 07 5月, 2018 2 次提交
-
-
由 Tom Rini 提交于
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: NTom Rini <trini@konsulko.com>
-
由 Tom Rini 提交于
With tighter build flags the fact that <stdio_dev.h> doesn't have a reference back to MAX_NAMES causes an error. Include <stdio.h> here and then in common/console.c use MAX_NAMES rather than 3 when working with stdio_names. Reported-by: NPeter Robinson <pbrobinson@gmail.com> Signed-off-by: NTom Rini <trini@konsulko.com> Tested-by: NPeter Robinson <pbrobinson@gmail.com>
-
- 08 12月, 2017 1 次提交
-
-
由 Simon Glass 提交于
While sandbox works OK without the special-case code, it does result in console output being stored in the pre-console buffer while sandbox starts up. If there is a crash or a problem then there is no indication of what is going on. For ease of debugging it seems better to revert this change also. This reverts commit d8c6fb8c. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 13 11月, 2017 1 次提交
-
-
由 Soeren Moch 提交于
This reverts commit c61d0009. A tbs2910 board user reported a very slow console frambuffer as regression in current u-boot. I could bisect this down to the above mentioned commit. This revert brings back the fast framebuffer console (one cache flush per string in puts(), not after each char). Reported-by: NUwe Scheffler <scheffler.u@web.de> Signed-off-by: NSoeren Moch <smoch@web.de> Tested-by: NUwe Scheffler <scheffler.u@web.de> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 28 8月, 2017 1 次提交
-
-
由 Wilson Lee 提交于
The silent environment callback function does not update the silent flag during silent env set or unset. That is because of duplicated CONFIG keyword at preprocessor condition in silent environment callback function and cause silent env callback unable to work. This patch is to remove the duplicated CONFIG keywork in silent environment callback function. Signed-off-by: NWilson Lee <wilson.lee@ni.com> Cc: Keng Soon Cheah <keng.soon.cheah@ni.com> Cc: Chen Yee Chew <chen.yee.chew@ni.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
-
- 16 8月, 2017 2 次提交
-
-
由 Simon Glass 提交于
We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: NWolfgang Denk <wd@denx.de> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: NWolfgang Denk <wd@denx.de> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 01 8月, 2017 2 次提交
-
-
由 Simon Glass 提交于
With driver model the serial device is often not called "serial". Mark driver-model stdio devices so that they can be detected and we can look up the uclass. This is a more reliable way of finding out whether the console is connected to a serial device or not. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Put the check for whether a console is a serial device in a function so that we can share the code in the two places that use it. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 29 7月, 2017 1 次提交
-
-
由 Masahiro Yamada 提交于
Current puts() and putc() have similar #ifdef / if() conditionals. Make puts() iterate over putc() to avoid code duplication. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 12 7月, 2017 3 次提交
-
-
由 Simon Glass 提交于
At present sandbox has a special case where it directly calls os_putc() when it does not have a console yet. Now that we have the pre-console buffer enabled we can drop this. Any early characters will be buffered and output later. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com> Tested-by: NStephen Warren <swarren@nvidia.com>
-
由 Simon Glass 提交于
At present this feature casts the address to a pointer. Use the map_sysmem() function so that it will work correctly on sandbox. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com> Tested-by: NBin Meng <bmeng.cn@gmail.com> Tested-by: NStephen Warren <swarren@nvidia.com>
-
由 Simon Glass 提交于
At present the U-Boot banner is only displayed on the serial console. If this is not visible to the user, the banner does not show. Some devices have a video display which can usefully display this information. Add a banner which is printed after relocation only on non-serial devices if CONFIG_DISPLAY_BOARDINFO_LATE is defined. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com> Tested-by: NBin Meng <bmeng.cn@gmail.com> Tested-by: NStephen Warren <swarren@nvidia.com>
-
- 06 2月, 2017 1 次提交
-
-
由 Simon Glass 提交于
CONFIG_CONSOLE_MUX and CONFIG_SYS_CONSOLE_IS_IN_ENV are not applicable for SPL. Update the console code to use CONFIG_IS_ENABLED(), so that these options will be inactive in SPL. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
-
- 24 10月, 2016 2 次提交
-
-
由 Simon Glass 提交于
Move these option to Kconfig and tidy up existing uses. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NJagan Teki <jteki@openedev.com>
-
由 Simon Glass 提交于
Move these option to Kconfig and tidy up existing uses. The Power PC boards don't have a suitable common element: the common header files don't appear to line up with the Kconfig files as far as I can tell. This results in a lot of defconfig changes. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NJagan Teki <jteki@openedev.com> [trini: Re-migrate, update common/console.c logic] Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 18 10月, 2016 1 次提交
-
-
由 Andreas J. Reichel 提交于
Hardware: CM-FX6 Module from Compulab This patch fixes unwanted watchdog resets while the user enters a command at the U-Boot prompt. As found on the CM-FX6 board from Compulab, when having enabled the watchdog, a missing WATCHDOG_RESET call in common/console.c causes this and alike boards to reset when the watchdog's timeout has elapsed while waiting at the U-Boot prompt. Despite the user could press several keys within the watchdog timeout limit, the while loop in cli_readline.c, line 261, does only call WATCHDOG_RESET if first == 1, which gets set to 0 in the 1st loop iteration. This leads to a watchdog timeout no matter if the user presses keys or not. Although, this affects other boards as well as it touches common/console.c, the macro WATCHDOG_RESET expands to {} if watchdog support isn't configured. Hence, there's no harm caused and no need to surround it by #ifdef in this case. * Symptom: U-Boot resets after watchdog times out when in commandline prompt and watchdog is enabled. * Reasoning: When U-Boot shows the commandline prompt, the following function call stack is executed while waiting for a keypress: common/main.c: main_loop => common/cli.c: cli_loop() => common/cli_hush.c: parse_file_outer => parse_stream_outer => parse_stream => b_getch(i) => i->get(i) => file_get => get_user_input => cmdedit_read_input => uboot_cli_readline => common/cli_readline.c: cli_readline => cli_readline_into_buffer => cread_line => getcmd_getch (== getc) => common/console.c: fgetc => console_tstc common/console.c: (with CONFIG_CONSOLE_MUX is set) - in console_tstc line 181: If dev->tstc(dev) returns 0, the global tstcdev variable doesn't get set. This is the case if no character is in the serial buffer. - in fgetc(int file), line 297: Program flow keeps looping because tstcdev does not get set. Therefore WATCHDOG_RESET is not called, as mx_serial_tstc from drivers/serial/serial_mxc.c does not call it. * Solution: Add WATCHDOG_RESET into the loop of console_tstc. Note: Macro expands to {} if not configured, so no #ifdef is needed. * Comment: Signed-off-by: NChristian Storm <christian.storm@tngtech.com> Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAndreas J. Reichel <Andreas.Reichel@tngtech.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
- 07 10月, 2016 1 次提交
-
-
由 Chris Packham 提交于
When CONFIG_SILENT_CONSOLE is defined and the default environment has silent=1 it is not possible for a user to make the console un-silent if the environment is not available when console_init_f() is called (for example because the environment is in SPI). Add a new helper function console_update_silent() and call it from both console_init_f() and console_init_r(). Signed-off-by: NChris Packham <judge.packham@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 27 3月, 2016 1 次提交
-
-
由 Bin Meng 提交于
Since commit b391d743 "debug_uart: output CR along with LF", the handling in puts() is duplicated, not to mention that it should output carriage return before line feed. Signed-off-by: NBin Meng <bmeng.cn@gmail.com> Reviewed-by: NTom Rini <trini@konsulko.com>
-
- 12 2月, 2016 1 次提交
-
-
由 Simon Glass 提交于
Boards with a saved environment may use 'lcd' in their stdout environment variable, expecting that this will enable output to the LCD. When the board moves to use driver model for video, this will no-longer work. Add a work-around to fix this. A warning messages is printed, and we will remove the work-around at the end of 2016. Signed-off-by: NSimon Glass <sjg@chromium.org> Acked-by: NAnatolij Gustschin <agust@denx.de> Tested-by: NStephen Warren <swarren@nvidia.com>
-
- 25 1月, 2016 1 次提交
-
-
由 Tom Rini 提交于
clang-3.8 reports that these functions are unused, remove them. As this is the last part of CONFIG_MODEM_SUPPORT_DEBUG, drop that from README. Reviewed-by: NBin Meng <bmeng.cn@gmail.com> Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 23 11月, 2015 3 次提交
-
-
由 Stefan Roese 提交于
This patch adds a small printf() version that supports all basic formats. Its intented to be used in U-Boot SPL versions on platforms with very limited internal RAM sizes. To enable it, just define CONFIG_USE_TINY_PRINTF in your defconfig. This will result in the SPL using this tiny function and the main U-Boot still using the full-blown printf() function. This code was copied from: http://www.sparetimelabs.com/printfrevisited With mostly only coding style related changes so that its checkpatch clean. The size reduction is about 2.5KiB. Here a comparison for the db-mv784mp-gp (Marvell AXP) SPL: Without this patch: 58963 18536 1928 79427 13643 ./spl/u-boot-spl With this patch: 56542 18536 1956 77034 12cea ./spl/u-boot-spl Note: To make it possible to compile tiny-printf.c instead of vsprintf.c when CONFIG_USE_TINY_PRINTF is defined, the functions printf() and vprintf() are moved from common/console.c into vsprintf.c in this patch. Signed-off-by: NStefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Tom Rini <trini@konsulko.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
-
由 Stefan Roese 提交于
Change some comments to match the U-Boot coding style rules. Signed-off-by: NStefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Stefan Roese 提交于
As done in commit da229e4e [sandbox: Drop special-case sandbox console code], this patch drops the sandbox special-case code in vprintf() that was missed by Simon at that time. Signed-off-by: NStefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: NSimon Glass <sjg@chromium.org>
-
- 20 11月, 2015 2 次提交
-
-
由 Simon Glass 提交于
It is useful to be able to record console output and provide console input via a buffer. This provides sandbox with the ability to run a command and check its output. If the console is set to silent then no visible output is generated. This also provides a means to fix the problem where tests produce unwanted output, such as errors or warnings. This can be confusing. We can instead set the console to silent and record this output. It can be checked later in the test if required. It is possible that this may prove useful for non-test situations. For example the console output may be suppressed for normal operations, but recorded and stored for access by the OS. That feature is not implemented at present. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
The console includes a global variable and several functions that are only used by a small subset of U-Boot files. Before adding more functions, move the definitions into their own header file. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 22 7月, 2015 2 次提交
-
-
由 Simon Glass 提交于
At present printf() skips output if it can see there is no console. This is really just an optimisation, and is not necessary. Also it is currently incorrect in some cases. Rather than update the logic, just remove it so that we don't need to keep it in sync. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
When there is no console ready, allow the debug UART to be used for output. This makes debugging of early code considerably easier. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 20 5月, 2015 1 次提交
-
-
由 Hans de Goede 提交于
On my A10 OlinuxIno Lime I noticed a huge (5+ seconds) delay coming from console_init_r. This turns out to be caused by the preconsole buffer flushing to the cfb_console. The Lime only has a 16 bit memory bus and that is already heavy used to scan out the 1920x1080 framebuffer. The problem is that print_pre_console_buffer() was printing the buffer once character at a time and the cfb_console code then ends up doing a cache-flush for touched display lines for each character. This commit fixes this by first building a 0 terminated buffer and then printing it in one puts() call, avoiding unnecessary cache flushes. This changes the time for the flush from 5+ seconds to not noticable. The downside of this approach is that the pre-console buffer needs to fit on the stack, this is not that much to ask since we are talking about plain text here. This commit also adjusts the sunxi CONFIG_PRE_CON_BUF_SZ to actually fit on the stack. Sunxi currently is the only user of the pre-console code so no other boards need to be adjusted. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NTom Rini <trini@konsulko.com>
-
- 30 1月, 2015 1 次提交
-
-
由 Martin Dorwig 提交于
this is an atempt to make the export of functions typesafe. I replaced the jumptable void ** by a struct (jt_funcs) with function pointers. The EXPORT_FUNC macro now has 3 fixed parameters and one variadic parameter The first is the name of the exported function, the rest of the parameters are used to format a functionpointer in the jumptable, the EXPORT_FUNC macros are expanded three times, 1. to declare the members of the struct 2. to initialize the structmember pointers 3. to call the functions in stubs.c Signed-off-by: NMartin Dorwig <dorwig@tetronik.com> Acked-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NSimon Glass <sjg@chromium.org> (resending to the list since my tweaks are not quite trivial)
-
- 14 1月, 2015 1 次提交
-
-
由 Siarhei Siamashka 提交于
Currently the pre-console buffer can accumulate early log messages and flush them to the serial console as soon as it becomes available. This patch just adds one more pre-console buffer flushing point and does all the same for the other consoles too. This is particularly useful for the vga/hdmi/lcd console, where we can see all the older messages now (except for the log messages from SPL). Naturally, we don't want to get an extra copy of the log messages on the serial console again at the second flushing point, so the serial console has to be explicitly filtered out. Signed-off-by: NSiarhei Siamashka <siarhei.siamashka@gmail.com> Acked-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NTom Rini <trini@ti.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
-
- 08 12月, 2014 1 次提交
-
-
由 Simon Glass 提交于
Commit 709ea543 made a subtle change to the way the U-Boot API jump table is set up. So at present putc(), getc(), tstc() and puts() do not work correctly from functions that use the U-Boot API. Previously these were set to the stdio functions, but these now take a parameter specifying which stdio device to use. Instead, we should change them to use the global functions which do not have a parameter. This is a slight change in behaviour. The functions will now output to all selected stdio devices - for example putc() will output a character to all devices selected by stdout. However in most cases there is only one, and it isn't necessarily incorrect behaviour anyway. The API version is not changed since it is compatible with what was there before. Reported-by: NMartin Dorwig <dorwig@tektronik.com> Signed-off-by: NSimon Glass <sjg@chromium.org>
-