History log of /rk3399_rockchip-uboot/drivers/serial/serial-uclass.c (Results 1 – 25 of 87)
Revision Date Author Comments
# 7985f374 21-Mar-2025 Damon Ding <damon.ding@rock-chips.com>

dm: serial: set flag GD_FLG_SERIAL_READY if CONFIG_ROCKCHIP_VIDCONSOLE is enabled

For RK platforms, the CONFIG_DEBUG_UART_ALWAYS is enabled by
default, so the GD_FLG_SERIAL_READY will not be set in

dm: serial: set flag GD_FLG_SERIAL_READY if CONFIG_ROCKCHIP_VIDCONSOLE is enabled

For RK platforms, the CONFIG_DEBUG_UART_ALWAYS is enabled by
default, so the GD_FLG_SERIAL_READY will not be set in serial_init()
of drivers/serial/serial_uclass.c, which makes stdout support only
"serial".

If GD_FLG_SERIAL_READY is not set, the console will only use
the function printch() to show the logs. The related codes in
common/console.c are:

void putc(const char c)
......
/* if we don't have a console yet, use the debug UART */
if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) {
printch(c);
return;
}
......
}

In order to show logs on srcreen via the video console, we set
the flag GD_FLG_SERIAL_READY in serial_init() if the config
CONFIG_ROCKCHIP_VIDCONSOLE is enabled.

Change-Id: I4a10ac7a6b1f0798bcf4ebfef11a1214719fe6fc
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>

show more ...


# 5395ac06 12-Oct-2022 Michal Suchanek <msuchanek@suse.de>

UPSTREAM: dm: treewide: Do not use the return value of simple uclass iterator

uclass_first_device/uclass_next_device return value will be removed,
don't use it.

With the current implementation dev

UPSTREAM: dm: treewide: Do not use the return value of simple uclass iterator

uclass_first_device/uclass_next_device return value will be removed,
don't use it.

With the current implementation dev is equivalent to !ret. It is
redundant to check both, ret check can be replaced with dev check, and
ret check inside the iteration is dead code.

Change-Id: Ie500bbed46f8d08721b14b1db7a7be94ea601799
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit 4954937d922840c212b7eba297cc2d4779f087ad)
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>

show more ...


# 7be3d069 18-Apr-2022 Joseph Chen <chenjh@rock-chips.com>

dm: serial: Remove baudrate change callback if CONFIG_DEBUG_UART_ALWAYS=y

Without this patch, it triggers the callback to reinit uart debug baudrate
when preloader baudrate is different from CONFIG_

dm: serial: Remove baudrate change callback if CONFIG_DEBUG_UART_ALWAYS=y

Without this patch, it triggers the callback to reinit uart debug baudrate
when preloader baudrate is different from CONFIG_BAUDRATE.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If0f5c5c9bf2ee673c9c4ccb70dafca730c654d93

show more ...


# 034db995 27-Sep-2020 Joseph Chen <chenjh@rock-chips.com>

dm: serial: support always use uart debug mode

In this mode, uart debug is initialized depends on
configuration from pre-loader or CONFIG_UART_DEBUG_.

The serial is not care about dts "stdout-path"

dm: serial: support always use uart debug mode

In this mode, uart debug is initialized depends on
configuration from pre-loader or CONFIG_UART_DEBUG_.

The serial is not care about dts "stdout-path" and
not register into console framework any more. It's
nice to use pre-loader serial and make serial easy
to configure.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If4c68229d76b6f1710a35e3ef9a2a91cb306fa9c

show more ...


# 8c22eae6 06-Aug-2020 Joseph Chen <chenjh@rock-chips.com>

dm: serial/16550: rollback to upstream version

rollback to: 02234e4 UPSTREAM: usbtty: fix typos

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I84296fad2b06823afc77477ef4ef11a2f80196

dm: serial/16550: rollback to upstream version

rollback to: 02234e4 UPSTREAM: usbtty: fix typos

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I84296fad2b06823afc77477ef4ef11a2f801960a

show more ...


# 558b8198 15-Jun-2020 Joseph Chen <chenjh@rock-chips.com>

