19 Jan, 2019

1 commit

  • Add common reset driver for all Allwinner SoC's.

    Since CLK and RESET share common DT compatible, it is CLK driver
    job is to bind the reset driver. So add CLK bind call on respective
    SoC driver by passing ccu map descriptor so-that reset deassert,
    deassert operations held based on ccu reset table defined from
    CLK driver.

    Select DM_RESET via CLK_SUNXI, this make hidden section of RESET
    since CLK and RESET share common DT compatible and code.

    Signed-off-by: Jagan Teki
    Acked-by: Maxime Ripard

    Jagan Teki
     

15 Jan, 2019

1 commit


28 Oct, 2018

1 commit


11 Sep, 2018

2 commits

  • Some TI Keystone 2 and K3 family of SoCs contain a system controller
    (like the Power Management Micro Controller (PMMC) on 66AK2G SoCs and
    the Device Management and Security Controller on AM65x SoCs) that manage
    the low-level device control (like clocks, resets etc) for the various
    hardware modules present on the SoC. These device control operations are
    provided to the host processor OS through a communication protocol
    called the TI System Control Interface (TI SCI) protocol.

    This patch adds a reset driver that communicates to the system
    controller over the TI SCI protocol for performing reset management of
    various devices present on the SoC. Various reset functionalities are
    achieved by the means of different TI SCI device operations provided by
    the TI SCI framework.

    This code is loosely based on the drivers/reset/reset-ti-sci.c driver of
    the Linux kernel.

    Reviewed-by: Tom Rini
    Signed-off-by: Andreas Dannenberg
    Signed-off-by: Lokesh Vutla

    Andreas Dannenberg
     
  • Add a reset operations function pointer to support querying the current
    status of a reset control.

    Reviewed-by: Tom Rini
    Signed-off-by: Andreas Dannenberg
    Signed-off-by: Lokesh Vutla

    Andreas Dannenberg
     

21 Jul, 2018

1 commit

  • Following next kernel rcc bindings, we must use a MFD
    RCC driver which is able to bind both clock and reset
    drivers.

    We can reuse and adapt RCC MFD driver already available
    for MCU SoCs (F4/F7/H7).

    Signed-off-by: Patrice Chotard
    Signed-off-by: Patrick Delaunay

    Patrick Delaunay
     

23 Jun, 2018

1 commit


01 Jun, 2018

1 commit


08 May, 2018

2 commits

  • Currently, regmap_init_mem() takes a udevice. This requires the node
    has already been associated with a device. It prevents syscon/regmap
    from behaving like those in Linux.

    Change the first argumenet to take a device node.

    Signed-off-by: Masahiro Yamada
    Acked-by: Neil Armstrong
    Reviewed-by: Simon Glass

    Masahiro Yamada
     
  • Putting zero length array at the end of struct is a common technique
    to embed arbitrary length of members. There is no good reason to let
    regmap_alloc_count() branch by "if (count base is an alias of
    regmap->ranges[0].start, but it is not helpful but make the code
    just ugly.

    Rename regmap_alloc_count() to regmap_alloc() because the _count
    suffix seems pointless.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass
    [trini: fixup cpu_info-rcar.c]
    Signed-off-by: Tom Rini

    Masahiro Yamada
     

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

    Tom Rini
     

28 Apr, 2018

1 commit


19 Apr, 2018

1 commit


18 Apr, 2018

3 commits


17 Apr, 2018

1 commit


10 Apr, 2018

3 commits

  • This patch adds the bulk reset API tests for the sandbox test suite.

    Unlike the main test, it also check the "other" reset signal using the bulk API
    and checks if the resets are correctly asserted/deasserted.

    To allow the bulk API to work, and avoid changing the DT, the number of resets
    of the sandbox reset controller has been bumped to 101 for the "other" reset
    line to be valid.

    Signed-off-by: Neil Armstrong
    Reviewed-by: Simon Glass

    Neil Armstrong
     
  • This patch adds a "bulk" API to the reset API in order to get/deassert/
    assert/release a group of reset signals associated with a device.

    This bulk API will avoid adding a copy of the same code to manage
    a group of reset signals in drivers.

    Signed-off-by: Neil Armstrong
    Reviewed-by: Simon Glass

    Neil Armstrong
     
  • The Amlogic Meson SoCs embeds up to 256 reset lines, add the corresponding
    driver.

    Signed-off-by: Neil Armstrong

    Neil Armstrong
     

