27 Feb, 2020

1 commit

  • request_irq() is preferred over setup_irq(). The early boot setup_irq()
    invocations happen either via 'init_IRQ()' or 'time_init()', while
    memory allocators are ready by 'mm_init()'.

    Per tglx[1], setup_irq() existed in olden days when allocators were not
    ready by the time early interrupts were initialized.

    Hence replace setup_irq() by request_irq().

    Seldom remove_irq() usage has been observed coupled with setup_irq(),
    wherever that has been found, it too has been replaced by free_irq().

    A build error that was reported by kbuild test robot
    in the previous version of the patch also has been fixed.

    [1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos

    Signed-off-by: afzal mohammed
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/91961c77c1cf93d41523f5e1ac52043f32f97077.1582799709.git.afzal.mohd.ma@gmail.com

    afzal mohammed
     

21 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    licensed under gplv2 or later

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 118 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Jilayne Lovejoy
    Reviewed-by: Steve Winslow
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190519154040.961286471@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

14 Jun, 2017

1 commit

  • The CLOCKSOURCE_OF_DECLARE macro is used widely for the timers to declare the
    clocksource at early stage. However, this macro is also used to initialize
    the clockevent if any, or the clockevent only.

    It was originally suggested to declare another macro to initialize a
    clockevent, so in order to separate the two entities even they belong to the
    same IP. This was not accepted because of the impact on the DT where splitting
    a clocksource/clockevent definition does not make sense as it is a Linux
    concept not a hardware description.

    On the other side, the clocksource has not interrupt declared while the
    clockevent has, so it is easy from the driver to know if the description is
    for a clockevent or a clocksource, IOW it could be implemented at the driver
    level.

    So instead of dealing with a named clocksource macro, let's use a more generic
    one: TIMER_OF_DECLARE.

    The patch has not functional changes.

    Signed-off-by: Daniel Lezcano
    Acked-by: Heiko Stuebner
    Acked-by: Neil Armstrong
    Acked-by: Arnd Bergmann
    Acked-by: Matthias Brugger
    Reviewed-by: Linus Walleij

    Daniel Lezcano
     

07 Apr, 2017

1 commit


25 Dec, 2016

1 commit


28 Jun, 2016

3 commits

  • The driver includes the header but it is pointless.

    Remove it.

    Signed-off-by: Daniel Lezcano

    Daniel Lezcano
     
  • All the clocksource drivers's init function are now converted to return
    an error code. CLOCKSOURCE_OF_DECLARE is no longer used as well as the
    clksrc-of table.

    Let's convert back the names:
    - CLOCKSOURCE_OF_DECLARE_RET => CLOCKSOURCE_OF_DECLARE
    - clksrc-of-ret => clksrc-of

    Signed-off-by: Daniel Lezcano

    For exynos_mct and samsung_pwm_timer:
    Acked-by: Krzysztof Kozlowski

    For arch/arc:
    Acked-by: Vineet Gupta

    For mediatek driver:
    Acked-by: Matthias Brugger

    For the Rockchip-part
    Acked-by: Heiko Stuebner

    For STi :
    Acked-by: Patrice Chotard

    For the mps2-timer.c and versatile.c changes:
    Acked-by: Liviu Dudau

    For the OXNAS part :
    Acked-by: Neil Armstrong

    For LPC32xx driver:
    Acked-by: Sylvain Lemieux

    For Broadcom Kona timer change:
    Acked-by: Ray Jui

    For Sun4i and Sun5i:
    Acked-by: Chen-Yu Tsai

    For Meson6:
    Acked-by: Carlo Caione

    For Keystone:
    Acked-by: Santosh Shilimkar

    For NPS:
    Acked-by: Noam Camus

    For bcm2835:
    Acked-by: Eric Anholt

    Daniel Lezcano
     
  • The init functions do not return any error. They behave as the following:

    - panic, thus leading to a kernel crash while another timer may work and
    make the system boot up correctly

    or

    - print an error and let the caller unaware if the state of the system

    Change that by converting the init functions to return an error conforming
    to the CLOCKSOURCE_OF_RET prototype.

    Proper error handling (rollback, errno value) will be changed later case
    by case, thus this change just return back an error or success in the init
    function.

    Signed-off-by: Daniel Lezcano

    Daniel Lezcano
     

27 Oct, 2015

1 commit

  • Currently prima2 timer can be used as a scheduler clock. We properly
    marked sirfsoc_read_sched_clock() as notrace but we then call another
    function sirfsoc_timer_read() that _wasn't_ notrace.

    Having a traceable function in the sched_clock() path leads to a recursion
    within ftrace and a kernel crash.

    Fix this by adding notrace attribute to the sirfsoc_timer_read() function.

    Signed-off-by: Jisheng Zhang
    Signed-off-by: Daniel Lezcano

    Jisheng Zhang
     

10 Aug, 2015

1 commit


23 Jul, 2014

1 commit

  • In the clocksource driver, we didn't explicitly enable the clock. it makes the
    clk reference counter wrong. We didn't encounter any hang issue because the
    tick's clock input has been open and is shared by some other hardware
    components, but if we don't enable those components in kernel, in the stage of
    disabling unused clk in kernel boot, Linux tick hangs.

    This patch fixes it. it does an explicit prepare and enable to the clock input,
    and increases the usage counter of the clk.

    Signed-off-by: Zhiwu Song
    Signed-off-by: Barry Song
    Signed-off-by: Daniel Lezcano

    Zhiwu Song
     

12 May, 2014

2 commits

  • Nobody want to know the connection between io clk and timer clk,
    so exposing this information to timer module is not reasonable.
    this patch moves to define the timers' clk in dt.

    Signed-off-by: Zhiwu Song
    Signed-off-by: Barry Song

    Zhiwu Song
     
  • Fix the "line over 80 characters". users of the codes - key customers
    really care about that.

    WARNING: line over 80 characters
    64: FILE: timer-prima2.c:64:
    + WARN_ON(!(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_STATUS) & BIT(0)));

    WARNING: line over 80 characters
    80: FILE: timer-prima2.c:80:
    + writel_relaxed(SIRFSOC_TIMER_LATCH_BIT, sirfsoc_timer_base + SIRFSOC_TIMER_LATCH);

    WARNING: line over 80 characters
    82: FILE: timer-prima2.c:82:
    + cycles = (cycles << 32) | readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_LATCHED_LO);

    WARNING: line over 80 characters
    92: FILE: timer-prima2.c:92:
    + writel_relaxed(SIRFSOC_TIMER_LATCH_BIT, sirfsoc_timer_base + SIRFSOC_TIMER_LATCH);

    WARNING: line over 80 characters
    96: FILE: timer-prima2.c:96:
    + writel_relaxed(SIRFSOC_TIMER_LATCH_BIT, sirfsoc_timer_base + SIRFSOC_TIMER_LATCH);

    WARNING: line over 80 characters
    111: FILE: timer-prima2.c:111:
    + writel_relaxed(val | BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_INT_EN);

    WARNING: line over 80 characters
    114: FILE: timer-prima2.c:114:
    + writel_relaxed(val & ~BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_INT_EN);

    WARNING: line over 80 characters
    126: FILE: timer-prima2.c:126:
    + writel_relaxed(SIRFSOC_TIMER_LATCH_BIT, sirfsoc_timer_base + SIRFSOC_TIMER_LATCH);

    WARNING: line over 80 characters
    129: FILE: timer-prima2.c:129:
    + sirfsoc_timer_reg_val[i] = readl_relaxed(sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);

    WARNING: line over 80 characters
    137: FILE: timer-prima2.c:137:
    + writel_relaxed(sirfsoc_timer_reg_val[i], sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);

    WARNING: line over 80 characters
    139: FILE: timer-prima2.c:139:
    + writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 2], sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_LO);

    WARNING: line over 80 characters
    140: FILE: timer-prima2.c:140:
    + writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 1], sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_HI);

    WARNING: line over 80 characters
    216: FILE: timer-prima2.c:216:
    +CLOCKSOURCE_OF_DECLARE(sirfsoc_prima2_timer, "sirf,prima2-tick", sirfsoc_prima2_timer_init);

    total: 0 errors, 13 warnings, 216 lines checked

    timer-prima2.c has style problems, please review.

    If any of these errors are false positives, please report
    them to the maintainer, see CHECKPATCH in MAINTAINERS.

    Signed-off-by: Bin Shi
    Signed-off-by: Barry Song

    Bin Shi
     

20 Dec, 2013

1 commit

  • Since CSR SiRF was converted to multi platform in cf82e0e (ARM: sirf:
    enable multiplatform support) the symbol CLOCK_TICK_RATE isn't the
    platform specific definition any more, but a global dummy value. There
    was no harm introduced in cf82e0e because the global value happens to
    match the old platform specific one, still this dummy value isn't
    intended to be used and will hopefully disappear soon, so introduce a
    local #define and use that instead.

    Acked-by: Daniel Lezcano
    Signed-off-by: Uwe Kleine-König

    Uwe Kleine-König
     

31 Jul, 2013

1 commit


13 Jun, 2013

1 commit


25 Mar, 2013

1 commit