Merge tag 'qcom-drivers-for-5.9-2' of git://git.kernel.org/pub/scm/linux/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>
This commit is contained in:
@@ -1,64 +0,0 @@
|
|||||||
Qualcomm Resource Power Manager (RPM) over SMD
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
= SUBDEVICES
|
|
||||||
|
|
||||||
The RPM exposes resources to its subnodes. The rpm_requests node must be
|
|
||||||
present and this subnode may contain children that designate regulator
|
|
||||||
resources.
|
|
||||||
|
|
||||||
- compatible:
|
|
||||||
Usage: required
|
|
||||||
Value type: <string>
|
|
||||||
Definition: must be one of:
|
|
||||||
"qcom,rpm-apq8084"
|
|
||||||
"qcom,rpm-msm8916"
|
|
||||||
"qcom,rpm-msm8936"
|
|
||||||
"qcom,rpm-msm8974"
|
|
||||||
"qcom,rpm-msm8976"
|
|
||||||
"qcom,rpm-msm8994"
|
|
||||||
"qcom,rpm-msm8998"
|
|
||||||
"qcom,rpm-sdm660"
|
|
||||||
"qcom,rpm-qcs404"
|
|
||||||
|
|
||||||
- qcom,smd-channels:
|
|
||||||
Usage: required
|
|
||||||
Value type: <string>
|
|
||||||
Definition: must be "rpm_requests"
|
|
||||||
|
|
||||||
Refer to Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt
|
|
||||||
for information on the regulator subnodes that can exist under the rpm_requests.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
soc {
|
|
||||||
apcs: syscon@f9011000 {
|
|
||||||
compatible = "syscon";
|
|
||||||
reg = <0xf9011000 0x1000>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
smd {
|
|
||||||
compatible = "qcom,smd";
|
|
||||||
|
|
||||||
rpm {
|
|
||||||
interrupts = <0 168 1>;
|
|
||||||
qcom,ipc = <&apcs 8 0>;
|
|
||||||
qcom,smd-edge = <15>;
|
|
||||||
|
|
||||||
rpm_requests {
|
|
||||||
compatible = "qcom,rpm-msm8974";
|
|
||||||
qcom,smd-channels = "rpm_requests";
|
|
||||||
|
|
||||||
...
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
87
Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml
Normal file
87
Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml
Normal file
@@ -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 */
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
...
|
@@ -278,13 +278,15 @@ static void pdr_indack_work(struct work_struct *work)
|
|||||||
|
|
||||||
list_for_each_entry_safe(ind, tmp, &pdr->indack_list, node) {
|
list_for_each_entry_safe(ind, tmp, &pdr->indack_list, node) {
|
||||||
pds = ind->pds;
|
pds = ind->pds;
|
||||||
pdr_send_indack_msg(pdr, pds, ind->transaction_id);
|
|
||||||
|
|
||||||
mutex_lock(&pdr->status_lock);
|
mutex_lock(&pdr->status_lock);
|
||||||
pds->state = ind->curr_state;
|
pds->state = ind->curr_state;
|
||||||
pdr->status(pds->state, pds->service_path, pdr->priv);
|
pdr->status(pds->state, pds->service_path, pdr->priv);
|
||||||
mutex_unlock(&pdr->status_lock);
|
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);
|
mutex_lock(&pdr->list_lock);
|
||||||
list_del(&ind->node);
|
list_del(&ind->node);
|
||||||
mutex_unlock(&pdr->list_lock);
|
mutex_unlock(&pdr->list_lock);
|
||||||
|
@@ -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"))
|
if (of_get_compatible_child(pdev->dev.of_node, "qcom,geni-debug-uart"))
|
||||||
earlycon_wrapper = wrapper;
|
earlycon_wrapper = wrapper;
|
||||||
of_node_put(pdev->dev.of_node);
|
of_node_put(pdev->dev.of_node);
|
||||||
#endif
|
|
||||||
exit:
|
exit:
|
||||||
|
#endif
|
||||||
dev_set_drvdata(dev, wrapper);
|
dev_set_drvdata(dev, wrapper);
|
||||||
dev_dbg(dev, "GENI SE Driver probed\n");
|
dev_dbg(dev, "GENI SE Driver probed\n");
|
||||||
return devm_of_platform_populate(dev);
|
return devm_of_platform_populate(dev);
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
* struct qcom_smd_rpm - state of the rpm device driver
|
* struct qcom_smd_rpm - state of the rpm device driver
|
||||||
* @rpm_channel: reference to the smd channel
|
* @rpm_channel: reference to the smd channel
|
||||||
* @icc: interconnect proxy device
|
* @icc: interconnect proxy device
|
||||||
|
* @dev: rpm device
|
||||||
* @ack: completion for acks
|
* @ack: completion for acks
|
||||||
* @lock: mutual exclusion around the send/complete pair
|
* @lock: mutual exclusion around the send/complete pair
|
||||||
* @ack_status: result of the rpm request
|
* @ack_status: result of the rpm request
|
||||||
@@ -86,6 +87,7 @@ struct qcom_rpm_message {
|
|||||||
/**
|
/**
|
||||||
* qcom_rpm_smd_write - write @buf to @type:@id
|
* qcom_rpm_smd_write - write @buf to @type:@id
|
||||||
* @rpm: rpm handle
|
* @rpm: rpm handle
|
||||||
|
* @state: active/sleep state flags
|
||||||
* @type: resource type
|
* @type: resource type
|
||||||
* @id: resource identifier
|
* @id: resource identifier
|
||||||
* @buf: the data to be written
|
* @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[] = {
|
static const struct of_device_id qcom_smd_rpm_of_match[] = {
|
||||||
{ .compatible = "qcom,rpm-apq8084" },
|
{ .compatible = "qcom,rpm-apq8084" },
|
||||||
|
{ .compatible = "qcom,rpm-ipq6018" },
|
||||||
{ .compatible = "qcom,rpm-msm8916" },
|
{ .compatible = "qcom,rpm-msm8916" },
|
||||||
{ .compatible = "qcom,rpm-msm8936" },
|
{ .compatible = "qcom,rpm-msm8936" },
|
||||||
{ .compatible = "qcom,rpm-msm8974" },
|
{ .compatible = "qcom,rpm-msm8974" },
|
||||||
|
Reference in New Issue
Block a user