20 Mar, 2018

1 commit


24 Jan, 2018

1 commit


09 Jan, 2018

1 commit

  • Create driver to support the soft reset (i.e. peripheral)
    of all Rockchip SoCs.

    Example of usage:
    i2c driver:
    ret = reset_get_by_name(dev, "i2c", &reset_ctl);
    if (ret) {
    error("reset_get_by_name() failed: %d\n", ret);
    }

    reset_assert(&reset_ctl);
    udelay(50);
    reset_deassert(&reset_ctl);

    i2c dts node:
    resets = , ;
    reset-names = "p_i2c", "i2c";

    Signed-off-by: Elaine Zhang
    Signed-off-by: Kever Yang
    Acked-by: Philipp Tomsich
    Reviewed-by: Philipp Tomsich
    [Fixed commit tag:]
    Signed-off-by: Philipp Tomsich

    Elaine Zhang
     

06 Nov, 2017

2 commits


15 Oct, 2017

1 commit


04 Oct, 2017

1 commit

  • U-Boot widely uses error() as a bit noisier variant of printf().

    This macro causes name conflict with the following line in
    include/linux/compiler-gcc.h:

    # define __compiletime_error(message) __attribute__((error(message)))

    This prevents us from using __compiletime_error(), and makes it
    difficult to fully sync BUILD_BUG macros with Linux. (Notice
    Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().)

    Let's convert error() into now treewide-available pr_err().

    Done with the help of Coccinelle, excluing tools/ directory.

    The semantic patch I used is as follows:

    //
    @@@@
    -error
    +pr_err
    (...)
    //

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass
    [trini: Re-run Coccinelle]
    Signed-off-by: Tom Rini

    Masahiro Yamada
     

22 Sep, 2017

1 commit

  • This driver is adapted from linux drivers/reset/reset-stm32.c
    It's compatible with STM32 F4/F7/H7 SoCs.

    This driver doesn't implement .of_match as it's binded
    by MFD RCC driver.

    To add support for each SoC family, a SoC's specific
    include/dt-binfings/mfd/stm32xx-rcc.h file must be added.

    This patch only includes stm32h7-rcc.h dedicated for STM32H7 SoCs.
    Other SoCs support will be added in the future.

    Signed-off-by: Patrice Chotard
    Reviewed-by: Simon Glass

    Patrice Chotard
     

30 Aug, 2017

2 commits


20 Aug, 2017

2 commits


29 Jul, 2017

2 commits


25 Jun, 2017

1 commit


06 Jun, 2017

1 commit

  • This deassert counter allow to manage "shared" reset lines
    encountered in some specific case. On STiH410 SoC, DWC3,
    EHCI and OHCI are all using a respective PHY, but all of
    these PHYs shared a "global" reset.

    Currently, during command "usb stop", all host controller are
    stopped (XHCI, EHCI and OHCI). XHCI is first shutdowned, which
    means that PHY global reset is asserted. Then EHCI is shutdowned,
    but its PHY reset has already been asserted which make handshake()
    call failed in ehci_shutdown().

    This counter allows to really assert a reset lines only when the
    "last" user is asserting it.

    Signed-off-by: Patrice Chotard
    Reviewed-by: Simon Glass

    Patrice Chotard
     

01 Jun, 2017

3 commits

  • Update the reset domain uclass to support livetree. Fix the xlate() method
    which has no callers.

    Signed-off-by: Simon Glass

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

    All 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

    Simon Glass
     
  • This header includes things that are needed to make driver build. Adjust
    existing users to include that always, even if other dm/ includes are
    present

    Signed-off-by: Simon Glass

    Simon Glass
     

10 May, 2017

1 commit