24 Feb, 2020

1 commit

  • [ Upstream commit cea931c25104e6bddc42eb067f58193f355dbdd7 ]

    The DM365 platform has a strange quirk (only present when using ancient
    u-boot - mainline u-boot v2013.01 and later works fine) where if we
    enable the second half of the timer in periodic mode before we do its
    initialization - the time won't start flowing and we can't boot.

    When using more recent u-boot, we can enable the timer, then reinitialize
    it and all works fine.

    To work around this issue only enable clockevents once tim34 is
    initialized i.e. move clockevents_config_and_register() below tim34
    initialization.

    Signed-off-by: Bartosz Golaszewski
    Signed-off-by: Sekhar Nori
    Signed-off-by: Sasha Levin

    Bartosz Golaszewski
     

26 Jun, 2019

2 commits

  • Extend the davinci-timer driver to also register a clock source.

    Signed-off-by: Bartosz Golaszewski
    Signed-off-by: Daniel Lezcano

    Bartosz Golaszewski
     
  • Currently the clocksource and clockevent support for davinci platforms
    lives in mach-davinci. It hard-codes many things, uses global variables,
    implements functionalities unused by any platform and has code fragments
    scattered across many (often unrelated) files.

    Implement a new, modern and simplified timer driver and put it into
    drivers/clocksource. We still need to support legacy board files so
    export a config structure and a function that allows machine code to
    register the timer.

    The timer we're using is 64-bit but can be programmed in dual 32-bit
    mode (both chained and unchained).

    On all davinci SoCs except for da830 we're using both halves. Lower half
    for clockevents and upper half for clocksource. On da830 we're using the
    lower half for both with the help of a compare register.

    This patch contains the core code and support for clockevent. The
    clocksource code will be included in a subsequent patch.

    Signed-off-by: Bartosz Golaszewski
    Signed-off-by: Daniel Lezcano

    Bartosz Golaszewski