15 Jul, 2019

1 commit


10 Jul, 2019

1 commit


24 May, 2019

1 commit


13 Mar, 2019

1 commit


27 Feb, 2019

2 commits


16 Feb, 2019

1 commit


09 Feb, 2019

1 commit

  • The DM_FLAG_PRE_RELOC shall be enabled in SBSA PL011 uart driver
    as this driver is used in NXP based SoCs

    It is necessary to have Serial console running before relocation

    The !CONFIG_IS_ENABLED(OF_CONTROL) [*] check is set as "workaround"
    for DM problem : 4687919684e

    This flag is set if board does not support device-tree and using
    platform data, In DM Model either of device tree or platform data
    can be used to fetch device configuration

    It is possible to use SBSA UART with CONFIG_DM_SERIAL but witout
    corresponding device tree description (OF_CONTROL)

    Other board/SoCs have this flag set unconditionally

    Signed-off-by: Vabhav Sharma

    Vabhav Sharma
     

25 Jan, 2019

1 commit


16 Jan, 2019

3 commits

  • Fix recent changes to serial API for driver model
    Buildman clang support and a few fixes
    Small fixes to 'dm tree' and regmap test
    Improve sandbox build compatibility
    A few other minor fixes

    Tom Rini
     
  • If _debug_uart_putc() is called before _debug_uart_init(), the
    ns16550 debug uart driver hangs in a tight loop waiting for the
    tx FIFO to get empty.

    As this can happen via a printf sneaking in before the port calls
    debug_uart_init(), introduce a config option to ignore characters
    before the debug uart is initialized.

    This is done by reading the baudrate divisor and aborting if is zero.

    The Kconfig option is required as reading the baudrate divisor does
    not seem to work for all ns16500 compatibles (which is why the last
    attempt on this has been reverted in 1a67969a99).

    Tested on socfpga_cyclone5_socrates.

    Signed-off-by: Simon Goldschmidt
    Reviewed-by: Simon Glass

    Simon Goldschmidt
     
  • DEBUG_UART_SKIP_INIT is used only by debug UART and thus should depend
    on DEBUG_UART.

    Signed-off-by: Simon Goldschmidt
    Reviewed-by: Simon Glass

    Simon Goldschmidt
     

15 Jan, 2019

3 commits


18 Dec, 2018

1 commit


16 Dec, 2018

1 commit


13 Dec, 2018

