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.c

    Signed-off-by: Heiko Schocher
    Signed-off-by: Ladislav Michl
    Tested-by: Adam Ford
    Reviewed-by: Tom Rini

    Heiko Schocher
     

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

    Marek Vasut
     
  • 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

    Marek Vasut
     
  • 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

    Marek Vasut
     

08 Oct, 2016

1 commit


06 Oct, 2016

1 commit


23 Sep, 2016

1 commit


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

    Paul Burton
     

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

    Simon Glass
     

03 Jun, 2016

2 commits


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

    Paul Burton
     

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

    Michal Simek
     

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

    Tom Rini
     

22 Feb, 2016

1 commit


25 Jan, 2016

1 commit


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

    Simon Glass
     
  • 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

    Simon Glass
     

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

    Simon Glass
     
  • 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

    Thomas Chou
     

01 Dec, 2015

1 commit


22 Nov, 2015

1 commit


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

    Thomas Chou
     
  • 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

    Thomas Chou
     

21 Oct, 2015

1 commit


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

    Simon Glass
     

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
    #endif

    Now 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

    Masahiro Yamada
     

22 Jul, 2015

1 commit


11 Jun, 2015

1 commit


29 Apr, 2015

1 commit


23 Apr, 2015

3 commits


19 Apr, 2015

1 commit


02 Mar, 2015

1 commit


19 Feb, 2015

2 commits


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

    Bin Meng
     

05 Dec, 2014

1 commit


24 Oct, 2014

1 commit