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
15 Nov, 2018
1 commit
-
When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be
bound before relocation. However due to a bug in the DM core,
the flag only takes effect when devices are statically declared
via U_BOOT_DEVICE(). This bug has been fixed recently by commit
"dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in
lists_bind_fdt()", but with the fix, it has a side effect that
all existing drivers that declared DM_FLAG_PRE_RELOC flag will
be bound before relocation now. This may expose potential boot
failure on some boards due to insufficient memory during the
pre-relocation stage.To mitigate this potential impact, the following changes are
implemented:- Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver
only supports configuration from device tree (OF_CONTROL)
- Keep DM_FLAG_PRE_RELOC flag in the driver only if the device
is statically declared via U_BOOT_DEVICE()
- Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for
drivers that support both statically declared devices and
configuration from device treeSigned-off-by: Bin Meng
Reviewed-by: Simon Glass
19 Jul, 2018
1 commit
-
Explanation from Simon Glass
"Private data is created when the device is probed and freed when the
device is removed.Platform data is created when the device is bound, and survives
probe/remove cycles.Strictly speaking, platform data should be used to hold the decoded
device tree properties. Private data should be used for run-time
things the device needs to keep track of."Based on description the driver needs to be switch to use platdata
instead of priv.Signed-off-by: Michal Simek
Reviewed-by: Simon Glass
15 Jun, 2018
4 commits
-
This function is used only inside this driver that's why should be
static.Signed-off-by: Michal Simek
Reviewed-by: Simon Glass -
This issue was found when OF_LIVE was enabled that there are scrambled
chars on the console like this:
Chip ID: zu3eg
Watchdog: Started��j� sdhci@ff160000: 0, sdhci@ff170000: 1
In: serial@ff010000I found a solution for this problem exactly the same as I found later in
serial_msm fixed by:
"serial: serial_msm: initialize uart only before relocation"
(sha1: 7e5ad796bcd65772a87da236ae21cd536ae3a4d2)What it is happening is that output TX fifo still contains chars to be
sent and _uart_zynq_serial_init() resets TX fifo even in the middle of
transfer.Signed-off-by: Michal Simek
Reviewed-by: Simon Glass -
Change logic and put char to fifo till there is a space in output fifo.
Origin logic was that output fifo needs to be empty. It means only one
char was in output queue.
Also remove unused ZYNQ_UART_SR_TXEMPTY macro.Signed-off-by: Michal Simek
Reviewed-by: Simon Glass -
Coding style is checking to use BIT macros instead of shifts.
The patch is also fixing the rest of macros which should be BITs instead
of hex numbers.Signed-off-by: Michal Simek
Reviewed-by: Simon Glass
31 May, 2018
1 commit
-
Use live-tree functions.
Signed-off-by: Michal Simek
Reviewed-by: Simon Glass
11 May, 2018
1 commit
-
There is no need to have arm hardware header in this driver.
Signed-off-by: Michal Simek
07 May, 2018
1 commit
-
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: Tom Rini
28 Apr, 2018
1 commit
-
We have a large number of places where while we historically referenced
gd in the code we no longer do, as well as cases where the code added
that line "just in case" during development and never dropped it.Signed-off-by: Tom Rini
01 Jun, 2017
1 commit
-
These support the flat device tree. We want to use the dev_read_..()
prefix for functions that support both flat tree and live tree. So rename
the existing functions to avoid confusion.In the end we will have:
1. dev_read_addr...() - works on devices, supports flat/live tree
2. devfdt_get_addr...() - current functions, flat tree only
3. of_get_address() etc. - new functions, live tree onlyAll drivers will be written to use 1. That function will in turn call
either 2 or 3 depending on whether the flat or live tree is in use.Note this involves changing some dead code - the imx_lpi2c.c file.
Signed-off-by: Simon Glass
17 Feb, 2017
1 commit
-
Move the zynq to clock framework and remove unused functions as well as
the CONFIG_ZYNQ_PS_CLK_FREQ configuration.Signed-off-by: Stefan Herbrechtsmeier
Signed-off-by: Michal Simek
22 Jul, 2016
1 commit
-
Read information about clock frequency from DT.
Signed-off-by: Michal Simek
Reviewed-by: Simon Glass
Reviewed-by: Moritz Fischer
22 Feb, 2016
1 commit
-
Sync logic with Linux kernel where TX empty flag is checked before char
is sent.
This logic is fixing problem with console on zynqmp platform.For example:
DRAM: 2 GiB
Enabling Caches...
EL Level: �� sdhci@ff170000: 0
Using default environmentSigned-off-by: Michal Simek
Reviewed-by: Simon Glass
Reviewed-by: Moritz Fischer
27 Jan, 2016
2 commits
-
Use dev_get_addr() instead of reading reg base directly in the driver.
Core function is also more robust.Signed-off-by: Michal Simek
-
ZynqMP is using updated core with cdns,uart-r1p12 compatible string.
Signed-off-by: Michal Simek
Signed-off-by: Michal Simek
08 Jan, 2016
1 commit
-
Mark _debug_uart_init() as static to avoid sparse warning and
inline it to debug_uart_init().Reported-by: Thomas Chou
Signed-off-by: Michal Simek
Reviewed-by: Thomas Chou
Reviewed-by: Simon Glass
Reviewed-by: Bin Meng
Acked-by: Simon Glass
07 Dec, 2015
2 commits
-
debug_uart.h is included twice.
Signed-off-by: Michal Simek
Reviewed-by: Bin Meng
Reviewed-by: Simon Glass -
Remove this c&p error from s5p driver.
Signed-off-by: Michal Simek
Reviewed-by: Bin Meng
Reviewed-by: Simon Glass
04 Nov, 2015
3 commits
-
Update this driver to use driver model and change all users.
Signed-off-by: Simon Glass
Signed-off-by: Michal Simek -
Since we use device tree in SPL also, we can drop this code.
Signed-off-by: Simon Glass
Signed-off-by: Michal Simek -
Add support for the debug UART to assist with early debugging. Enable it
for Zybo as an example.Signed-off-by: Simon Glass
Signed-off-by: Michal Simek
19 Aug, 2015
1 commit
-
We have flipped CONFIG_SPL_DISABLE_OF_CONTROL. We have cleansing
devices, $(SPL_) and CONFIG_IS_ENABLED(), so we are ready to clear
away the ugly logic in include/fdtdec.h:#ifdef CONFIG_OF_CONTROL
# if defined(CONFIG_SPL_BUILD) && !defined(SPL_OF_CONTROL)
# define OF_CONTROL 0
# else
# define OF_CONTROL 1
# endif
#else
# define OF_CONTROL 0
#endifNow CONFIG_IS_ENABLED(OF_CONTROL) is the substitute. It refers to
CONFIG_OF_CONTROL for U-boot proper and CONFIG_SPL_OF_CONTROL for
SPL.Also, we no longer have to cancel CONFIG_OF_CONTROL in
include/config_uncmd_spl.h and scripts/Makefile.spl.Signed-off-by: Masahiro Yamada
Reviewed-by: Tom Rini
Reviewed-by: Simon Glass
Acked-by: Linus Walleij
29 Apr, 2015
1 commit
-
On slow platforms not all baudrate setting is valid.
Check it directly in the driver and setup maximum possible
frequency.Signed-off-by: Michal Simek
26 Jan, 2015
2 commits
-
This information help with debugging issues with uart.
Signed-off-by: Michal Simek
-
This change enables to change baudrate on command line.
Signed-off-by: Michal Simek
06 May, 2014
2 commits
-
's/zynq_serial_initalize/zynq_serial_initialize/g'
serial_initialize is used by all serial drivers.Signed-off-by: Michal Simek
-
Warnings:
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_init' was not declared. Should it be static?
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_setbrg' was not declared. Should it be static?
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_getc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_tstc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_putc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_puts' was not declared. Should it be static?
drivers/serial/serial_zynq.c:182:22: warning: symbol 'uart_zynq_serial0_device' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_init' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_setbrg' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_getc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_tstc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_putc' was not declared. Should it be static?
drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_puts' was not declared. Should it be static?
drivers/serial/serial_zynq.c:185:22: warning: symbol 'uart_zynq_serial1_device' was not declared. Should it be static?Signed-off-by: Michal Simek
04 Mar, 2014
1 commit
-
Add console selection from DTB which is enough to have
OF driven solution.Signed-off-by: Michal Simek
19 Feb, 2014
2 commits
-
Remove hard coded frequencies and use Zynq's clock framework to obtain
the UART clock frequency.Signed-off-by: Soren Brinkmann
Signed-off-by: Michal Simek -
Define both serial uarts in the driver and return
default uart based on board configuration.- Move baseaddresses to hardware.h
- Define default baudrate and clock valuesSigned-off-by: Michal Simek
02 Dec, 2013
1 commit
-
Signed-off-by: Soren Brinkmann
Signed-off-by: Michal Simek
Series-to: trini, uboot
24 Jul, 2013
1 commit
-
Signed-off-by: Wolfgang Denk
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini
16 Oct, 2012
3 commits
-
Remove the support for not-CONFIG_SERIAL_MULTI part from serial
port drivers and some board files. Since CONFIG_SERIAL_MULTI is
now enabled by default, that part is a dead code. Remove it.Signed-off-by: Marek Vasut
Cc: Marek Vasut
Cc: Anatolij Gustschin
Cc: Stefan Roese
Signed-off-by: Tom Rini -
Move the registration of zynq_serialN_device ports from default
serial_initialize() into driver specific function called from
serial_initialize(). This slims down the serial_initialize() call
to a bare tracker of all possible serial port registration routines
in U-Boot.The newly implemented zynq_serial_initialize() function, which is
implemented inside of the serial_zynq driver allows encapsulation
of zynq_serialN_device within the serial_zynq driver itself.Also, remove the exports of zynq_serialN_device from include/serial.h
as they are no longer needed. This is simply because the implementation of
default_serial_console() is wrapped into the serial_zynq driver and
the default console is picked by CONFIG_SERIAL macro in config file.Signed-off-by: Tom Rini
-
Rename .init() to .start() and .uninit() to .stop() in struct
serial_device. This allows aligning struct serial_device with
closer to struct stdio_dev. The real goal here is to allow
these two structures to converge together and eventually make
one to be a superset of the other.Signed-off-by: Marek Vasut
Cc: Marek Vasut
Signed-off-by: Tom Rini
04 Oct, 2012
1 commit
-
The driver is used on Xilinx Zynq platform.
Signed-off-by: Michal Simek
CC: Joe Hershberger
CC: Marek Vasut
Acked-by: Marek Vasut