1 commit

  • Building U-Boot with CONFIG_PCI and CONFIG_DM_PCI enabled, but
    CONFIG_SPL_PCI_SUPPORT disabled, results in following linker
    error:

    lib/built-in.o: In function `fdtdec_get_pci_bar32':
    lib/fdtdec.c:305: undefined reference to `dm_pci_read_bar32'
    fdtdec.c:305:(.text.fdtdec_get_pci_bar32+0x24): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `dm_pci_read_bar32'

    This is because reference to dm_pci_read_bar32() remains in lib/fdtdec.c
    while SPL build does not descend into drivers/pci directory in
    drivers/Makefile if CONFIG_SPL_PCI_SUPPORT is not enabled.

    Fix this by applying appropriate #define guards in lib/fdtdec.c.
    It looks like ns16550.c has the same problem, so fixed that too.

    To simplify this, CONFIG_SPL_PCI_SUPPORT is renamed to CONFIG_SPL_PCI
    (enables use of CONFIG_IS_ENABLED() macro).

    Suggested-by: Vignesh R
    Signed-off-by: Sekhar Nori
    Reviewed-by: Lokesh Vutla
    Reviewed-by: Tom Rini

    Sekhar Nori
     

07 Dec, 2018

3 commits


05 Dec, 2018

4 commits


04 Dec, 2018

1 commit

  • This reverts commit 6f57c34473d37b8da5e6a3764d0d377d748aeef1 since it
    does not seem to work at least on rk3399.

    The Rockchip Technical Reference Manual (TRM) for the rk3399 says the baud
    rate prescaler register is readable only when USR[0] is zero. Since this
    bit is defined as "reserved" in the socfpga cylcone5 TRM, let's rather
    drop this than making the ns16550 debug uart more platform specific.

    Reported-by: Roosen Henri
    Signed-off-by: Simon Goldschmidt
    Reviewed-by: Philipp Tomsich
    Reviewed-by: Kever Yang <kever.yang@rock-chips.com

    Simon Goldschmidt
     

03 Dec, 2018

2 commits


29 Nov, 2018

1 commit

  • Many SoCs from MediaTek have a high-speed uart. This UART is compatible
    with the ns16550 in legacy mode. It has extra registers for high-speed
    mode which can reach a maximum baudrate at 921600.

    However this UART will no longer be compatible if it's in high-speed mode.
    Some BootROM of MediaTek's SoCs will change the UART into high-speed mode
    and the U-Boot must use this driver to initialize the UART.

    Signed-off-by: Weijie Gao
    Tested-by: Ryder Lee
    Reviewed-by: Simon Glass

    Ryder Lee
     

17 Nov, 2018

2 commits


15 Nov, 2018

3 commits

  • 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 tree

    Signed-off-by: Bin Meng
    Reviewed-by: Simon Glass

    Bin Meng
     
  • If _debug_uart_putc() is called before _debug_uart_init(), the
    ns16550 debug uart driver hangs in a tight loop waiting for the
    tx FIFO to get empty.

    As this can happen via a printf sneaking in before the port calls
    debug_uart_init(), let's rather ignore characters before the debug
    uart is initialized.

    This is done by reading the baudrate divisor and aborting if is zero.

    Tested on socfpga_cyclone5_socrates.

    Signed-off-by: Simon Goldschmidt
    Acked-by: Simon Glass

    Simon Goldschmidt
     
  • Currently the comments of several APIs (eg: dm_init_and_scan()) say:

    @pre_reloc_only: If true, bind only drivers with the DM_FLAG_PRE_RELOC
    flag. If false bind all drivers.

    The 'Pre-Relocation Support' chapter in doc/driver-model/README.txt
    documents the same that both device tree properties and driver flag
    are supported.

    However the implementation only checks these special device tree
    properties without checking the driver flag at all. This updates
    lists_bind_fdt() to consider both scenarios.

    Signed-off-by: Bin Meng
    Reviewed-by: Simon Glass
    Squashed in http://patchwork.ozlabs.org/patch/996473/ :
    Signed-off-by: Simon Glass

    Bin Meng
     

09 Nov, 2018

1 commit

  • The commit

    484fdf5ba058 ("dm: Add support for all targets which requires MANUAL_RELOC")

    introduces subtle typo, i.e. missed semicolon.

    Fixes: 484fdf5ba058 ("dm: Add support for all targets which requires MANUAL_RELOC")
    Cc: Michal Simek
    Signed-off-by: Andy Shevchenko
    Reviewed-by: Michal Simek

    Andy Shevchenko
     

25 Oct, 2018

1 commit


23 Oct, 2018

1 commit


22 Oct, 2018

3 commits

  • Modify most APIs to use udevice as the first parameter, then
    it will be easy to get the clk reference by using udevice pointer.
    Use uclass api to get lpuart clk when CONFIG_CLK is enabled.

    Signed-off-by: Peng Fan
    Signed-off-by: Anatolij Gustschin
    Cc: Stefano Babic

    Peng Fan
     
  • Enable the RX and TX FIFO in LPUART driver to avoid the input lost
    during U-Boot boot up.

    Signed-off-by: Ye Li
    Acked-by: Peng Fan
    Reviewed-by: Anatolij Gustschin
    Cc: Stefano Babic

    Ye Li
     
  • Add i.MX8 compatible string and cpu type support to lpuart driver,
    to use little endian 32 bits configurations.

    Also, according to RM, the Receive FIFO Enable (RXFE) field in LPUART
    FIFO register is bit 3, so this definition should change to 0x08
    (not 0x40) for i.MX8, otherwise the Receive FIFO is not disabled.

    Signed-off-by: Peng Fan
    Reviewed-by: Anatolij Gustschin
    Cc: Stefano Babic

    Peng Fan