Merge tag 'rproc-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux

Pull remoteproc updates from Bjorn Andersson:

 - Move requesting of IRQs in TI Keystone driver to probe time instead
   of remoteproc start, to allow better handling of errors.

 - Introduce support for more than 10 entries in the Qualcomm minidump
   implementation.

 - Add audio DSP remoteproc support for the Qualcomm Eliza platform. Add
   modem remoteproc support for the Qualcomm MDM9607, MSM8917, MSM8937,
   and MSM8940 platforms.

 - Add list of Qualcomm QMI service ids to the QMI header file, in order
   to avoid sprinkling them across the various drivers using them.
   Migrate sysmon to use this constant.

 - Fix several issues related to DeviceTree parsing and mailbox handling
   in the Xilinx R5F remote processor driver.

 - Fix incorrect error checks in reserved memory handling and polish the
   code across i.MX and TI drivers.

* tag 'rproc-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (35 commits)
  remoteproc: qcom: pas: Add Eliza ADSP support
  dt-bindings: remoteproc: qcom,milos-pas: Document Eliza ADSP
  remoteproc: qcom: Add missing space before closing bracket
  dt-bindings: remoteproc: qcom: Drop types for firmware-name
  remoteproc: qcom: Fix minidump out-of-bounds access on subsystems array
  dt-bindings: remoteproc: k3-r5f: Add memory-region-names
  dt-bindings: remoteproc: k3-r5f: Split up memory regions
  remoteproc: use SIZE_MAX in rproc_u64_fit_in_size_t()
  dt-bindings: remoteproc: qcom,sm8550-pas: Add Glymur CDSP
  dt-bindings: remoteproc: qcom,sm8550-pas: Add Glymur ADSP
  remoteproc: xlnx: Release mailbox channels on shutdown
  remoteproc: sysmon: Use the unified QMI service ID instead of defining it locally
  remoteproc: xlnx: Only access buffer information if IPI is buffered
  remoteproc: xlnx: Avoid mailbox setup
  remoteproc: keystone: Request IRQs in probe()
  remoteproc: pru: Remove empty remove callback
  remoteproc: pru: Use rproc_of_parse_firmware() to get firmware name
  remoteproc: da8xx: Reorder resource fetching in probe()
  remoteproc: da8xx: Remove unused local struct data
  remoteproc: da8xx: Use dev_err_probe()
  ...
This commit is contained in:
Linus Torvalds
2026-04-17 14:16:15 -07:00
21 changed files with 486 additions and 227 deletions

View File

@@ -16,6 +16,7 @@ description:
properties:
compatible:
enum:
- qcom,eliza-adsp-pas
- qcom,milos-adsp-pas
- qcom,milos-cdsp-pas
- qcom,milos-mpss-pas
@@ -69,6 +70,7 @@ allOf:
properties:
compatible:
enum:
- qcom,eliza-adsp-pas
- qcom,milos-adsp-pas
- qcom,milos-cdsp-pas
then:
@@ -89,6 +91,7 @@ allOf:
compatible:
contains:
enum:
- qcom,eliza-adsp-pas
- qcom,milos-adsp-pas
then:
properties:

View File

@@ -17,10 +17,14 @@ properties:
compatible:
oneOf:
- enum:
- qcom,mdm9607-mss-pil
- qcom,msm8226-mss-pil
- qcom,msm8909-mss-pil
- qcom,msm8916-mss-pil
- qcom,msm8917-mss-pil
- qcom,msm8926-mss-pil
- qcom,msm8937-mss-pil
- qcom,msm8940-mss-pil
- qcom,msm8953-mss-pil
- qcom,msm8974-mss-pil
@@ -89,7 +93,7 @@ properties:
description: PLL proxy supply (control handed over after startup)
mss-supply:
description: MSS power domain supply (only valid for qcom,msm8974-mss-pil)
description: MSS power domain supply
resets:
items:
@@ -137,7 +141,6 @@ properties:
- description: MPSS reserved region
firmware-name:
$ref: /schemas/types.yaml#/definitions/string-array
items:
- description: Name of MBA firmware
- description: Name of modem firmware
@@ -226,8 +229,12 @@ allOf:
compatible:
contains:
enum:
- qcom,mdm9607-mss-pil
- qcom,msm8909-mss-pil
- qcom,msm8916-mss-pil
- qcom,msm8917-mss-pil
- qcom,msm8937-mss-pil
- qcom,msm8940-mss-pil
then:
properties:
power-domains:
@@ -271,6 +278,9 @@ allOf:
contains:
enum:
- qcom,msm8926-mss-pil
- qcom,msm8917-mss-pil
- qcom,msm8937-mss-pil
- qcom,msm8940-mss-pil
- qcom,msm8974-mss-pil
then:
required:

View File

@@ -126,7 +126,6 @@ properties:
- description: Metadata reserved region
firmware-name:
$ref: /schemas/types.yaml#/definitions/string-array
items:
- description: Name of MBA firmware
- description: Name of modem firmware

View File

