17 Jan, 2020

2 commits


27 Aug, 2019

1 commit

  • We don't need dev_err() messages when platform_get_irq() fails now that
    platform_get_irq() prints an error message itself when something goes
    wrong. Let's remove these prints with a simple semantic patch.

    //
    @@
    expression ret;
    struct platform_device *E;
    @@

    ret =
    (
    platform_get_irq(E, ...)
    |
    platform_get_irq_byname(E, ...)
    );

    if ( \( ret < 0 \| ret

    While we're here, remove braces on if statements that only have one
    statement (manually).

    Cc: Greg Kroah-Hartman
    Cc: Daniel Lezcano
    Cc: Thomas Gleixner
    Signed-off-by: Stephen Boyd
    Reviewed-by: Geert Uytterhoeven
    Signed-off-by: Daniel Lezcano

    Stephen Boyd
     

31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license this
    program is distributed in the hope that it will be useful but
    without any warranty without even the implied warranty of
    merchantability or fitness for a particular purpose see the gnu
    general public license for more details you should have received a
    copy of the gnu general public license along with this program if
    not write to the free software foundation inc 59 temple place suite
    330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

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

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Steve Winslow
    Reviewed-by: Alexios Zavras
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190528170026.251475812@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

10 Aug, 2017

1 commit


24 Mar, 2017

2 commits

  • With the upcoming NTP correction related rate adjustments to be implemented
    in the clockevents core, the latter needs to get informed about every rate
    change of a clockevent device made after its registration.

    Currently, em_sti violates this requirement in that it registers its
    clockevent device with a dummy rate and sets its final rate through
    clockevents_config() called from its ->set_state_oneshot().

    This patch moves the setting of the clockevent device's rate to its
    registration.

    I checked all current em_sti users in arch/arm/mach-shmobile and right now,
    none of them changes any rate in any clock tree relevant to em_sti after
    their respective time_init(). Since all em_sti instances are created after
    time_init(), none of them should ever observe any clock rate changes.

    - Determine the ->rate value in em_sti_probe() at device probing rather
    than at first usage.
    - Set the clockevent device's rate at its registration.
    - Although not strictly necessary for the upcoming clockevent core changes,
    set the clocksource's rate at its registration for consistency.

    Signed-off-by: Nicolai Stange
    Signed-off-by: John Stultz

    Nicolai Stange
     
  • Currently, the em_sti driver prepares and enables the needed clock in
    em_sti_enable(), potentially called through its clockevent device's
    ->set_state_oneshot().

    However, the clk_prepare() step may sleep whereas tick_program_event() and
    thus, ->set_state_oneshot(), can be called in atomic context.

    Split the clk_prepare_enable() in em_sti_enable() into two steps:
    - prepare the clock at device probing via clk_prepare()
    - and enable it in em_sti_enable() via clk_enable().
    Slightly reorder resource initialization in em_sti_probe() in order to
    facilitate error handling in later patches.

    Signed-off-by: Nicolai Stange
    Signed-off-by: John Stultz

    Nicolai Stange
     

25 Dec, 2016

1 commit


15 Oct, 2015

1 commit


06 Aug, 2015

1 commit

  • Migrate em_sti driver to the new 'set-state' interface provided by
    the clockevents core, the earlier 'set-mode' interface is marked
    obsolete now.

    This also enables us to implement callbacks for new states of clockevent
    devices, for example: ONESHOT_STOPPED.

    NOTE: This also drops a special check:

    if (old_mode == CLOCK_EVT_MODE_ONESHOT)
    em_sti_stop(p, USER_CLOCKEVENT);

    as it doesn't look like that important. This driver only supports
    ONESHOT and we can only move only to SHUTDOWN from ONESHOT and.
    Also on second call (on shutdown), em_sti_stop() would return without
    disabling the device again.

    Acked-by: Daniel Lezcano
    Cc: Magnus Damm
    Signed-off-by: Viresh Kumar
    Signed-off-by: Daniel Lezcano

    Viresh Kumar
     

13 Mar, 2015

1 commit

  • Ingo requested this function be renamed to improve readability,
    so I've renamed __clocksource_updatefreq_scale() as well as the
    __clocksource_updatefreq_hz/khz() functions to avoid
    squishedtogethernames.

    This touches some of the sh clocksources, which I've not tested.

    The arch/arm/plat-omap change is just a comment change for
    consistency.

    Signed-off-by: John Stultz
    Cc: Daniel Lezcano
    Cc: Dave Jones
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Prarit Bhargava
    Cc: Richard Cochran
    Cc: Stephen Boyd
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1426133800-29329-13-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    John Stultz
     

23 May, 2014

1 commit


23 Oct, 2013

1 commit


26 Sep, 2013

1 commit

  • Update the STI driver by setting cpu_possible_mask to make EMEV2
    SMP work as expected together with the ARM broadcast timer.

    This breakage was introduced by:

    f7db706 ARM: 7674/1: smp: Avoid dummy clockevent being preferred over real hardware clock-event

    Without this fix SMP operation is broken on EMEV2 since no
    broadcast timer interrupts trigger on the secondary CPU cores.

    Signed-off-by: Magnus Damm
    Tested-by: Simon Horman
    Reviewed-by: Stephen Boyd
    Signed-off-by: Simon Horman
    Signed-off-by: Daniel Lezcano

    Magnus Damm
     

22 Aug, 2013

1 commit


13 Mar, 2013

1 commit

  • The reason for this is to ensure that STI is probed earlier
    than with its previous initcall level, module init.

    This came up as a problem with using CMT as a clock source kzm9g-reference
    which does not make use of early timers or devices. In that scenario
    initialisation of SDHI and MMCIF both stall on msleep() calls due to the
    absence of a initialised clock source.

    The purpose of this change is to keep the STI code in sync with the CMT code
    which has been modified in a similar manner..

    Boot tested on: kzm9d.

    Signed-off-by: Simon Horman

    Simon Horman
     

04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: John Stultz
    Cc: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

25 May, 2012

2 commits

  • Update the em-sti driver to support DT.

    Signed-off-by: Magnus Damm
    Cc: arnd@arndb.de
    Cc: horms@verge.net.au
    Cc: johnstul@us.ibm.com
    Cc: rjw@sisk.pl
    Cc: lethal@linux-sh.org
    Cc: gregkh@linuxfoundation.org
    Cc: olof@lixom.net
    Link: http://lkml.kernel.org/r/20120509143950.27521.7949.sendpatchset@w520
    Signed-off-by: Thomas Gleixner

    Magnus Damm
     
  • The STI hardware is based on a single 48-bit 32kHz
    counter that together with two individual compare
    registers can generate interrupts. There are no
    timer operating modes selectable which means that
    the timer can not clear on match.

    This driver is providing clocksource support for the
    48-bit counter. Clockevents are also supported using
    the same timer in oneshot mode.

    Signed-off-by: Magnus Damm
    Cc: horms@verge.net.au
    Cc: arnd@arndb.de
    Cc: johnstul@us.ibm.com
    Cc: rjw@sisk.pl
    Cc: lethal@linux-sh.org
    Cc: gregkh@linuxfoundation.org
    Cc: olof@lixom.net
    Link: http://lkml.kernel.org/r/20120525070344.23443.69756.sendpatchset@w520
    Signed-off-by: Thomas Gleixner

    Magnus Damm