12 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).

    Signed-off-by: Stephen Boyd
    Signed-off-by: Lee Jones

    Stephen Boyd
     

05 Jun, 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 version 2 and
    only version 2 as published by the free software foundation 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

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

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

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

    Thomas Gleixner
     

03 Jan, 2019

1 commit


04 Oct, 2016

2 commits

  • The MSM8660, APQ8060, IPQ806x and MSM8960 have a GCC clock
    to the message RAM used by the RPM. This needs to be enabled
    for messages to pass through. This is a crude solution that
    simply prepare/enable at probe() and disable/unprepare
    at remove(). More elaborate PM is probably possible to
    add later.

    The construction uses IS_ERR() to gracefully handle the
    platforms that do not provide a message RAM clock. It will
    bail out of probe only if the clock is hitting a probe
    deferral situation.

    Of course this requires the proper device tree set-up:

    rpm: rpm@104000 {
    compatible = "qcom,rpm-msm8660";
    clocks = ;
    clock-names = "ram";
    ...
    };

    I have provided this in the MSM8660 device tree, and will
    provide patches for the other targets.

    Cc: Björn Andersson
    Signed-off-by: Linus Walleij
    Signed-off-by: Lee Jones

    Linus Walleij
     
  • of_node_put needs to be called when the device node which is got
    from of_parse_phandle has finished using.

    Signed-off-by: Peter Chen
    Reviewed-by: Bjorn Andersson
    Signed-off-by: Lee Jones

    Peter Chen
     

31 Aug, 2016

1 commit


29 Jun, 2016

3 commits

  • The RPM has two sets of selectors (IPC bit fields): request and
    acknowledge. Apparently, some models use 4*32 bit words for select
    and some use 7*32 bit words for request, but all use 7*32 words
    for acknowledge bits.

    So apparently you can on the models with requests of 4*32 select
    bits send 4*32 messages and get 7*32 different replies, so on ACK
    interrupt, 7*32 bit words need to be read. This is how the vendor
    code apparently works.

    Cc: stable@vger.kernel.org
    Reported-by: Stephen Boyd
    Signed-off-by: Linus Walleij
    Reviewed-by: Bjorn Andersson
    Signed-off-by: Lee Jones

    Linus Walleij
     
  • This define RPM_SIGNAL probably pertains to the IPC signal which
    we ended up fetching from the device tree instead. the define is
    unused, remove it.

    Signed-off-by: Linus Walleij
    Reviewed-by: Stephen Boyd
    Signed-off-by: Lee Jones

    Linus Walleij
     
  • The RPM in MSM8660/APQ8060 has different offsets to the selector
    ACK and request context ACK registers. Make all these register
    offsets part of the per-SoC data and assign the right values.

    The bug was found by verifying backwards to the vendor tree in
    the out-of-tree files : all were using
    offsets 3,11,15,23 and a select size of 4, except the MSM8660/APQ8060
    which was using offsets 3,11,19,27 and a select size of 7.

    All other platforms apart from msm8660 were affected by reading
    excess registers, since 7 was hardcoded as the number of select
    words, this patch makes also this part dynamic so we only write/read
    as many select words as the platform actually use.

    Symptoms of this bug when using msm8660: the first RPM transaction
    would work, but the next would stall or raise an error since the
    previous transaction was not properly ACKed as the ACK words were
    read at the wrong offset.

    Cc: stable@vger.kernel.org
    Fixes: 58e214382bdd ("mfd: qcom-rpm: Driver for the Qualcomm RPM")
    Signed-off-by: Linus Walleij
    Reviewed-by: Björn Andersson
    Signed-off-by: Lee Jones

    Linus Walleij
     

04 Dec, 2015

1 commit


31 Oct, 2015

1 commit


11 Aug, 2015

1 commit


30 Mar, 2015

1 commit

  • The IPQ8064 also includes an RPM following the same message structure as
    other chips. In addition, it supports a few new resource types to
    support the NSS fabric clocks and the SMB208/SMB209 regulators found on
    the reference boards.

    Signed-off-by: Josh Cartwright
    Signed-off-by: Stephen Boyd
    Signed-off-by: Lee Jones

    Josh Cartwright
     

23 Jan, 2015

1 commit

  • Driver for the Resource Power Manager (RPM) found in Qualcomm 8660, 8960
    and 8064 based devices. The driver exposes resources that child drivers
    can operate on; to implementing regulator, clock and bus frequency
    drivers.

    Signed-off-by: Bjorn Andersson
    Signed-off-by: Lee Jones

    Bjorn Andersson