@@ -51,7 +51,6 @@ properties:
description: Reference to the AOSS side-channel message RAM.
firmware-name:
$ref: /schemas/types.yaml#/definitions/string-array
items:
- description: Firmware name of the Hexagon core

View File

@@ -98,7 +98,6 @@ properties:
- description: metadata reserved region
firmware-name:
$ref: /schemas/types.yaml#/definitions/string-array
items:
- description: Name of MBA firmware
- description: Name of modem firmware

View File

@@ -98,7 +98,6 @@ properties:
- description: metadata reserved region
firmware-name:
$ref: /schemas/types.yaml#/definitions/string-array
items:
- description: Name of MBA firmware
- description: Name of modem firmware

View File

@@ -42,7 +42,7 @@ properties:
description: Reference to the reserved-memory for the Hexagon core
firmware-name:
$ref: /schemas/types.yaml#/definitions/string
maxItems: 1
description: Firmware name for the Hexagon core
required:

View File

@@ -56,7 +56,7 @@ properties:
smd-edge: false
firmware-name:
$ref: /schemas/types.yaml#/definitions/string
maxItems: 1
description: Firmware name for the Hexagon core
required:

View File

@@ -28,8 +28,16 @@ properties:
- qcom,x1e80100-adsp-pas
- qcom,x1e80100-cdsp-pas
- items:
- const: qcom,sm8750-adsp-pas
- enum:
- qcom,glymur-adsp-pas
- qcom,kaanapali-adsp-pas
- qcom,sm8750-adsp-pas
- const: qcom,sm8550-adsp-pas
- items:
- enum:
- qcom,glymur-cdsp-pas
- qcom,kaanapali-cdsp-pas
- const: qcom,sm8550-cdsp-pas
- items:
- const: qcom,sm8750-cdsp-pas
- const: qcom,sm8650-cdsp-pas
@@ -52,7 +60,6 @@ properties:
smd-edge: false
firmware-name:
$ref: /schemas/types.yaml#/definitions/string-array
items:
- description: Firmware name of the Hexagon core
- description: Firmware name of the Hexagon Devicetree
@@ -95,6 +102,10 @@ allOf:
compatible:
contains:
enum:
- qcom,glymur-adsp-pas
- qcom,glymur-cdsp-pas
- qcom,kaanapali-adsp-pas
- qcom,kaanapali-cdsp-pas
- qcom,sm8750-adsp-pas
then:
properties:

View File

@@ -154,17 +154,44 @@ patternProperties:
memory-region:
description: |
phandle to the reserved memory nodes to be associated with the
remoteproc device. There should be at least two reserved memory nodes
defined. The reserved memory nodes should be carveout nodes, and
should be defined with a "no-map" property as per the bindings in
remoteproc device. There should be two reserved memory nodes defined
for the basic layout or 6 partitions for a detailed layout. The
reserved memory nodes should be carveout nodes, and should be defined
with a "no-map" property as per the bindings in
Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
minItems: 2
maxItems: 8
oneOf:
- description: Basic layout
items:
- description: region used for dynamic DMA allocations like vrings and
vring buffers
- description: region reserved for firmware image sections
additionalItems: true
- description: Detailed layout
items:
- description: region used for dynamic DMA allocations like vrings and
vring buffers
- description: region reserved for IPC resources
- description: LPM FS stub binary
- description: LPM metadata
- description: LPM FS context data and reserved sections
- description: DM RM/PM trace and firmware code/data
memory-region-names:
description: |
Names for the memory regions specified in the memory-region property.
The names must correspond with the entries in memory-region.
oneOf:
- description: Basic layout
items:
- const: dma
- const: firmware
- description: Detailed layout
items:
- const: dma
- const: ipc
- const: lpm-stub
- const: lpm-metadata
- const: lpm-context
- const: dm-firmware
# Optional properties:
# --------------------
@@ -218,6 +245,13 @@ patternProperties:
- resets
- firmware-name
if:
required:
- memory-region
then:
required:
- memory-region-names
unevaluatedProperties: false
allOf:
@@ -321,6 +355,7 @@ examples:
mboxes = <&mailbox0 &mbox_mcu_r5fss0_core0>;
memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
<&mcu_r5fss0_core0_memory_region>;
memory-region-names = "dma", "firmware";
sram = <&mcu_r5fss0_core0_sram>;
};

View File

