<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/console.c, branch v2017.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>Convert CONSOLE_PRE_CONSOLE_BUFFER options to Kconfig</title>
<updated>2016-10-23T22:33:19+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-10-18T02:12:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8f925584145efecd9a6323801689cffd69cf0b09'/>
<id>8f925584145efecd9a6323801689cffd69cf0b09</id>
<content type='text'>
Move these option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move these option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert SILENT_CONSOLE options to Kconfig</title>
<updated>2016-10-23T22:33:18+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-10-18T02:12:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=98af87997670af840ef178f76b4d6888534a6700'/>
<id>98af87997670af840ef178f76b4d6888534a6700</id>
<content type='text'>
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: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
[trini: Re-migrate, update common/console.c logic]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
[trini: Re-migrate, update common/console.c logic]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>watchdog: Fix Watchdog Reset while in U-Boot Prompt</title>
<updated>2016-10-18T01:31:01+00:00</updated>
<author>
<name>Andreas J. Reichel</name>
<email>Andreas.Reichel@tngtech.com</email>
</author>
<published>2016-07-13T10:56:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=644074671e702e8dc0ef642b353845a40f8053da'/>
<id>644074671e702e8dc0ef642b353845a40f8053da</id>
<content type='text'>
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          =&gt; common/cli.c: cli_loop() =&gt;
   common/cli_hush.c:
                    parse_file_outer   =&gt; parse_stream_outer       =&gt;
                    parse_stream       =&gt; b_getch(i)               =&gt;
                    i-&gt;get(i)          =&gt; file_get                 =&gt;
                    get_user_input     =&gt; cmdedit_read_input       =&gt;
                    uboot_cli_readline =&gt;
   common/cli_readline.c:
                    cli_readline       =&gt; cli_readline_into_buffer =&gt;
                    cread_line         =&gt; getcmd_getch (== getc)   =&gt;
   common/console.c:
                    fgetc              =&gt; console_tstc

   common/console.c:
   (with CONFIG_CONSOLE_MUX is set)

   - in console_tstc line 181:
   If dev-&gt;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: Christian Storm &lt;christian.storm@tngtech.com&gt;
Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Signed-off-by: Andreas J. Reichel &lt;Andreas.Reichel@tngtech.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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          =&gt; common/cli.c: cli_loop() =&gt;
   common/cli_hush.c:
                    parse_file_outer   =&gt; parse_stream_outer       =&gt;
                    parse_stream       =&gt; b_getch(i)               =&gt;
                    i-&gt;get(i)          =&gt; file_get                 =&gt;
                    get_user_input     =&gt; cmdedit_read_input       =&gt;
                    uboot_cli_readline =&gt;
   common/cli_readline.c:
                    cli_readline       =&gt; cli_readline_into_buffer =&gt;
                    cread_line         =&gt; getcmd_getch (== getc)   =&gt;
   common/console.c:
                    fgetc              =&gt; console_tstc

   common/console.c:
   (with CONFIG_CONSOLE_MUX is set)

   - in console_tstc line 181:
   If dev-&gt;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: Christian Storm &lt;christian.storm@tngtech.com&gt;
Signed-off-by: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Signed-off-by: Andreas J. Reichel &lt;Andreas.Reichel@tngtech.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common/console.c: ensure GD_FLG_SILENT is set or cleared</title>
<updated>2016-10-07T14:26:29+00:00</updated>
<author>
<name>Chris Packham</name>
<email>judge.packham@gmail.com</email>
</author>
<published>2016-09-23T03:59:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=43e0a3dec0a86a4e1a164f0b3839b6f1435c6685'/>
<id>43e0a3dec0a86a4e1a164f0b3839b6f1435c6685</id>
<content type='text'>
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: Chris Packham &lt;judge.packham@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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: Chris Packham &lt;judge.packham@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>debug_uart: Remove duplicated carriage return handling</title>
<updated>2016-03-27T13:12:26+00:00</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2016-03-18T06:59:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ce1a7d1564920e35ad5c7a1f4e68aaec496ec9d4'/>
<id>ce1a7d1564920e35ad5c7a1f4e68aaec496ec9d4</id>
<content type='text'>
Since commit b391d74 "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: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit b391d74 "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: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: video: Add a temporary work-around for old stdout var</title>
<updated>2016-02-11T20:37:17+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-02-06T21:31:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a2931b30d287b709c09f0a4ee7c1d4c26bee69d5'/>
<id>a2931b30d287b709c09f0a4ee7c1d4c26bee69d5</id>
<content type='text'>
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: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Anatolij Gustschin &lt;agust@denx.de&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Anatolij Gustschin &lt;agust@denx.de&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common/console.c: Remove unused inline functions</title>
<updated>2016-01-25T15:39:47+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2016-01-21T14:10:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3da52409250a48423a9297a7afbf1f09d0a855fe'/>
<id>3da52409250a48423a9297a7afbf1f09d0a855fe</id>
<content type='text'>
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: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/tiny-printf.c: Add tiny printf function for space limited environments</title>
<updated>2015-11-23T15:56:07+00:00</updated>
<author>
<name>Stefan Roese</name>
<email>sr@denx.de</email>
</author>
<published>2015-11-23T06:00:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7d9cde1031040a4931d6e12da7d9767b7e1d85d4'/>
<id>7d9cde1031040a4931d6e12da7d9767b7e1d85d4</id>
<content type='text'>
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: Stefan Roese &lt;sr@denx.de&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Hans de Goede &lt;hdegoede@redhat.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Albert Aribaud &lt;albert.u.boot@aribaud.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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: Stefan Roese &lt;sr@denx.de&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Hans de Goede &lt;hdegoede@redhat.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Albert Aribaud &lt;albert.u.boot@aribaud.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common/console.c: Small coding style cleanup</title>
<updated>2015-11-23T15:56:07+00:00</updated>
<author>
<name>Stefan Roese</name>
<email>sr@denx.de</email>
</author>
<published>2015-11-16T14:26:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ddf7355a73f2e01bd8eec4b939d8749ac22ff574'/>
<id>ddf7355a73f2e01bd8eec4b939d8749ac22ff574</id>
<content type='text'>
Change some comments to match the U-Boot coding style rules.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change some comments to match the U-Boot coding style rules.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common/console.c: Drop sandbox special-case console code</title>
<updated>2015-11-23T15:56:06+00:00</updated>
<author>
<name>Stefan Roese</name>
<email>sr@denx.de</email>
</author>
<published>2015-11-16T14:26:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=dd5577703b99170e88fad3994c7865d1e9bc2874'/>
<id>dd5577703b99170e88fad3994c7865d1e9bc2874</id>
<content type='text'>
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: Stefan Roese &lt;sr@denx.de&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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: Stefan Roese &lt;sr@denx.de&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