dm: serial: introduce DEBUG_UART_ALWAYS_MODE configure

Rename CONSOLE_SERIAL_SKIP_INIT to DEBUG_UART_ALWAYS_MODE for
easy understand.

Select this to always use debug UART, skip complicated
console

dm: serial: introduce DEBUG_UART_ALWAYS_MODE configure

Rename CONSOLE_SERIAL_SKIP_INIT to DEBUG_UART_ALWAYS_MODE for
easy understand.

Select this to always use debug UART, skip complicated
console UART register.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I3c265840bde015fe5fd7c73d959ba0538297b7c2

show more ...


# d45e5655 19-May-2020 Joseph Chen <chenjh@rock-chips.com>

dm: serial: allow skip console serial init

Always use debug uart.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id751856abd7be219e8acb4c5986469a804051934


# e1e9b173 28-Mar-2020 Joseph Chen <chenjh@rock-chips.com>

Merge branch 'next-dev' into thunder-boot


# ebe917bd 07-Jan-2020 Joseph Chen <chenjh@rock-chips.com>

dm: serial: hide and present pinctrl prop in live device tree

1. We bind all serial nodes including UART debug node from kernel dtb.
2. On some rockchip platforms, UART debug and SDMMC pin are multi

dm: serial: hide and present pinctrl prop in live device tree

1. We bind all serial nodes including UART debug node from kernel dtb.
2. On some rockchip platforms, UART debug and SDMMC pin are multiplex.
Without this, iomux is switched from SDMMC => UART debug at this time.
3. We may switch to UART debug iomux after SDMMC boot failed to print log.

fixes: (503458d core: device: allow serial node bind from kernel dtb)

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I286ad49f6c5a7e083d205560a4a16e16ded6b83f

show more ...


# 1a4f6af8 02-Mar-2020 Joseph Chen <chenjh@rock-chips.com>

Merge branch 'next-dev' into thunder-boot


# 7ebffaaf 02-Dec-2019 Joseph Chen <chenjh@rock-chips.com>

dm: serial: add "serial_dev_" API for normal serial device

"serial_" API is designed for UART debug and "serial_stub_" API
is designed for stdio device(e.g. keyboard, video, lcd...).

We need new AP

dm: serial: add "serial_dev_" API for normal serial device

"serial_" API is designed for UART debug and "serial_stub_" API
is designed for stdio device(e.g. keyboard, video, lcd...).

We need new API for normal serial device, e.g. a UART working
with other peripheral device.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ifc2cb2ca9c1d4a395e89ceb5e059ec05a07b1967

show more ...


# 80fe0cff 16-Dec-2019 Joseph Chen <chenjh@rock-chips.com>

dm: serial: bind stdout device anyway

If the console is not marked to be bound, bind it anyway.

This makes serial node in U-Boot dtb no need to be enabled
and bound into dm tree since they are not

dm: serial: bind stdout device anyway

If the console is not marked to be bound, bind it anyway.

This makes serial node in U-Boot dtb no need to be enabled
and bound into dm tree since they are not sured to be the
stdout for pre-loader serial.

This avoids the mix of kernel and U-Boot serial node under
serial uclass list, otherwise serial device bound from U-Boot
dtb always have the higher priority.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4d35626288124d14d47df2e7492d12f1af6a36ae

show more ...


# a5811164 30-Jul-2019 Joseph Chen <chenjh@rock-chips.com>

dm: console/serial: fix flushc() doesn't work

fixes: c1e72b20c91289718b46e1d52185fbef59878daf
(dm: console/serial: add flushc() support)

Change-Id: I0e0fae58b23bad52b4377d00e89f1b055d39f187
Signed-

dm: console/serial: fix flushc() doesn't work

fixes: c1e72b20c91289718b46e1d52185fbef59878daf
(dm: console/serial: add flushc() support)

Change-Id: I0e0fae58b23bad52b4377d00e89f1b055d39f187
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>

show more ...


# c1e72b20 05-May-2019 Joseph Chen <chenjh@rock-chips.com>

dm: console/serial: add flushc() support

Flush console data.

Change-Id: If347b6c8d1126452a1f6386040693b30c66eb5fb
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>


