Skip to content

Commit

Permalink
Merge tag 'qcom-drivers-for-5.9-2' of git://git.kernel.org/pub/scm/li…
Browse files Browse the repository at this point in the history
…nux/kernel/git/qcom/linux into arm/drivers

Qualcomm driver additional updates for 5.9

This fixes a potential race condition with remoteprocs by not sending
acknowledgements until after registered drivers has processed the event.
It adds IPQ6018 support to the SMD RPM driver, fixes kerneldoc in the
same and converts the related DT binding to YAML.
Finally it fixes a compilation warning in the geni serial engine driver
when compiled without CONFIG_SERIAL_EARLYCON.

* tag 'qcom-drivers-for-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  soc: qcom: geni: Fix unused label warning
  soc: qcom: smd-rpm: Fix kerneldoc
  soc: qcom: pdr: Reorder the PD state indication ack
  dt-bindings: soc: qcom: smd-rpm: Convert binding to YAML schema
  soc: qcom: smd-rpm: Add IPQ6018 compatible
  dt-bindings: soc: qcom: smd-rpm: Add IPQ6018 compatible

Link: https://lore.kernel.org/r/20200730051852.649761-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann committed Jul 31, 2020
2 parents d7c6dbc + 0fec861 commit d76cfc7
Showing 5 changed files with 94 additions and 66 deletions.
64 changes: 0 additions & 64 deletions Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.txt

This file was deleted.

87 changes: 87 additions & 0 deletions Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/soc/qcom/qcom,smd-rpm.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: Qualcomm Resource Power Manager (RPM) over SMD

description: |
This driver is used to interface with the Resource Power Manager (RPM) found
in various Qualcomm platforms. The RPM allows each component in the system
to vote for state of the system resources, such as clocks, regulators and bus
frequencies.
The SMD information for the RPM edge should be filled out. See qcom,smd.txt
for the required edge properties. All SMD related properties will reside
within the RPM node itself.
The RPM exposes resources to its subnodes. The rpm_requests node must be
present and this subnode may contain children that designate regulator
resources.
Refer to Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt
for information on the regulator subnodes that can exist under the
rpm_requests.
maintainers:
- Kathiravan T <kathirav@codeaurora.org>

properties:
compatible:
enum:
- qcom,rpm-apq8084
- qcom,rpm-ipq6018
- qcom,rpm-msm8916
- qcom,rpm-msm8974
- qcom,rpm-msm8976
- qcom,rpm-msm8996
- qcom,rpm-msm8998
- qcom,rpm-sdm660
- qcom,rpm-qcs404

qcom,smd-channels:
$ref: /schemas/types.yaml#/definitions/string-array
description: Channel name used for the RPM communication
items:
- const: rpm_requests

if:
properties:
compatible:
contains:
enum:
- qcom,rpm-apq8084
- qcom,rpm-msm8916
- qcom,rpm-msm8974
then:
required:
- qcom,smd-channels

required:
- compatible

additionalProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
smd {
compatible = "qcom,smd";
rpm {
interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
qcom,ipc = <&apcs 8 0>;
qcom,smd-edge = <15>;
rpm_requests {
compatible = "qcom,rpm-msm8974";
qcom,smd-channels = "rpm_requests";
/* Regulator nodes to follow */
};
};
};
...
4 changes: 3 additions & 1 deletion drivers/soc/qcom/pdr_interface.c
Original file line number Diff line number Diff line change
@@ -278,13 +278,15 @@ static void pdr_indack_work(struct work_struct *work)

list_for_each_entry_safe(ind, tmp, &pdr->indack_list, node) {
pds = ind->pds;
pdr_send_indack_msg(pdr, pds, ind->transaction_id);

mutex_lock(&pdr->status_lock);
pds->state = ind->curr_state;
pdr->status(pds->state, pds->service_path, pdr->priv);
mutex_unlock(&pdr->status_lock);

/* Ack the indication after clients release the PD resources */
pdr_send_indack_msg(pdr, pds, ind->transaction_id);

mutex_lock(&pdr->list_lock);
list_del(&ind->node);
mutex_unlock(&pdr->list_lock);
2 changes: 1 addition & 1 deletion drivers/soc/qcom/qcom-geni-se.c
Original file line number Diff line number Diff line change
@@ -910,8 +910,8 @@ static int geni_se_probe(struct platform_device *pdev)
if (of_get_compatible_child(pdev->dev.of_node, "qcom,geni-debug-uart"))
earlycon_wrapper = wrapper;
of_node_put(pdev->dev.of_node);
#endif
exit:
#endif
dev_set_drvdata(dev, wrapper);
dev_dbg(dev, "GENI SE Driver probed\n");
return devm_of_platform_populate(dev);
3 changes: 3 additions & 0 deletions drivers/soc/qcom/smd-rpm.c
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@
* struct qcom_smd_rpm - state of the rpm device driver
* @rpm_channel: reference to the smd channel
* @icc: interconnect proxy device
* @dev: rpm device
* @ack: completion for acks
* @lock: mutual exclusion around the send/complete pair
* @ack_status: result of the rpm request
@@ -86,6 +87,7 @@ struct qcom_rpm_message {
/**
* qcom_rpm_smd_write - write @buf to @type:@id
* @rpm: rpm handle
* @state: active/sleep state flags
* @type: resource type
* @id: resource identifier
* @buf: the data to be written
@@ -230,6 +232,7 @@ static void qcom_smd_rpm_remove(struct rpmsg_device *rpdev)

static const struct of_device_id qcom_smd_rpm_of_match[] = {
{ .compatible = "qcom,rpm-apq8084" },
{ .compatible = "qcom,rpm-ipq6018" },
{ .compatible = "qcom,rpm-msm8916" },
{ .compatible = "qcom,rpm-msm8936" },
{ .compatible = "qcom,rpm-msm8974" },

0 comments on commit d76cfc7

Please sign in to comment.