@@ -57,11 +57,10 @@ struct da8xx_rproc_mem {
* @mem: internal memory regions data
* @num_mems: number of internal memory regions
* @dsp_clk: placeholder for platform's DSP clk
* @ack_fxn: chip-specific ack function for ack'ing irq
* @dsp_reset: control for local reset
* @irq_data: ack_fxn function parameter
* @chipsig: virt ptr to DSP interrupt registers (CHIPSIG & CHIPSIG_CLR)
* @bootreg: virt ptr to DSP boot address register (HOST1CFG)
* @irq: irq # used by this instance
*/
struct da8xx_rproc {
struct rproc *rproc;
@@ -69,11 +68,9 @@ struct da8xx_rproc {
int num_mems;
struct clk *dsp_clk;
struct reset_control *dsp_reset;
void (*ack_fxn)(struct irq_data *data);
struct irq_data *irq_data;
void __iomem *chipsig;
void __iomem *bootreg;
int irq;
};
/**
@@ -122,7 +119,7 @@ static irqreturn_t da8xx_rproc_callback(int irq, void *p)
* we need to ack it after taking down the level else we'll
* be called again immediately after returning.
*/
drproc->ack_fxn(drproc->irq_data);
drproc->irq_data->chip->irq_ack(drproc->irq_data);
return IRQ_WAKE_THREAD;
}
@@ -245,45 +242,9 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct da8xx_rproc *drproc;
struct rproc *rproc;
struct irq_data *irq_data;
struct clk *dsp_clk;
struct reset_control *dsp_reset;
void __iomem *chipsig;
void __iomem *bootreg;
int irq;
int ret;
irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;
irq_data = irq_get_irq_data(irq);
if (!irq_data)
return dev_err_probe(dev, -EINVAL, "irq_get_irq_data(%d): NULL\n", irq);
bootreg = devm_platform_ioremap_resource_byname(pdev, "host1cfg");
if (IS_ERR(bootreg))
return PTR_ERR(bootreg);
chipsig = devm_platform_ioremap_resource_byname(pdev, "chipsig");
if (IS_ERR(chipsig))
return PTR_ERR(chipsig);
dsp_clk = devm_clk_get(dev, NULL);
if (IS_ERR(dsp_clk))
return dev_err_probe(dev, PTR_ERR(dsp_clk), "clk_get error\n");
dsp_reset = devm_reset_control_get_exclusive(dev, NULL);
if (IS_ERR(dsp_reset))
return dev_err_probe(dev, PTR_ERR(dsp_reset), "unable to get reset control\n");
if (dev->of_node) {
ret = of_reserved_mem_device_init(dev);
if (ret)
return dev_err_probe(dev, ret, "device does not have specific CMA pool\n");
devm_add_action_or_reset(&pdev->dev, da8xx_rproc_mem_release, &pdev->dev);
}
rproc = devm_rproc_alloc(dev, "dsp", &da8xx_rproc_ops, da8xx_fw_name,
sizeof(*drproc));
if (!rproc)
@@ -294,43 +255,63 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
drproc = rproc->priv;
drproc->rproc = rproc;
drproc->dsp_clk = dsp_clk;
drproc->dsp_reset = dsp_reset;
rproc->has_iommu = false;
drproc->dsp_clk = devm_clk_get(dev, NULL);
if (IS_ERR(drproc->dsp_clk))
return dev_err_probe(dev, PTR_ERR(drproc->dsp_clk), "clk_get error\n");
drproc->dsp_reset = devm_reset_control_get_exclusive(dev, NULL);
if (IS_ERR(drproc->dsp_reset))
return dev_err_probe(dev, PTR_ERR(drproc->dsp_reset),
"unable to get reset control\n");
if (dev->of_node) {
ret = of_reserved_mem_device_init(dev);
if (ret)
return dev_err_probe(dev, ret, "device does not have specific CMA pool\n");
devm_add_action_or_reset(&pdev->dev, da8xx_rproc_mem_release, &pdev->dev);
}
ret = da8xx_rproc_get_internal_memories(pdev, drproc);
if (ret)
return ret;
irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;
drproc->irq_data = irq_get_irq_data(irq);
if (!drproc->irq_data)
return dev_err_probe(dev, -EINVAL, "irq_get_irq_data(%d): NULL\n", irq);
drproc->chipsig = devm_platform_ioremap_resource_byname(pdev, "chipsig");
if (IS_ERR(drproc->chipsig))
return PTR_ERR(drproc->chipsig);
drproc->bootreg = devm_platform_ioremap_resource_byname(pdev, "host1cfg");
if (IS_ERR(drproc->bootreg))
return PTR_ERR(drproc->bootreg);
/* everything the ISR needs is now setup, so hook it up */
ret = devm_request_threaded_irq(dev, irq, da8xx_rproc_callback,
handle_event, 0, "da8xx-remoteproc",
rproc);
if (ret) {
dev_err(dev, "devm_request_threaded_irq error: %d\n", ret);
return ret;
}
if (ret)
return dev_err_probe(dev, ret, "devm_request_threaded_irq error\n");
/*
* rproc_add() can end up enabling the DSP's clk with the DSP
* *not* in reset, but da8xx_rproc_start() needs the DSP to be
* held in reset at the time it is called.
*/
ret = reset_control_assert(dsp_reset);
ret = reset_control_assert(drproc->dsp_reset);
if (ret)
return ret;
drproc->chipsig = chipsig;
drproc->bootreg = bootreg;
drproc->ack_fxn = irq_data->chip->irq_ack;
drproc->irq_data = irq_data;
drproc->irq = irq;
ret = devm_rproc_add(dev, rproc);
if (ret) {
dev_err(dev, "rproc_add failed: %d\n", ret);
return ret;
}
if (ret)
return dev_err_probe(dev, ret, "rproc_add failed\n");
return 0;
}

View File

