18 Jan, 2020

1 commit


03 Dec, 2019

4 commits


31 Oct, 2019

1 commit

  • Add get_timer_us(), which is useful e.g. when we need higher
    precision timestamps.

    Signed-off-by: Marek Vasut
    Cc: Tom Rini
    Cc: Simon Glass
    [trini: Fixup arch/arm/mach-bcm283x/include/mach/timer.h]
    Signed-off-by: Tom Rini

    Marek Vasut
     

05 Jun, 2019

1 commit


23 Apr, 2019

1 commit

  • When fixing sandbox test for regmap_read_poll_timeout(), the
    sandbox_timer_add_offset was introduced but only defined in sandbox code
    thus generating warnings when used out of sandbox :

    include/regmap.h:289:2: note: in expansion of macro 'regmap_read_poll_timeout_test'
    regmap_read_poll_timeout_test(map, addr, val, cond, sleep_us, \
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/spi/meson_spifc.c:169:8: note: in expansion of macro 'regmap_read_poll_timeout'
    ret = regmap_read_poll_timeout(spifc->regmap, REG_SLAVE, data,
    ^~~~~~~~~~~~~~~~~~~~~~~~
    drivers/spi/meson_spifc.c: In function 'meson_spifc_txrx':
    include/regmap.h:277:4: warning: implicit declaration of function 'sandbox_timer_add_offset' [-Wimplicit-function-declaration]

    This fix adds a timer_test_add_offset() only defined in sandbox, and
    renames the previous sandbox_timer_add_offset() to it.

    Cc: Simon Glass
    Reported-by: Tom Rini
    Fixes: df9cf1cc08 ("test: dm: regmap: Fix the long test delay")
    Signed-off-by: Neil Armstrong
    Reviewed-by: Simon Glass

    Neil Armstrong
     

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
     

15 Jan, 2017

2 commits

  • It is not safe to compare timer values directly.

    On 32-bit systems, for example, timer_get_us() wraps around every
    72 min. (2 ^ 32 / 1000000 =~ 4295 sec =~ 72 min). Depending on
    the get_ticks() implementation, it may wrap more frequently.
    The 72 min might be possible on the use of U-Boot.

    Let's borrow time_after, time_before, and friends to solve the
    wrap-around problem.

    These macros were copied from include/linux/jiffies.h of Linux 4.9.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass

    Masahiro Yamada
     
  • The include/common.h is a collection of unrelated declarations,
    macros, etc.

    It is horrible to include such a cluttered header just for some
    timer functions. Split out timer functions into include/time.h.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass

    Masahiro Yamada