04 Apr, 2020
1 commit
-
Currently the driver gets ns16550 base address in the driver
probe() routine, which may potentially break any ns16550 wrapper
driver that does additional initialization before calling
ns16550_serial_probe().Things are complicated that we need consider ns16550 devices on
both simple-bus and PCI bus. To fix the issue we move the base
address assignment for simple-bus ns16550 device back to the
ofdata_to_platdata(), and assign base address for PCI ns16550
device in ns16550_serial_probe().This is still not perfect. If any PCI bus based ns16550 wrapper
driver tries to access plat->base before calling probe(), it is
still subject to break.Fixes: 720f9e1fdb0c9 ("serial: ns16550: Move PCI access from ofdata_to_platdata() to probe()")
Reported-by: Andy Shevchenko
Signed-off-by: Bin Meng
Tested-by: Andy Shevchenko
Reviewed-by: Wolfgang Wallner
Tested-by: Wolfgang Wallner
13 Mar, 2020
2 commits
-
All drivers seems to align now to serial_xxx maning, so, aligning
also this driver, to allow to be found easily.Signed-off-by: Angelo Durgehello
-
Actually, using dev->seq value before probe to deduce the current
serial port index leads to reading an invalid seq value (-1).
So, getting dev->seq at probe time.Signed-off-by: Angelo Durgehello
09 Mar, 2020
1 commit
-
Some device may enable CONFIG_CLK but not still support this clock in
CC, so better use debug() in place of dev_warn() otherwise a lot of
boards will throw useless dev_warn()s.Signed-off-by: Giulio Benetti
Reviewed-by: Simon Glass
05 Mar, 2020
1 commit
-
Currently the ofdata_to_platdata() method calls dev_read_addr_pci(),
which potentially accesses the parent PCI bus. If this happens before
the parent PCI bus is probed the resulting address will be wrong.This behavior was triggered by commit 82de42fa1468 ("dm: core:
Allocate parent data separate from probing parent").According to a comment in drivers/pci/pci-uclass.c [1] accessing
the PCI parent bus in ofdata_to_platdata() is not allowed, and the
access should be moved to the probe() function.Move the call to dev_read_addr_pci() and the related handling of the
'addr' value from the ofdata_to_platdata() to its own function,
which is then called from the probe() method.While moving the code, the comment /* try Processor Local Bus device
first */ was dropped. It was initially added with commit 3db886a5bf38
("serial: ns16550: Support ns16550 compatible pci uart devices") and
later made obsolete with commit 33c215af4b9d ("dm: pci: Add a function
to read a PCI BAR").[1] Comment in drivers/pci/pci-uclass.c:
"A common cause of this problem is that this function is called in the
ofdata_to_platdata() method of @dev. Accessing the PCI bus in that
method is not allowed, since it has not yet been probed. To fix this,
move that access to the probe() method of @dev instead."Fixes: 82de42fa1468 ("dm: core: Allocate parent data separate from probing parent")
Signed-off-by: Wolfgang Wallner
Reviewed-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Bin Meng # Tested on Intel Galileo
11 Feb, 2020
1 commit
-
sandbox conversion to SDL2
TPM TEE driver
Various minor sandbox video enhancements
New driver model core utility functions
08 Feb, 2020
1 commit
-
Add serial UART driver support for all Cortina Access
CAxxxx family of SoCs.Reviewed-by: Daniel Schwierzeck
Signed-off-by: Jason Li
Signed-off-by: Alex Nemirovsky
06 Feb, 2020
2 commits
-
At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.Move the compatibility features into a separate header file.
Signed-off-by: Simon Glass
-
At present devres.h is included in all files that include dm.h but few
make use of it. Also this pulls in linux/compat which adds several more
headers. Drop the automatic inclusion and require files to include devres
themselves. This provides a good indication of which files use devres.Signed-off-by: Simon Glass
Reviewed-by: Anatolij Gustschin
04 Feb, 2020
2 commits
-
Coreboot can provide information about the serial device in use on a
platform. Add a driver that uses this information to produce a working
UART.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng -
At present this driver uses an assortment of CONFIG options to control
how it accesses the hardware. This is painful for platforms that are
supposed to be controlled by a device tree or a previous-stage bootloader.Add a new CONFIG option to enable fully dynamic configuration. This
controls register spacing, size, offset and endianness.Signed-off-by: Simon Glass
Reviewed-by: Aiden Park
Tested-by: Aiden Park
Reviewed-by: Bin Meng
[bmeng: squashed in http://patchwork.ozlabs.org/patch/1232929/]
Signed-off-by: Bin Meng
25 Jan, 2020
1 commit
-
If baud_divisor is not set (i.e. == -1), we should use the baud divisor
already in use for flushing the xmit register. If we don't flush the
xmit register, then SPL will hang.Signed-off-by: Patrik Dahlström
18 Jan, 2020
3 commits
-
At present panic() is in the vsprintf.h header file. That does not seem
like an obvious choice for hang(), even though it relates to panic(). So
let's put hang() in its own header.Signed-off-by: Simon Glass
[trini: Migrate a few more files]
Signed-off-by: Tom Rini -
These three clock functions don't use driver model and should be migrated.
In the meantime, create a new file to hold them.Signed-off-by: Simon Glass
-
This seems pretty old now. It has not been converted to driver model and
is not used by any boards.Drop it.
Signed-off-by: Simon Glass
16 Jan, 2020
1 commit
-
Some features implicitly depended on MALLOC_F and OF_LIBFDT and would
fail at link-time if these features were not enabled.Signed-off-by: Sean Anderson
15 Jan, 2020
2 commits
-
Add i.MXRT compatible string and cpu type support to lpuart driver,
to use little endian 32 bits configurations.Also according to RM, the Receive RX FIFO Enable (RXFE) field in LPUART
FIFO register is bit 3, so this definition should change to 0x08 as done
for i.MX8. It needs also to set baudrate the same way as i.MX8 does.Signed-off-by: Giulio Benetti
-
This driver assumes that lpuart clock is already enabled before probing
but using DM only lpuart won't be automatically enabled so add
clk_enable() when probing if CONFIG_CLK is defined. If clock is not
found, because DM is not used, let's emit a warning and proceed, because
serial clock could also be already enabled by non DM code. If clock is
found but cna't be enabled then return with error.Signed-off-by: Giulio Benetti
10 Dec, 2019
1 commit
-
Due to a conversion error the sandbox does not accept byte values 0x80-0xff
from the keyboard. The UEFI extended text input unit test requires Unicode
support.Use unsigned char for the serial buffer.
Signed-off-by: Heinrich Schuchardt
Reviewed-by: Andy Shevchenko
04 Dec, 2019
1 commit
-
Fix stdout-path handling
03 Dec, 2019
3 commits
-
This missing dependency seems like an oversight, since all other
TPL_DM_* options have it.Signed-off-by: Thomas Hebb
-
The function declarations in serial.h are not in sync with what is
currently used in usbtty. Fix this by updating the header and including
it, to help catch future such problems.Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
With commit f0921f5098d8 ("fdt: Sync up to the latest libfdt"),
SiFive Unleashed board does not boot any more. This was due to
the U-Boot local changes commit 77d7fff8cec2 ("fdt: Fix handling
of paths with options in them") to libfdt/fdt_ro.c was dropped
during the libfdt upgrade.>From the history [1] it was mentioned that the U-Boot changes
commit 77d7fff8cec2 ("fdt: Fix handling of paths with options in
them") was rejected by libfdt upstream, hence we need find another
way to fix the things.This commit uses another method, by updating serial_check_stdout()
directly to handle the situation of "stdout-path" with ":options".
A simpler way is to change the logic in fdtdec_get_chosen_node()
to do similar thing, but I feel that not every property in chosen
node may have the option in them, hence it would make more sense
to do the special handling in serial_check_stdout() directly.[1]: http://patchwork.ozlabs.org/patch/462756/
Signed-off-by: Bin Meng
Reviewed-by: Simon Glass
24 Nov, 2019
1 commit
-
U-Boot support on Raspberry Pi 4 relies on the device-tree
provided by the firmware. The blob does not contain the
U-Boot specific pre-loc-rel properties. The result is, that
the U-Boot banner is not printed.We fix this by setting the DM_FLAG_PRE_RELOC flag in the driver,
if we rely on a device-tree provided by the firmware.Reported-by: Heinrich Schuchardt
Signed-off-by: Matthias Brugger
25 Oct, 2019
2 commits
-
This patch adds non-DM version for mtk hsuart driver and makes it
compatible with ns16550a driver in configuration.
This is needed in SPL with CONFIG_SPL_DM disabled for reducing size.Signed-off-by: Weijie Gao
-
This patch adds codes to enable FIFO and disable flow control taken from
ns16550 driver.Signed-off-by: Weijie Gao
09 Oct, 2019
1 commit
-
u-boot-imx-20191009
-------------------Travis : https://travis-ci.org/sbabic/u-boot-imx/builds/595148532
- MX6UL / ULZ
- Toradex board
- Allow to set OCRAM for MX6Q/D
- MX7ULP
- MX8: (container image, imx8mq_mek), SCU API
- fix several board booting from SD/EMMC (cubox-i for example)
- pico boards[trini: display5 merged manually]
Signed-off-by: Tom Rini
08 Oct, 2019
4 commits
-
i.MX7 and i.MX8M use mxc uart driver, so let's make the SoC could
use MXC_UART kconfig.Signed-off-by: Peng Fan
Reviewed-by: Ye Li -
At present PCI address transaction is not supported so drivers must
manually read the correct BAR after reading the device tree info. The
ns16550 has a suitable implementation, so move this code into the core
DM support.Note that there is no live-tree equivalent at present.
Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Bin Meng
[bmeng: correct the unclear comments in test.dts]
Signed-off-by: Bin Meng -
At present this function is never called when of-platdata is enabled since
we never have a device tree. However, this function is responsible for
copying over the of-platdata, so we must call it. Otherwise the probe()
method would have to be used.Correct this and fix the sandbox serial driver to not read from the device
tree and try to write to what is read-only platdata on some platforms.Fixes: 396e343b3d (dm: core: Allow binding a device from a live tree)
Signed-off-by: Simon Glass
Reviewed-by: Bin Meng -
At present this driver uses the wrong condition for including the code and
drivers in SPL/TPL. Update it so that the code is only included if
DM_SERIAL is enabled for SPL/TPL.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
27 Aug, 2019
1 commit
-
Add management of Bit 1 of USART_ISR = FE: Framing error
This bit is set by hardware when a de-synchronization, excessive noise
or a break character is detected. It is cleared by software, writing 1
to the FECF bit in the USART_ICR register (for stm32 after f4).Signed-off-by: Patrick Delaunay
26 Aug, 2019
1 commit
-
Several options are presenting themselves on a various boards
where the options are clearly not used. (ie, SPL/TPL options
when SPL or TPL are not defined)This patch is not attempting to be a complete list of items, but
more like low hanging fruit. In some instances, I wasn't sure
of DM was required, so I simply made them SPL or TPL.This patch attempts to reduce some of the menuconfig noise
by defining dependencies so they don't appear when not used.Signed-off-by: Adam Ford
15 Aug, 2019
1 commit
-
In y-modem transfer mode, tstc/getc fail to check if there is any
data available / received in RX FIFO, and so y-modem transfer never
succeeds. Using receive watermark bit within ip register fixes the
issue.This patch is based on commit c7392b7bc4e1 ("Use the RX watermark
interrupt pending bit for TSTC") available at[1][1] https://github.com/sifive/HiFive_U-Boot/tree/regression
Signed-off-by: Sagar Shrikant Kadam
Reviewed-by: Anup Patel
Tested-by: Anup Patel
Reviewed-by: Padmarao Begari
Tested-by: Padmarao Begari
12 Aug, 2019
3 commits
-
This file contains lots of internal details about the environment. Most
code can include env.h instead, calling the functions there as needed.Rename this file and add a comment at the top to indicate its internal
nature.Signed-off-by: Simon Glass
Acked-by: Joe Hershberger
Reviewed-by: Simon Goldschmidt
[trini: Fixup apalis-tk1.c]
Signed-off-by: Tom Rini -
Move env_get() over to the new header file.
Acked-by: Joe Hershberger
Signed-off-by: Simon Glass -
Should use CONFIG_IS_ENABLED not IS_ENABLED for CLK driver, so it will
check the CONFIG_SPL_CLK when building SPLSigned-off-by: Ye Li
Reviewed-by: Bin Meng
20 Jul, 2019
2 commits
-
This patch fixes not enabled uart2 (and hence serial console) on i.MX53
devices. After following commit 1d255904c306 ("ARM: dts: imx: imx53:
Synchronize iMX53 DT with Linux") from the uart2 compatible the
'fsl,imx7d-uart' has been removed (which was correct).However, the root cause of the problem was the commit 98d62e618bb9 ("arm:
imx: add i.MX53 Beckhoff CX9020 Embedded PC") which introduced this
compatible.Moreover, without this patch all i.MX53 UARTs are not usable as neither
'fsl,imx53-uart' nor 'fsl,imx21-uart' are in compatible IDs in
drivers/serial/serial_mxc.c file.The fix is to add 'fsl,imx53-uart' and 'fsl,imx21-uart' as compatibles
for the aforementioned serial driver (those are also defined in the Linux
kernel).Signed-off-by: Lukasz Majewski
Acked-by: Marek Vasut -
The DM_FLAG_PRE_RELOC shall be set unconditionally as this driver is going
to be re-used in both early SPL and U-Boot proper's pre-reloc.For i.MX based devices it is crucial to have available the serial console
before relocation (otherwise the board may hand).The device definition may be provided either via device tree description or
with U_BOOT_DEVICE(mxc_serial) definition. In the latter case the device
will not bind in U-Boot proper when DM_FLAG_PRE_RELOC is not set.The !CONFIG_IS_ENABLED(OF_CONTROL) #if check was set as a "workaround" for
DM problem described in following commit 4687919684e0
("serial: Remove DM_FLAG_PRE_RELOC flag in various drivers").Let's look on this check more thoroughly - we add this flag if the board
doesn't support OF_CONTROL. This is a bit strange as the serial_mxc.c can
be used with CONFIG_DM_SERIAL but without corresponding device tree
description (OF_CONTROL). In such case the aforementioned
U_BOOT_DEVICE(mxc_serial) definition is used.Other boards/SoCs have this flag set unconditionally for serial driver.
Signed-off-by: Lukasz Majewski
14 Jul, 2019
1 commit
-
- syscon: add support for power off
- stm32mp1: add op-tee config
- stm32mp1: add specific commands: stboard and stm32key
- add stm32 mailbox driver
- solve many stm32 warnings when building with W=1
- update stm32 gpio driver