# 064eb493 09-Oct-2018 Joseph Chen <chenjh@rock-chips.com>

serial: ns16550: support using pre-loader serial

- pass pre-loader serial configure by rk atags;
- it depends on serial aliases to find uart port;
- enabled by CONFIG_ROCKCHIP_USING_PRELOADER_SERIAL

serial: ns16550: support using pre-loader serial

- pass pre-loader serial configure by rk atags;
- it depends on serial aliases to find uart port;
- enabled by CONFIG_ROCKCHIP_USING_PRELOADER_SERIAL;

Change-Id: I6723cccc5e1f3dac77203b4cc19cdac631f5133b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>

show more ...


# 0031af9c 26-Aug-2017 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-x86


# 3ca7a06a 16-Aug-2017 Stefan Roese <sr@denx.de>

serial: serial-uclass: Add generic serial RX buffer support

Pasting longer lines into the U-Boot console prompt sometimes leads to
characters missing. One problem here is the small 16-byte FIFO of t

serial: serial-uclass: Add generic serial RX buffer support

Pasting longer lines into the U-Boot console prompt sometimes leads to
characters missing. One problem here is the small 16-byte FIFO of the
legacy NS16550 UART, e.g. on x86 platforms.

This patch now introduces a Kconfig option to enable RX buffer support
for all DM based serial drivers. With this option enabled, I was
able paste really long lines into the U-Boot console, without any
characters missing.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>

show more ...


# 7b3c4c3a 27-Jul-2017 Simon Glass <sjg@chromium.org>

dm: console: Check for serial devices properly

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 u

dm: console: Check for serial devices properly

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: Simon Glass <sjg@chromium.org>

show more ...


# f1896c45 24-Jul-2017 Andy Yan <andy.yan@rock-chips.com>

spl: make SPL and normal u-boot stage use independent SYS_MALLOC_F_LEN

Some platforms have very limited SRAM to run SPL code, so there may
not be the same amount space for a malloc pool before reloc

spl: make SPL and normal u-boot stage use independent SYS_MALLOC_F_LEN

Some platforms have very limited SRAM to run SPL code, so there may
not be the same amount space for a malloc pool before relocation in
the SPL stage as the normal U-Boot stage.

Make SPL and (the full) U-Boot stage use independent SYS_MALLOC_F_LEN,
so the size of pre-relocation malloc pool can be configured memory
space independently.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
[fixed up commit-message:]
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

show more ...


# 8d3a2568 12-Jul-2017 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-dm


# f93472a0 12-Jun-2017 Simon Glass <sjg@chromium.org>

dm: serial: Add livetree support

Add support for a live device tree to the core serial uclass.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

dm: serial: Add livetree support

Add support for a live device tree to the core serial uclass.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-on: Beaver, Jetson-TK1

show more ...


# d0960853 12-Jun-2017 Simon Glass <sjg@chromium.org>

dm: serial: Separate out the core serial-device finding code

This function is quite long. Move the core code into a separate function
in preparation for adding livetree support.

Signed-off-by: Simo

dm: serial: Separate out the core serial-device finding code

This function is quite long. Move the core code into a separate function
in preparation for adding livetree support.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-on: Beaver, Jetson-TK1

show more ...


# 49ddcf3e 22-Jun-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

serial: make serial_stub_* to static functions

Add missing static to serial_stub_puts().

Unexport serial_stub_{getc,tstc} because they are used locally.

Signed-off-by: Masahiro Yamada <yamada.masa

serial: make serial_stub_* to static functions

Add missing static to serial_stub_puts().

Unexport serial_stub_{getc,tstc} because they are used locally.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

show more ...


# f5b5719c 19-May-2017 Simon Glass <sjg@chromium.org>

dm: core: Update lists_bind_fdt() to use ofnode

Adjust this function to use an ofnode instead of an offset, so it can be
used with livetree. This involves updating all callers.

Signed-off-by: Simon

dm: core: Update lists_bind_fdt() to use ofnode

Adjust this function to use an ofnode instead of an offset, so it can be
used with livetree. This involves updating all callers.

Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...


# ae1b9399 17-May-2017 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-x86


1234