Commit 502afe7f authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'qcom-drivers-for-5.8' of...

Merge tag 'qcom-drivers-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers

Qualcomm driver updates for v5.8

This contains a large set of cleanups, bug fixes, general improvements
and documentation fixes for the RPMH driver. It adds a debugfs mechanism
for inspecting Command DB. Socinfo got the "soc_id" attribute defines
and definitions for a various variants of MSM8939.

RPMH, RPMPD and RPMHPD where made possible to build as modules, but RPMH
had to be reverted due to a compilation issue when tracing is enabled.

RPMHPD gained power-domains for the SM8250 voltage corners.

The SCM driver gained fixes for two build warnings and the SMP2P had an
unnecessary error print removed.

* tag 'qcom-drivers-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (42 commits)
  Revert "soc: qcom: rpmh: Allow RPMH driver to be loaded as a module"
  soc: qcom: rpmh-rsc: Remove the pm_lock
  soc: qcom: rpmh-rsc: Simplify locking by eliminating the per-TCS lock
  kernel/cpu_pm: Fix uninitted local in cpu_pm
  soc: qcom: rpmh-rsc: We aren't notified of our own failure w/ NOTIFY_BAD
  soc: qcom: rpmh-rsc: Correctly ignore CPU_CLUSTER_PM notifications
  firmware: qcom_scm-legacy: Replace zero-length array with flexible-array
  soc: qcom: rpmh-rsc: Timeout after 1 second in write_tcs_reg_sync()
  soc: qcom: rpmh-rsc: Factor "tcs_reg_addr" and "tcs_cmd_addr" calculation
  soc: qcom: socinfo: add msm8936/39 and apq8036/39 soc ids
  soc: qcom: aoss: Add SM8250 compatible
  soc: qcom: pdr: Remove impossible error condition
  soc: qcom: rpmh: Dirt can only make you dirtier, not cleaner
  soc: qcom: rpmhpd: Add SM8250 power domains
  firmware: qcom_scm: fix bogous abuse of dma-direct internals
  dt-bindings: soc: qcom: apr: Use generic node names for APR services
  firmware: qcom_scm: Remove unneeded conversion to bool
  soc: qcom: cmd-db: Properly endian swap the slv_id for debugfs
  soc: qcom: cmd-db: Use 5 digits for printing address
  soc: qcom: cmd-db: Cast sizeof() to int to silence field width warning
  ...

Link: https://lore.kernel.org/r/20200519052533.1250024-1-bjorn.andersson@linaro.org


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 372542d7 1f7a3eb7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ properties:
      - qcom,sc7180-rpmhpd
      - qcom,sdm845-rpmhpd
      - qcom,sm8150-rpmhpd
      - qcom,sm8250-rpmhpd

  '#power-domain-cells':
    const: 1
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ power-domains.
		    "qcom,sc7180-aoss-qmp"
		    "qcom,sdm845-aoss-qmp"
		    "qcom,sm8150-aoss-qmp"
		    "qcom,sm8250-aoss-qmp"

- reg:
	Usage: required
+10 −10
Original line number Diff line number Diff line
@@ -65,30 +65,30 @@ which uses apr as communication between Apps and QDSP.
		compatible = "qcom,apr-v2";
		qcom,apr-domain = <APR_DOMAIN_ADSP>;

		q6core@3 {
		apr-service@3 {
			compatible = "qcom,q6core";
			reg = <APR_SVC_ADSP_CORE>;
		};

		q6afe@4 {
		apr-service@4 {
			compatible = "qcom,q6afe";
			reg = <APR_SVC_AFE>;

			dais {
				#sound-dai-cells = <1>;
				hdmi@1 {
					reg = <1>;
				dai@1 {
					reg = <HDMI_RX>;
				};
			};
		};

		q6asm@7 {
		apr-service@7 {
			compatible = "qcom,q6asm";
			reg = <APR_SVC_ASM>;
			...
		};

		q6adm@8 {
		apr-service@8 {
			compatible = "qcom,q6adm";
			reg = <APR_SVC_ADM>;
			...
@@ -106,26 +106,26 @@ have no such dependency.
		qcom,glink-channels = "apr_audio_svc";
		qcom,apr-domain = <APR_DOMAIN_ADSP>;

		q6core {
		apr-service@3 {
			compatible = "qcom,q6core";
			reg = <APR_SVC_ADSP_CORE>;
		};

		q6afe: q6afe {
		q6afe: apr-service@4 {
			compatible = "qcom,q6afe";
			reg = <APR_SVC_AFE>;
			qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
			...
		};

		q6asm: q6asm {
		q6asm: apr-service@7 {
			compatible = "qcom,q6asm";
			reg = <APR_SVC_ASM>;
			qcom,protection-domain = "tms/servreg", "msm/slpi/sensor_pd";
			...
		};

		q6adm: q6adm {
		q6adm: apr-service@8 {
			compatible = "qcom,q6adm";
			reg = <APR_SVC_ADM>;
			qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ struct scm_legacy_command {
	__le32 buf_offset;
	__le32 resp_hdr_offset;
	__le32 id;
	__le32 buf[0];
	__le32 buf[];
};

/**
+4 −7
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@
#include <linux/init.h>
#include <linux/cpumask.h>
#include <linux/export.h>
#include <linux/dma-direct.h>
#include <linux/dma-mapping.h>
#include <linux/module.h>
#include <linux/types.h>
@@ -806,8 +805,7 @@ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz,
	struct qcom_scm_mem_map_info *mem_to_map;
	phys_addr_t mem_to_map_phys;
	phys_addr_t dest_phys;
	phys_addr_t ptr_phys;
	dma_addr_t ptr_dma;
	dma_addr_t ptr_phys;
	size_t mem_to_map_sz;
	size_t dest_sz;
	size_t src_sz;
@@ -824,10 +822,9 @@ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz,
	ptr_sz = ALIGN(src_sz, SZ_64) + ALIGN(mem_to_map_sz, SZ_64) +
			ALIGN(dest_sz, SZ_64);

	ptr = dma_alloc_coherent(__scm->dev, ptr_sz, &ptr_dma, GFP_KERNEL);
	ptr = dma_alloc_coherent(__scm->dev, ptr_sz, &ptr_phys, GFP_KERNEL);
	if (!ptr)
		return -ENOMEM;
	ptr_phys = dma_to_phys(__scm->dev, ptr_dma);

	/* Fill source vmid detail */
	src = ptr;
@@ -855,7 +852,7 @@ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz,

	ret = __qcom_scm_assign_mem(__scm->dev, mem_to_map_phys, mem_to_map_sz,
				    ptr_phys, src_sz, dest_phys, dest_sz);
	dma_free_coherent(__scm->dev, ptr_sz, ptr, ptr_dma);
	dma_free_coherent(__scm->dev, ptr_sz, ptr, ptr_phys);
	if (ret) {
		dev_err(__scm->dev,
			"Assign memory protection call failed %d\n", ret);
@@ -943,7 +940,7 @@ bool qcom_scm_hdcp_available(void)

	qcom_scm_clk_disable();

	return ret > 0 ? true : false;
	return ret > 0;
}
EXPORT_SYMBOL(qcom_scm_hdcp_available);

Loading