20 Jan, 2017
1 commit
-
commit: 65f83802b7a5b "serial: 16550: Add getfcr accessor"
breaks u-boot commandline working with long commands
sending to the board.Since the above patch, you have to setup the fcr register.
For board/archs which enable OF_PLATDATA, the new field
fcr in struct ns16550_platdata is not filled with a
default value ...This leads in not setting up the uarts fifo, which ends
in problems, when you send long commands to u-boots
commandline.Detected this issue with automated tbot tests on am335x
based shc board.The error does not popup, if you type commands. You need
to copy&paste a long command to u-boots commandshell
(or send a long command with tbot)Possible boards/plattforms with problems:
./arch/arm/cpu/arm926ejs/lpc32xx/devices.c
./arch/arm/mach-tegra/board.c
./board/overo/overo.c
./board/quipos/cairo/cairo.c
./board/logicpd/omap3som/omap3logic.c
./board/logicpd/zoom1/zoom1.c
./board/timll/devkit8000/devkit8000.c
./board/lg/sniper/sniper.c
./board/ti/beagle/beagle.c
./drivers/serial/serial_rockchip.cSigned-off-by: Heiko Schocher
Signed-off-by: Ladislav Michl
Tested-by: Adam Ford
Reviewed-by: Tom Rini
20 Dec, 2016
3 commits
-
Add compatibility string for the Ingenic JZ4780 SoC, the necessary
UART enable bit into FCR and register shift. Neither are encoded
in the DTS coming from Linux, so we need to support it this way.Signed-off-by: Marek Vasut
Cc: Tom Rini
Cc: Simon Glass
Cc: Daniel Schwierzeck
Cc: Paul Burton
Reviewed-by: Simon Glass -
Add driver data to each compatible string to identify the type of
the port. Since all the ports in the driver are entirely compatible
with 16550 for now, all are marked with PORT_NS16550. But, there
are ports which have specific quirks, like the JZ4780 UART, which
do not have any DT property to denote the quirks. Instead, Linux
uses the compatible string to discern such ports and enable the
necessary quirks.Signed-off-by: Marek Vasut
Cc: Tom Rini
Cc: Simon Glass -
Add function which allows fetching the default FCR register setting
from platform data for DM , while retaining old behavior for non-DM
by returning UART_FCRVAL.Signed-off-by: Marek Vasut
Cc: Tom Rini
Cc: Simon Glass
Reviewed-by: Simon Glass
08 Oct, 2016
1 commit
-
This reverts commit 82f5279b0cd99a9163d34cfe926d0316d9dc0d37.
The build failure of k2*evm boards was fixed in a different way by
the previous commit. It is nasty to patch generic drivers around
with #ifdef CONFIG_CLK just for the KeyStone's matter.Signed-off-by: Masahiro Yamada
Reviewed-by: Simon Glass
Reviewed-by: Tom Rini
06 Oct, 2016
1 commit
-
When calling clk_get_by_index(), fall back to the legacy method of
getting the clock if -ENOENT is returned.Signed-off-by: Alexandre Courbot
Tested-by: Stephen Warren
Acked-by: Thierry Reding
23 Sep, 2016
1 commit
-
We cannot call on the CONFIG_CLK based clk_get_rate function unless
CONFIG_CLK is set.Signed-off-by: Tom Rini
21 Sep, 2016
1 commit
-
Previously ns16550 compatible UARTs probed via device tree have needed
their device tree nodes to contain a clock-frequency property. An
alternative to this commonly used with Linux is to reference a clock via
a phandle. This patch allows U-Boot to support that, retrieving the
clock frequency by probing the appropriate clock device.For example, a system might choose to provide the UART base clock as a
reference to a clock common to multiple devices:sys_clk: clock {
compatible = "fixed-clock";
#clock-cells = ;
clock-frequency = ;
};uart0: uart@10000000 {
compatible = "ns16550a";
reg = ;
clocks = ;
};uart1: uart@10000000 {
compatible = "ns16550a";
reg = ;
clocks = ;
};This removes the need for the frequency information to be duplicated in
multiple nodes and allows the device tree to be more descriptive of the
system.Signed-off-by: Paul Burton
Reviewed-by: Simon Glass
15 Jul, 2016
1 commit
-
With of-platdata this driver cannot know the format of the of-platdata
struct, so we cannot use generic code for accessing the of-platdata. Each
SoC that uses this driver will need to set up ns16550's platdata for it.
So don't compile in the generic code.Signed-off-by: Simon Glass
03 Jun, 2016
2 commits
-
The CONFIG_OMAP1510 is no longer defined, so remove this dead code.
Signed-off-by: Marek Vasut
Cc: Tom Rini
Cc: Simon Glass
Reviewed-by: Simon Glass
Acked-by: Nishanth Menon -
The ns16550 driver needs serial_in_shift() and serial_out_shift()
when compiled in debug UART mode, so shift the DM_SERIAL check a
little to make these functions available.Signed-off-by: Marek Vasut
Cc: Tom Rini
Cc: Simon Glass
Reviewed-by: Tom Rini
Reviewed-by: Simon Glass
26 May, 2016
1 commit
-
If the UART is to be accessed using I/O port accessors (inb & outb) then
using map_physmem doesn't make sense, since it operates in a different
memory space. Remove the call to map_physmem when
CONFIG_SYS_NS16550_PORT_MAPPED is defined, allowing I/O port addresses
to not be mangled by the incorrect mapping.Signed-off-by: Paul Burton
Signed-off-by: Daniel Schwierzeck
18 Mar, 2016
1 commit
-
reg-offset is the part of standard 8250 binding in the kernel.
It is shifting start of address space by reg-offset.
On Xilinx platform this offset is typically 0x1000.Signed-off-by: Michal Simek
Reviewed-by: Simon Glass
Reviewed-by: Tom Rini
Moved the new field to the end of the struct to avoid problems:
Signed-off-by: Simon Glass
29 Feb, 2016
1 commit
-
This reverts commit d9a3bec682f9756621615f4306718a356a3230e3.
While this is a correct change to do long term it unfortunately breaks a
number of platforms that are using pdata and not named struct members so
they are getting all of their data after 'base' incorrect.Acked-by: Michal Simek
Signed-off-by: Tom Rini
22 Feb, 2016
1 commit
-
reg-offset is the part of standard 8250 binding in the kernel.
It is shifting start of address space by reg-offset.
On Xilinx platform this offset is typically 0x1000.Signed-off-by: Michal Simek
Reviewed-by: Simon Glass
Reviewed-by: Tom Rini
25 Jan, 2016
1 commit
-
Zap the rockchip serial compatible string, because rockchip
serial has "snps,dw-apb-uart" compatible string in the dts.Signed-off-by: Thomas Chou
Acked-by: Simon Glass
13 Jan, 2016
2 commits
-
Allow the ns16550 debug UART to be used without the full driver.
Signed-off-by: Simon Glass
Reviewed-by: Thomas Chou -
Use the driver model version of the function to find the BAR. This updates
the fdtdec function, of which ns16550 is the only user.The fdtdec_get_pci_bdf() function is dropped for several reasons:
- with driver model we should use 'struct udevice *' rather than passing the
device tree offset explicitly
- there are no other users in the tree
- the function parses for information which is already available in the PCI
device structure (specifically struct pci_child_platdata which is available
at dev_get_parent_platdata(dev)Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Bin Meng
06 Dec, 2015
2 commits
-
For platforms that don't use device tree in SPL the only way to mark this
driver as 'required by relocation' is with the DM_FLAG_PRE_RELOC flag. Add
this to ensure that the driver is bound.Fixes: fde7e18938d8 ("dm: tegra: pci: Move CONFIG_PCI_TEGRA to Kconfig")
Signed-off-by: Simon Glass
Reported-by: Stephen Warren
Acked-by: Thomas Chou -
Change reg-shift property default to zero. When the integer property
is missing, it should be taken as zero. This is consistent to Linux
drivers/tty/serial/of_serial.c.The x86 and most powerpc use reg-shift of 0. Most others use reg-shift
of 2. While reg-shift of 1 is rarely used.Signed-off-by: Thomas Chou
Reviewed-by: Bin Meng
Reviewed-by: Mugunthan V N
Acked-by: Simon Glass
01 Dec, 2015
1 commit
-
Signed-off-by: Lin Huang
Acked-by: Simon Glass
22 Nov, 2015
1 commit
-
Zap CONFIG_NS16550_SERIAL, as the unification of ns16550 drivers
is completed.Signed-off-by: Thomas Chou
Reviewed-by: Bin Meng
Acked-by: Simon Glass
21 Nov, 2015
2 commits
-
Add generic binding to unify ns16550 drivers. There are
several drivers using almost the same code, such as serial_dw,
serial_keystone, serial_omap, serial_ppc, serial_rockchip,
serial_tegra.c, and serial_x86. But each is platform specific.The key difference between these drivers is the way to get
input clock frequency. With this unified approach, fixed clock
frequency should be extracted from "clock-frequency" property of
device tree blob. If this property is not available, the macro
CONFIG_SYS_NS16550_CLK will be used. It can be a constant or a
function to get clock, eg, get_serial_clock().Signed-off-by: Thomas Chou
Reviewed-by: Tom Rini
Reviewed-by: Bin Meng
Reviewed-by: Heiko Schocher
Acked-by: Simon Glass -
Change map_sysmem() to map_physmem(,,MAP_NOCACHE). Though map_sysmem()
can be used to map system memory, it might be wrong to use it for I/O
ports. The map_physmem() serves the same purpose to translate physical
address to virtual address with the additional flag to take care of cache
property. Most drivers use map_physmem() since I/O ports access should be
uncached. As ns16550 is a driver, it should use map_physmem() rather
than map_sysmem().Signed-off-by: Thomas Chou
Acked-by: Simon Glass
21 Oct, 2015
1 commit
-
We want to be able to add other common code to this function. So change the
driver's version to have an underscore before it, just like
_debug_uart_putc(). Define debug_uart_init() to call this version.Update all drivers to this new method.
Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
31 Aug, 2015
1 commit
-
This is a convenient way for a driver to get the hardware address of a
device, when regmap or syscon are not being used. Change existing callers
to use it as an example to others.Signed-off-by: Simon Glass
Reviewed-by: Joe Hershberger
Acked-by: Stephen Warren
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
22 Jul, 2015
1 commit
-
Since Rockchip requires 32-bit serial access, add this to the driver.
Refactor a little to make this easier.Signed-off-by: Simon Glass
11 Jun, 2015
1 commit
-
This option is used by some boards, so support it with driver model. This
is really ugly - we should rewrite this driver once all users are moved to
driver model.Signed-off-by: Simon Glass
29 Apr, 2015
1 commit
-
This was accidentally added by commit dd0b0122bacc
"serial: ns16550: Add an option to specify the debug UART register shift".
Remove it.Signed-off-by: Axel Lin
Acked-by: Simon Glass
23 Apr, 2015
3 commits
-
It is not necessary to write a zero baud rate to the device, and for some
chips this will cause problems. Drop this code.Signed-off-by: Simon Glass
-
Allow this driver to support boards where the register shift is not 0.
This fixes some compiler warnings which appear in that case.Signed-off-by: Simon Glass
-
This UART permits different register spacing. To support the debug UART on
devices which have a spacing other than 1 byte, allow the shift value to
be specified.Signed-off-by: Simon Glass
19 Apr, 2015
1 commit
-
In the case where the arch defines a custom map_sysmem(), make sure that
including just mapmem.h is sufficient to have these functions as they
are when the arch does not override it.Also split the non-arch specific functions out of common.h
Signed-off-by: Joe Hershberger
Reviewed-by: Simon Glass
02 Mar, 2015
1 commit
-
Fix trivial typo.
Acked-by: Simon Glass
Signed-off-by: Axel Lin
19 Feb, 2015
2 commits
-
Add debug UART functions to permit ns16550 to provide an early debug UART.
Try to avoid using the stack so that this can be called from assembler before
a stack is set up (at least on ARM and PowerPC).Signed-off-by: Simon Glass
-
For the debug UART we need to be able to provide any parameters before
driver model is set up. Add parameters to the low-level access functions
to make this possible.Signed-off-by: Simon Glass
13 Jan, 2015
1 commit
-
There are many pci uart devices which are ns16550 compatible. We can
describe them in the board dts file and use it as the U-Boot serial
console as specified in the chosen node 'stdout-path' property.Those pci uart devices can have their register be memory-mapped, or
i/o-mapped. The driver will try to use the memory-mapped register if
the reg property in the node has an entry to describe the memory-mapped
register, otherwise i/o-mapped register will be used.Signed-off-by: Bin Meng
Acked-by: Simon Glass
05 Dec, 2014
1 commit
-
The same problem that is seen on some OMAP3 is also seen on some OMAP4
so include them in the test in order to prevent some hangs during SPL.[trini: Re-word commit message, make apply cleanly]
Signed-off-by: Tom Rini
24 Oct, 2014
1 commit
-
This generates a warning when driver model is enabled, so fix it by adding
a cast.Signed-off-by: Simon Glass