@@ -812,7 +812,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv,
/* Not use resource version, because we might share region */
priv->mem[b].cpu_addr = devm_ioremap_resource_wc(&pdev->dev, &res);
if (!priv->mem[b].cpu_addr) {
if (IS_ERR(priv->mem[b].cpu_addr)) {
dev_err(dev, "failed to remap %pr\n", &res);
return -ENOMEM;
}
@@ -1007,7 +1007,11 @@ static int imx_rproc_mmio_detect_mode(struct rproc *rproc)
}
priv->regmap = regmap;
regmap_attach_dev(dev, regmap, &config);
ret = regmap_attach_dev(dev, regmap, &config);
if (ret) {
dev_err(dev, "regmap attach failed\n");
return ret;
}
if (priv->gpr) {
ret = regmap_read(priv->gpr, dcfg->gpr_reg, &val);

View File

@@ -173,35 +173,16 @@ static int keystone_rproc_start(struct rproc *rproc)
INIT_WORK(&ksproc->workqueue, handle_event);
ret = request_irq(ksproc->irq_ring, keystone_rproc_vring_interrupt, 0,
dev_name(ksproc->dev), ksproc);
if (ret) {
dev_err(ksproc->dev, "failed to enable vring interrupt, ret = %d\n",
ret);
goto out;
}
ret = request_irq(ksproc->irq_fault, keystone_rproc_exception_interrupt,
0, dev_name(ksproc->dev), ksproc);
if (ret) {
dev_err(ksproc->dev, "failed to enable exception interrupt, ret = %d\n",
ret);
goto free_vring_irq;
}
enable_irq(ksproc->irq_ring);
enable_irq(ksproc->irq_fault);
ret = keystone_rproc_dsp_boot(ksproc, rproc->bootaddr);
if (ret)
goto free_exc_irq;
if (ret) {
flush_work(&ksproc->workqueue);
return ret;
}
return 0;
free_exc_irq:
free_irq(ksproc->irq_fault, ksproc);
free_vring_irq:
free_irq(ksproc->irq_ring, ksproc);
flush_work(&ksproc->workqueue);
out:
return ret;
}
/*
@@ -215,8 +196,8 @@ static int keystone_rproc_stop(struct rproc *rproc)
struct keystone_rproc *ksproc = rproc->priv;
keystone_rproc_dsp_reset(ksproc);
free_irq(ksproc->irq_fault, ksproc);
free_irq(ksproc->irq_ring, ksproc);
disable_irq(ksproc->irq_fault);
disable_irq(ksproc->irq_ring);
flush_work(&ksproc->workqueue);
return 0;
@@ -427,10 +408,18 @@ static int keystone_rproc_probe(struct platform_device *pdev)
ksproc->irq_ring = platform_get_irq_byname(pdev, "vring");
if (ksproc->irq_ring < 0)
return ksproc->irq_ring;
ret = devm_request_irq(dev, ksproc->irq_ring, keystone_rproc_vring_interrupt,
IRQF_NO_AUTOEN, dev_name(dev), ksproc);
if (ret)
return dev_err_probe(dev, ret, "failed to request vring interrupt\n");
ksproc->irq_fault = platform_get_irq_byname(pdev, "exception");
if (ksproc->irq_fault < 0)
return ksproc->irq_fault;
ret = devm_request_irq(dev, ksproc->irq_fault, keystone_rproc_exception_interrupt,
IRQF_NO_AUTOEN, dev_name(dev), ksproc);
if (ret)
return dev_err_probe(dev, ret, "failed to enable exception interrupt\n");
ksproc->kick_gpio = devm_gpiod_get(dev, "kick", GPIOD_ASIS);
ret = PTR_ERR_OR_ZERO(ksproc->kick_gpio);

View File

@@ -1003,11 +1003,9 @@ static int pru_rproc_probe(struct platform_device *pdev)
if (!data)
return -ENODEV;
ret = of_property_read_string(np, "firmware-name", &fw_name);
if (ret) {
dev_err(dev, "unable to retrieve firmware-name %d\n", ret);
return ret;
}
ret = rproc_of_parse_firmware(dev, 0, &fw_name);
if (ret)
return dev_err_probe(dev, ret, "unable to retrieve firmware-name\n");
rproc = devm_rproc_alloc(dev, pdev->name, &pru_rproc_ops, fw_name,
sizeof(*pru));
@@ -1080,14 +1078,6 @@ static int pru_rproc_probe(struct platform_device *pdev)
return 0;
}
static void pru_rproc_remove(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct rproc *rproc = platform_get_drvdata(pdev);
dev_dbg(dev, "%s: removing rproc %s\n", __func__, rproc->name);
}
static const struct pru_private_data pru_data = {
.type = PRU_TYPE_PRU,
};
@@ -1133,7 +1123,6 @@ static struct platform_driver pru_rproc_driver = {
.suppress_bind_attrs = true,
},
.probe = pru_rproc_probe,
.remove = pru_rproc_remove,
};
module_platform_driver(pru_rproc_driver);

View File

@@ -28,7 +28,6 @@
#define to_ssr_subdev(d) container_of(d, struct qcom_rproc_ssr, subdev)
#define to_pdm_subdev(d) container_of(d, struct qcom_rproc_pdm, subdev)
#define MAX_NUM_OF_SS 10
#define MAX_REGION_NAME_LENGTH 16
#define SBL_MINIDUMP_SMEM_ID 602
#define MINIDUMP_REGION_VALID ('V' << 24 | 'A' << 16 | 'L' << 8 | 'I' << 0)
@@ -80,7 +79,7 @@ struct minidump_global_toc {
__le32 status;
__le32 md_revision;
__le32 enabled;
struct minidump_subsystem subsystems[MAX_NUM_OF_SS];
struct minidump_subsystem subsystems[];
};
struct qcom_ssr_subsystem {
@@ -151,9 +150,11 @@ void qcom_minidump(struct rproc *rproc, unsigned int minidump_id,
int ret;
struct minidump_subsystem *subsystem;
struct minidump_global_toc *toc;
unsigned int num_ss;
size_t toc_size;
/* Get Global minidump ToC*/
toc = qcom_smem_get(QCOM_SMEM_HOST_ANY, SBL_MINIDUMP_SMEM_ID, NULL);
toc = qcom_smem_get(QCOM_SMEM_HOST_ANY, SBL_MINIDUMP_SMEM_ID, &toc_size);
/* check if global table pointer exists and init is set */
if (IS_ERR(toc) || !toc->status) {
@@ -161,6 +162,16 @@ void qcom_minidump(struct rproc *rproc, unsigned int minidump_id,
return;
}
/* Derive the number of subsystems from the actual SMEM item size */
num_ss = (toc_size - offsetof(struct minidump_global_toc, subsystems)) /
sizeof(struct minidump_subsystem);
if (minidump_id >= num_ss) {
dev_err(&rproc->dev, "Minidump id %d is out of range: %d\n",
minidump_id, num_ss);
return;
}
/* Get subsystem table of contents using the minidump id */
subsystem = &toc->subsystems[minidump_id];

View File

@@ -124,6 +124,7 @@
#define QDSP6v56_CLAMP_QMC_MEM BIT(22)
#define QDSP6SS_XO_CBCR 0x0038
#define QDSP6SS_ACC_OVERRIDE_VAL 0x20
#define QDSP6SS_ACC_OVERRIDE_VAL_9607 0x80800000
#define QDSP6v55_BHS_EN_REST_ACK BIT(0)
/* QDSP6v65 parameters */
@@ -162,6 +163,7 @@ struct rproc_hexagon_res {
char **proxy_pd_names;
int version;
bool need_mem_protection;
bool need_pas_mem_setup;
bool has_alt_reset;
bool has_mba_logs;
bool has_spare_reg;
@@ -240,6 +242,7 @@ struct q6v5 {
struct qcom_sysmon *sysmon;
struct platform_device *bam_dmux;
bool need_mem_protection;
bool need_pas_mem_setup;
bool has_alt_reset;
bool has_mba_logs;
bool has_spare_reg;
@@ -254,10 +257,14 @@ struct q6v5 {
};
enum {
MSS_MDM9607,
MSS_MSM8226,
MSS_MSM8909,
MSS_MSM8916,
MSS_MSM8917,
MSS_MSM8926,
MSS_MSM8937,
MSS_MSM8940,
MSS_MSM8953,
MSS_MSM8974,
MSS_MSM8996,
@@ -745,15 +752,25 @@ static int q6v5proc_reset(struct q6v5 *qproc)
return ret;
}
goto pbl_wait;
} else if (qproc->version == MSS_MSM8909 ||
} else if (qproc->version == MSS_MDM9607 ||
qproc->version == MSS_MSM8909 ||
qproc->version == MSS_MSM8917 ||
qproc->version == MSS_MSM8937 ||
qproc->version == MSS_MSM8940 ||
qproc->version == MSS_MSM8953 ||
qproc->version == MSS_MSM8996 ||
qproc->version == MSS_MSM8998 ||
qproc->version == MSS_SDM660) {
if (qproc->version != MSS_MSM8909 &&
qproc->version != MSS_MSM8953)
/* Override the ACC value if required */
if (qproc->version == MSS_MDM9607 ||
qproc->version == MSS_MSM8917 ||
qproc->version == MSS_MSM8937 ||
qproc->version == MSS_MSM8940)
writel(QDSP6SS_ACC_OVERRIDE_VAL_9607,
qproc->reg_base + QDSP6SS_STRAP_ACC);
else if (qproc->version != MSS_MSM8909 &&
qproc->version != MSS_MSM8953)
writel(QDSP6SS_ACC_OVERRIDE_VAL,
qproc->reg_base + QDSP6SS_STRAP_ACC);
@@ -799,6 +816,7 @@ static int q6v5proc_reset(struct q6v5 *qproc)
if (qproc->version != MSS_MSM8909) {
int mem_pwr_ctl;
int reverse;
/* Deassert QDSP6 compiler memory clamp */
val = readl(qproc->reg_base + QDSP6SS_PWR_CTL_REG);
@@ -810,17 +828,37 @@ static int q6v5proc_reset(struct q6v5 *qproc)
writel(val, qproc->reg_base + QDSP6SS_PWR_CTL_REG);
/* Turn on L1, L2, ETB and JU memories 1 at a time */
if (qproc->version == MSS_MSM8953 ||
if (qproc->version == MSS_MSM8940 ||
qproc->version == MSS_MSM8953 ||
qproc->version == MSS_MSM8996) {
mem_pwr_ctl = QDSP6SS_MEM_PWR_CTL;
i = 19;
reverse = 0;
} else if (qproc->version == MSS_MDM9607 ||
qproc->version == MSS_MSM8917 ||
qproc->version == MSS_MSM8937) {
mem_pwr_ctl = QDSP6SS_MEM_PWR_CTL;
i = 19;
/*
* Set first 5 bits in reverse to avoid
* "inrush current" issues.
*/
reverse = 6;
} else {
/* MSS_MSM8998, MSS_SDM660 */
mem_pwr_ctl = QDSP6V6SS_MEM_PWR_CTL;
i = 28;
reverse = 0;
}
val = readl(qproc->reg_base + mem_pwr_ctl);
for (; i >= 0; i--) {
for (; i >= reverse; i--) {
val |= BIT(i);
writel(val, qproc->reg_base + mem_pwr_ctl);
val = readl(qproc->reg_base + mem_pwr_ctl);
udelay(1);
}
for (i = 0; i < reverse; i++) {
val |= BIT(i);
writel(val, qproc->reg_base + mem_pwr_ctl);
/*
@@ -828,7 +866,7 @@ static int q6v5proc_reset(struct q6v5 *qproc)
* wait for 1us for both memory peripheral and data
* array to turn on.
*/
val |= readl(qproc->reg_base + mem_pwr_ctl);
val = readl(qproc->reg_base + mem_pwr_ctl);
udelay(1);
}
} else {
@@ -1441,7 +1479,7 @@ static int q6v5_mpss_load(struct q6v5 *qproc)
max_addr = ALIGN(phdr->p_paddr + phdr->p_memsz, SZ_4K);
}
if (qproc->version == MSS_MSM8953) {
if (qproc->need_pas_mem_setup) {
ret = qcom_scm_pas_mem_setup(MPSS_PAS_ID, qproc->mpss_phys, qproc->mpss_size);
if (ret) {
dev_err(qproc->dev,
@@ -2224,6 +2262,7 @@ static const struct rproc_hexagon_res sc7180_mss = {
NULL
},
.need_mem_protection = true,
.need_pas_mem_setup = false,
.has_alt_reset = false,
.has_mba_logs = true,
.has_spare_reg = true,
@@ -2253,6 +2292,7 @@ static const struct rproc_hexagon_res sc7280_mss = {
NULL
},
.need_mem_protection = true,
.need_pas_mem_setup = false,
.has_alt_reset = false,
.has_mba_logs = true,
.has_spare_reg = false,
@@ -2285,6 +2325,7 @@ static const struct rproc_hexagon_res sdm660_mss = {
NULL
},
.need_mem_protection = true,
.need_pas_mem_setup = false,
.has_alt_reset = false,
.has_mba_logs = false,
.has_spare_reg = false,
@@ -2321,6 +2362,7 @@ static const struct rproc_hexagon_res sdm845_mss = {
NULL
},
.need_mem_protection = true,
.need_pas_mem_setup = false,
.has_alt_reset = true,
.has_mba_logs = false,
.has_spare_reg = false,
@@ -2353,6 +2395,7 @@ static const struct rproc_hexagon_res msm8998_mss = {
NULL
},
.need_mem_protection = true,
.need_pas_mem_setup = false,
.has_alt_reset = false,
.has_mba_logs = false,
.has_spare_reg = false,
@@ -2392,6 +2435,7 @@ static const struct rproc_hexagon_res msm8996_mss = {
NULL
},
.need_mem_protection = true,
.need_pas_mem_setup = false,
.has_alt_reset = false,
.has_mba_logs = false,
.has_spare_reg = false,
@@ -2402,6 +2446,41 @@ static const struct rproc_hexagon_res msm8996_mss = {
.version = MSS_MSM8996,
};
static const struct rproc_hexagon_res mdm9607_mss = {
.hexagon_mba_image = "mba.mbn",
.proxy_supply = (struct qcom_mss_reg_res[]) {
{
.supply = "pll",
.uA = 100000,
},
{}
},
.proxy_clk_names = (char*[]){
"xo",
NULL
},
.active_clk_names = (char*[]){
"iface",
"bus",
"mem",
NULL
},
.proxy_pd_names = (char*[]){
"mx",
"cx",
NULL
},
.need_mem_protection = false,
.has_alt_reset = false,
.has_mba_logs = false,
.has_spare_reg = false,
.has_qaccept_regs = false,
.has_ext_bhs_reg = false,
.has_ext_cntl_regs = false,
.has_vq6 = false,
.version = MSS_MDM9607,
};
static const struct rproc_hexagon_res msm8909_mss = {
.hexagon_mba_image = "mba.mbn",
.proxy_supply = (struct qcom_mss_reg_res[]) {
@@ -2427,6 +2506,7 @@ static const struct rproc_hexagon_res msm8909_mss = {
NULL
},
.need_mem_protection = false,
.need_pas_mem_setup = false,
.has_alt_reset = false,
.has_mba_logs = false,
.has_spare_reg = false,
@@ -2473,6 +2553,7 @@ static const struct rproc_hexagon_res msm8916_mss = {
NULL
},
.need_mem_protection = false,
.need_pas_mem_setup = false,
.has_alt_reset = false,
.has_mba_logs = false,
.has_spare_reg = false,
@@ -2483,6 +2564,138 @@ static const struct rproc_hexagon_res msm8916_mss = {
.version = MSS_MSM8916,
};
static const struct rproc_hexagon_res msm8917_mss = {
.hexagon_mba_image = "mba.mbn",
.proxy_supply = (struct qcom_mss_reg_res[]) {
{
.supply = "pll",
.uA = 100000,
},
{}
},
.active_supply = (struct qcom_mss_reg_res[]) {
{
.supply = "mss",
.uV = 1050000,
.uA = 100000,
},
{}
},
.proxy_clk_names = (char*[]){
"xo",
NULL
},
.active_clk_names = (char*[]){
"iface",
"bus",
"mem",
NULL
},
.proxy_pd_names = (char*[]) {
"cx",
"mx",
NULL
},
.need_mem_protection = false,
.need_pas_mem_setup = false,
.has_alt_reset = false,
.has_mba_logs = false,
.has_spare_reg = false,
.has_qaccept_regs = false,
.has_ext_bhs_reg = false,
.has_ext_cntl_regs = false,
.has_vq6 = false,
.version = MSS_MSM8917,
};
static const struct rproc_hexagon_res msm8937_mss = {
.hexagon_mba_image = "mba.mbn",
.proxy_supply = (struct qcom_mss_reg_res[]) {
{
.supply = "pll",
.uA = 100000,
},
{}
},
.active_supply = (struct qcom_mss_reg_res[]) {
{
.supply = "mss",
.uV = 1050000,
.uA = 100000,
},
{}
},
.proxy_clk_names = (char*[]){
"xo",
NULL
},
.active_clk_names = (char*[]){
"iface",
"bus",
"mem",
NULL
},
.proxy_pd_names = (char*[]) {
"cx",
"mx",
NULL
},
.need_mem_protection = false,
.need_pas_mem_setup = true,
.has_alt_reset = false,
.has_mba_logs = false,
.has_spare_reg = false,
.has_qaccept_regs = false,
.has_ext_bhs_reg = false,
.has_ext_cntl_regs = false,
.has_vq6 = false,
.version = MSS_MSM8937,
};
static const struct rproc_hexagon_res msm8940_mss = {
.hexagon_mba_image = "mba.mbn",
.proxy_supply = (struct qcom_mss_reg_res[]) {
{
.supply = "pll",
.uA = 100000,
},
{}
},
.active_supply = (struct qcom_mss_reg_res[]) {
{
.supply = "mss",
.uV = 1050000,
.uA = 100000,
},
{}
},
.proxy_clk_names = (char*[]){
"xo",
NULL
},
.active_clk_names = (char*[]){
"iface",
"bus",
"mem",
NULL
},
.proxy_pd_names = (char*[]) {
"cx",
"mx",
NULL
},
.need_mem_protection = false,
.need_pas_mem_setup = true,
.has_alt_reset = false,
.has_mba_logs = false,
.has_spare_reg = false,
.has_qaccept_regs = false,
.has_ext_bhs_reg = false,
.has_ext_cntl_regs = false,
.has_vq6 = false,
.version = MSS_MSM8940,
};
static const struct rproc_hexagon_res msm8953_mss = {
.hexagon_mba_image = "mba.mbn",
.proxy_supply = (struct qcom_mss_reg_res[]) {
@@ -2509,6 +2722,7 @@ static const struct rproc_hexagon_res msm8953_mss = {
NULL
},
.need_mem_protection = false,
.need_pas_mem_setup = true,
.has_alt_reset = false,
.has_mba_logs = false,
.has_spare_reg = false,
@@ -2562,6 +2776,7 @@ static const struct rproc_hexagon_res msm8974_mss = {
NULL
},
.need_mem_protection = false,
.need_pas_mem_setup = false,
.has_alt_reset = false,
.has_mba_logs = false,
.has_spare_reg = false,
@@ -2600,6 +2815,7 @@ static const struct rproc_hexagon_res msm8226_mss = {
NULL
},
.need_mem_protection = false,
.need_pas_mem_setup = false,
.has_alt_reset = false,
.has_mba_logs = false,
.has_spare_reg = false,
@@ -2646,6 +2862,7 @@ static const struct rproc_hexagon_res msm8926_mss = {
NULL
},
.need_mem_protection = false,
.need_pas_mem_setup = false,
.has_alt_reset = false,
.has_mba_logs = false,
.has_spare_reg = false,
@@ -2658,10 +2875,14 @@ static const struct rproc_hexagon_res msm8926_mss = {
static const struct of_device_id q6v5_of_match[] = {
{ .compatible = "qcom,q6v5-pil", .data = &msm8916_mss },
{ .compatible = "qcom,mdm9607-mss-pil", .data = &mdm9607_mss },
{ .compatible = "qcom,msm8226-mss-pil", .data = &msm8226_mss },
{ .compatible = "qcom,msm8909-mss-pil", .data = &msm8909_mss },
{ .compatible = "qcom,msm8916-mss-pil", .data = &msm8916_mss },
{ .compatible = "qcom,msm8917-mss-pil", .data = &msm8917_mss },
{ .compatible = "qcom,msm8926-mss-pil", .data = &msm8926_mss },
{ .compatible = "qcom,msm8937-mss-pil", .data = &msm8937_mss },
{ .compatible = "qcom,msm8940-mss-pil", .data = &msm8940_mss },
{ .compatible = "qcom,msm8953-mss-pil", .data = &msm8953_mss },
{ .compatible = "qcom,msm8974-mss-pil", .data = &msm8974_mss },
{ .compatible = "qcom,msm8996-mss-pil", .data = &msm8996_mss },

View File

@@ -1531,6 +1531,7 @@ static const struct qcom_pas_data sm8750_mpss_resource = {
};
static const struct of_device_id qcom_pas_of_match[] = {
{ .compatible = "qcom,eliza-adsp-pas", .data = &sm8550_adsp_resource },
{ .compatible = "qcom,milos-adsp-pas", .data = &sm8550_adsp_resource },
{ .compatible = "qcom,milos-cdsp-pas", .data = &milos_cdsp_resource },
{ .compatible = "qcom,milos-mpss-pas", .data = &sm8450_mpss_resource },

View File

@@ -677,7 +677,7 @@ struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
return ERR_PTR(ret);
}
qmi_add_lookup(&sysmon->qmi, 43, 0, 0);
qmi_add_lookup(&sysmon->qmi, QMI_SERVICE_ID_SSCTL, 0, 0);
sysmon->subdev.prepare = sysmon_prepare;
sysmon->subdev.start = sysmon_start;

View File

@@ -218,7 +218,7 @@ bool rproc_u64_fit_in_size_t(u64 val)
if (sizeof(size_t) == sizeof(u64))
return true;
return (val <= (size_t) -1);
return val <= SIZE_MAX;
}
#endif /* REMOTEPROC_INTERNAL_H */

View File

@@ -513,7 +513,7 @@ int k3_reserved_mem_init(struct k3_rproc *kproc)
kproc->rmem[i].dev_addr = (u32)res.start;
kproc->rmem[i].size = resource_size(&res);
kproc->rmem[i].cpu_addr = devm_ioremap_resource_wc(dev, &res);
if (!kproc->rmem[i].cpu_addr) {
if (IS_ERR(kproc->rmem[i].cpu_addr)) {
dev_err(dev, "failed to map reserved memory#%d at %pR\n",
i + 1, &res);
return -ENOMEM;

View File

@@ -232,8 +232,9 @@ static void zynqmp_r5_mb_rx_cb(struct mbox_client *cl, void *msg)
ipi = container_of(cl, struct mbox_info, mbox_cl);
/* copy data from ipi buffer to r5_core */
/* copy data from ipi buffer to r5_core if IPI is buffered. */
ipi_msg = (struct zynqmp_ipi_message *)msg;
if (ipi_msg) {
buf_msg = (struct zynqmp_ipi_message *)ipi->rx_mc_buf;
len = ipi_msg->len;
if (len > IPI_BUF_LEN_MAX) {
@@ -243,6 +244,7 @@ static void zynqmp_r5_mb_rx_cb(struct mbox_client *cl, void *msg)
}
buf_msg->len = len;
memcpy(buf_msg->data, ipi_msg->data, len);
}
/* received and processed interrupt ack */
if (mbox_send_message(ipi->rx_chan, NULL) < 0)
@@ -265,6 +267,10 @@ static struct mbox_info *zynqmp_r5_setup_mbox(struct device *cdev)
struct mbox_client *mbox_cl;
struct mbox_info *ipi;
if (!of_property_present(dev_of_node(cdev), "mboxes") ||
!of_property_present(dev_of_node(cdev), "mbox-names"))
return NULL;
ipi = kzalloc_obj(*ipi);
if (!ipi)
return NULL;
@@ -1005,7 +1011,7 @@ static int zynqmp_r5_get_sram_banks(struct zynqmp_r5_core *r5_core)
}
/* Get SRAM device address */
ret = of_property_read_reg(sram_np, i, &abs_addr, &size);
ret = of_property_read_reg(sram_np, 0, &abs_addr, &size);
if (ret) {
dev_err(dev, "failed to get reg property\n");
goto fail_sram_get;
@@ -1484,6 +1490,8 @@ static void zynqmp_r5_remoteproc_shutdown(struct platform_device *pdev)
dev_err(cluster->dev, "failed to %s rproc %d\n",
rproc_state_str, rproc->index);
}
zynqmp_r5_free_mbox(r5_core->ipi);
}
}