mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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:
@@ -16,6 +16,7 @@ description:
|
|||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
enum:
|
enum:
|
||||||
|
- qcom,eliza-adsp-pas
|
||||||
- qcom,milos-adsp-pas
|
- qcom,milos-adsp-pas
|
||||||
- qcom,milos-cdsp-pas
|
- qcom,milos-cdsp-pas
|
||||||
- qcom,milos-mpss-pas
|
- qcom,milos-mpss-pas
|
||||||
@@ -69,6 +70,7 @@ allOf:
|
|||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
enum:
|
enum:
|
||||||
|
- qcom,eliza-adsp-pas
|
||||||
- qcom,milos-adsp-pas
|
- qcom,milos-adsp-pas
|
||||||
- qcom,milos-cdsp-pas
|
- qcom,milos-cdsp-pas
|
||||||
then:
|
then:
|
||||||
@@ -89,6 +91,7 @@ allOf:
|
|||||||
compatible:
|
compatible:
|
||||||
contains:
|
contains:
|
||||||
enum:
|
enum:
|
||||||
|
- qcom,eliza-adsp-pas
|
||||||
- qcom,milos-adsp-pas
|
- qcom,milos-adsp-pas
|
||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -17,10 +17,14 @@ properties:
|
|||||||
compatible:
|
compatible:
|
||||||
oneOf:
|
oneOf:
|
||||||
- enum:
|
- enum:
|
||||||
|
- qcom,mdm9607-mss-pil
|
||||||
- qcom,msm8226-mss-pil
|
- qcom,msm8226-mss-pil
|
||||||
- qcom,msm8909-mss-pil
|
- qcom,msm8909-mss-pil
|
||||||
- qcom,msm8916-mss-pil
|
- qcom,msm8916-mss-pil
|
||||||
|
- qcom,msm8917-mss-pil
|
||||||
- qcom,msm8926-mss-pil
|
- qcom,msm8926-mss-pil
|
||||||
|
- qcom,msm8937-mss-pil
|
||||||
|
- qcom,msm8940-mss-pil
|
||||||
- qcom,msm8953-mss-pil
|
- qcom,msm8953-mss-pil
|
||||||
- qcom,msm8974-mss-pil
|
- qcom,msm8974-mss-pil
|
||||||
|
|
||||||
@@ -89,7 +93,7 @@ properties:
|
|||||||
description: PLL proxy supply (control handed over after startup)
|
description: PLL proxy supply (control handed over after startup)
|
||||||
|
|
||||||
mss-supply:
|
mss-supply:
|
||||||
description: MSS power domain supply (only valid for qcom,msm8974-mss-pil)
|
description: MSS power domain supply
|
||||||
|
|
||||||
resets:
|
resets:
|
||||||
items:
|
items:
|
||||||
@@ -137,7 +141,6 @@ properties:
|
|||||||
- description: MPSS reserved region
|
- description: MPSS reserved region
|
||||||
|
|
||||||
firmware-name:
|
firmware-name:
|
||||||
$ref: /schemas/types.yaml#/definitions/string-array
|
|
||||||
items:
|
items:
|
||||||
- description: Name of MBA firmware
|
- description: Name of MBA firmware
|
||||||
- description: Name of modem firmware
|
- description: Name of modem firmware
|
||||||
@@ -226,8 +229,12 @@ allOf:
|
|||||||
compatible:
|
compatible:
|
||||||
contains:
|
contains:
|
||||||
enum:
|
enum:
|
||||||
|
- qcom,mdm9607-mss-pil
|
||||||
- qcom,msm8909-mss-pil
|
- qcom,msm8909-mss-pil
|
||||||
- qcom,msm8916-mss-pil
|
- qcom,msm8916-mss-pil
|
||||||
|
- qcom,msm8917-mss-pil
|
||||||
|
- qcom,msm8937-mss-pil
|
||||||
|
- qcom,msm8940-mss-pil
|
||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
power-domains:
|
power-domains:
|
||||||
@@ -271,6 +278,9 @@ allOf:
|
|||||||
contains:
|
contains:
|
||||||
enum:
|
enum:
|
||||||
- qcom,msm8926-mss-pil
|
- qcom,msm8926-mss-pil
|
||||||
|
- qcom,msm8917-mss-pil
|
||||||
|
- qcom,msm8937-mss-pil
|
||||||
|
- qcom,msm8940-mss-pil
|
||||||
- qcom,msm8974-mss-pil
|
- qcom,msm8974-mss-pil
|
||||||
then:
|
then:
|
||||||
required:
|
required:
|
||||||
|
|||||||
@@ -126,7 +126,6 @@ properties:
|
|||||||
- description: Metadata reserved region
|
- description: Metadata reserved region
|
||||||
|
|
||||||
firmware-name:
|
firmware-name:
|
||||||
$ref: /schemas/types.yaml#/definitions/string-array
|
|
||||||
items:
|
items:
|
||||||
- description: Name of MBA firmware
|
- description: Name of MBA firmware
|
||||||
- description: Name of modem firmware
|
- description: Name of modem firmware
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ properties:
|
|||||||
description: Reference to the AOSS side-channel message RAM.
|
description: Reference to the AOSS side-channel message RAM.
|
||||||
|
|
||||||
firmware-name:
|
firmware-name:
|
||||||
$ref: /schemas/types.yaml#/definitions/string-array
|
|
||||||
items:
|
items:
|
||||||
- description: Firmware name of the Hexagon core
|
- description: Firmware name of the Hexagon core
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ properties:
|
|||||||
- description: metadata reserved region
|
- description: metadata reserved region
|
||||||
|
|
||||||
firmware-name:
|
firmware-name:
|
||||||
$ref: /schemas/types.yaml#/definitions/string-array
|
|
||||||
items:
|
items:
|
||||||
- description: Name of MBA firmware
|
- description: Name of MBA firmware
|
||||||
- description: Name of modem firmware
|
- description: Name of modem firmware
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ properties:
|
|||||||
- description: metadata reserved region
|
- description: metadata reserved region
|
||||||
|
|
||||||
firmware-name:
|
firmware-name:
|
||||||
$ref: /schemas/types.yaml#/definitions/string-array
|
|
||||||
items:
|
items:
|
||||||
- description: Name of MBA firmware
|
- description: Name of MBA firmware
|
||||||
- description: Name of modem firmware
|
- description: Name of modem firmware
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ properties:
|
|||||||
description: Reference to the reserved-memory for the Hexagon core
|
description: Reference to the reserved-memory for the Hexagon core
|
||||||
|
|
||||||
firmware-name:
|
firmware-name:
|
||||||
$ref: /schemas/types.yaml#/definitions/string
|
maxItems: 1
|
||||||
description: Firmware name for the Hexagon core
|
description: Firmware name for the Hexagon core
|
||||||
|
|
||||||
required:
|
required:
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ properties:
|
|||||||
smd-edge: false
|
smd-edge: false
|
||||||
|
|
||||||
firmware-name:
|
firmware-name:
|
||||||
$ref: /schemas/types.yaml#/definitions/string
|
maxItems: 1
|
||||||
description: Firmware name for the Hexagon core
|
description: Firmware name for the Hexagon core
|
||||||
|
|
||||||
required:
|
required:
|
||||||
|
|||||||
@@ -28,8 +28,16 @@ properties:
|
|||||||
- qcom,x1e80100-adsp-pas
|
- qcom,x1e80100-adsp-pas
|
||||||
- qcom,x1e80100-cdsp-pas
|
- qcom,x1e80100-cdsp-pas
|
||||||
- items:
|
- items:
|
||||||
- const: qcom,sm8750-adsp-pas
|
- enum:
|
||||||
|
- qcom,glymur-adsp-pas
|
||||||
|
- qcom,kaanapali-adsp-pas
|
||||||
|
- qcom,sm8750-adsp-pas
|
||||||
- const: qcom,sm8550-adsp-pas
|
- const: qcom,sm8550-adsp-pas
|
||||||
|
- items:
|
||||||
|
- enum:
|
||||||
|
- qcom,glymur-cdsp-pas
|
||||||
|
- qcom,kaanapali-cdsp-pas
|
||||||
|
- const: qcom,sm8550-cdsp-pas
|
||||||
- items:
|
- items:
|
||||||
- const: qcom,sm8750-cdsp-pas
|
- const: qcom,sm8750-cdsp-pas
|
||||||
- const: qcom,sm8650-cdsp-pas
|
- const: qcom,sm8650-cdsp-pas
|
||||||
@@ -52,7 +60,6 @@ properties:
|
|||||||
smd-edge: false
|
smd-edge: false
|
||||||
|
|
||||||
firmware-name:
|
firmware-name:
|
||||||
$ref: /schemas/types.yaml#/definitions/string-array
|
|
||||||
items:
|
items:
|
||||||
- description: Firmware name of the Hexagon core
|
- description: Firmware name of the Hexagon core
|
||||||
- description: Firmware name of the Hexagon Devicetree
|
- description: Firmware name of the Hexagon Devicetree
|
||||||
@@ -95,6 +102,10 @@ allOf:
|
|||||||
compatible:
|
compatible:
|
||||||
contains:
|
contains:
|
||||||
enum:
|
enum:
|
||||||
|
- qcom,glymur-adsp-pas
|
||||||
|
- qcom,glymur-cdsp-pas
|
||||||
|
- qcom,kaanapali-adsp-pas
|
||||||
|
- qcom,kaanapali-cdsp-pas
|
||||||
- qcom,sm8750-adsp-pas
|
- qcom,sm8750-adsp-pas
|
||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -154,17 +154,44 @@ patternProperties:
|
|||||||
memory-region:
|
memory-region:
|
||||||
description: |
|
description: |
|
||||||
phandle to the reserved memory nodes to be associated with the
|
phandle to the reserved memory nodes to be associated with the
|
||||||
remoteproc device. There should be at least two reserved memory nodes
|
remoteproc device. There should be two reserved memory nodes defined
|
||||||
defined. The reserved memory nodes should be carveout nodes, and
|
for the basic layout or 6 partitions for a detailed layout. The
|
||||||
should be defined with a "no-map" property as per the bindings in
|
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
|
Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
|
||||||
minItems: 2
|
oneOf:
|
||||||
maxItems: 8
|
- description: Basic layout
|
||||||
items:
|
items:
|
||||||
- description: region used for dynamic DMA allocations like vrings and
|
- description: region used for dynamic DMA allocations like vrings and
|
||||||
vring buffers
|
vring buffers
|
||||||
- description: region reserved for firmware image sections
|
- 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:
|
# Optional properties:
|
||||||
# --------------------
|
# --------------------
|
||||||
@@ -218,6 +245,13 @@ patternProperties:
|
|||||||
- resets
|
- resets
|
||||||
- firmware-name
|
- firmware-name
|
||||||
|
|
||||||
|
if:
|
||||||
|
required:
|
||||||
|
- memory-region
|
||||||
|
then:
|
||||||
|
required:
|
||||||
|
- memory-region-names
|
||||||
|
|
||||||
unevaluatedProperties: false
|
unevaluatedProperties: false
|
||||||
|
|
||||||
allOf:
|
allOf:
|
||||||
@@ -321,6 +355,7 @@ examples:
|
|||||||
mboxes = <&mailbox0 &mbox_mcu_r5fss0_core0>;
|
mboxes = <&mailbox0 &mbox_mcu_r5fss0_core0>;
|
||||||
memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
|
memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
|
||||||
<&mcu_r5fss0_core0_memory_region>;
|
<&mcu_r5fss0_core0_memory_region>;
|
||||||
|
memory-region-names = "dma", "firmware";
|
||||||
sram = <&mcu_r5fss0_core0_sram>;
|
sram = <&mcu_r5fss0_core0_sram>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -57,11 +57,10 @@ struct da8xx_rproc_mem {
|
|||||||
* @mem: internal memory regions data
|
* @mem: internal memory regions data
|
||||||
* @num_mems: number of internal memory regions
|
* @num_mems: number of internal memory regions
|
||||||
* @dsp_clk: placeholder for platform's DSP clk
|
* @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
|
* @irq_data: ack_fxn function parameter
|
||||||
* @chipsig: virt ptr to DSP interrupt registers (CHIPSIG & CHIPSIG_CLR)
|
* @chipsig: virt ptr to DSP interrupt registers (CHIPSIG & CHIPSIG_CLR)
|
||||||
* @bootreg: virt ptr to DSP boot address register (HOST1CFG)
|
* @bootreg: virt ptr to DSP boot address register (HOST1CFG)
|
||||||
* @irq: irq # used by this instance
|
|
||||||
*/
|
*/
|
||||||
struct da8xx_rproc {
|
struct da8xx_rproc {
|
||||||
struct rproc *rproc;
|
struct rproc *rproc;
|
||||||
@@ -69,11 +68,9 @@ struct da8xx_rproc {
|
|||||||
int num_mems;
|
int num_mems;
|
||||||
struct clk *dsp_clk;
|
struct clk *dsp_clk;
|
||||||
struct reset_control *dsp_reset;
|
struct reset_control *dsp_reset;
|
||||||
void (*ack_fxn)(struct irq_data *data);
|
|
||||||
struct irq_data *irq_data;
|
struct irq_data *irq_data;
|
||||||
void __iomem *chipsig;
|
void __iomem *chipsig;
|
||||||
void __iomem *bootreg;
|
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
|
* we need to ack it after taking down the level else we'll
|
||||||
* be called again immediately after returning.
|
* 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;
|
return IRQ_WAKE_THREAD;
|
||||||
}
|
}
|
||||||
@@ -245,45 +242,9 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
|
|||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct da8xx_rproc *drproc;
|
struct da8xx_rproc *drproc;
|
||||||
struct rproc *rproc;
|
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 irq;
|
||||||
int ret;
|
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,
|
rproc = devm_rproc_alloc(dev, "dsp", &da8xx_rproc_ops, da8xx_fw_name,
|
||||||
sizeof(*drproc));
|
sizeof(*drproc));
|
||||||
if (!rproc)
|
if (!rproc)
|
||||||
@@ -294,43 +255,63 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
drproc = rproc->priv;
|
drproc = rproc->priv;
|
||||||
drproc->rproc = rproc;
|
drproc->rproc = rproc;
|
||||||
drproc->dsp_clk = dsp_clk;
|
|
||||||
drproc->dsp_reset = dsp_reset;
|
|
||||||
rproc->has_iommu = false;
|
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);
|
ret = da8xx_rproc_get_internal_memories(pdev, drproc);
|
||||||
if (ret)
|
if (ret)
|
||||||
return 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 */
|
/* everything the ISR needs is now setup, so hook it up */
|
||||||
ret = devm_request_threaded_irq(dev, irq, da8xx_rproc_callback,
|
ret = devm_request_threaded_irq(dev, irq, da8xx_rproc_callback,
|
||||||
handle_event, 0, "da8xx-remoteproc",
|
handle_event, 0, "da8xx-remoteproc",
|
||||||
rproc);
|
rproc);
|
||||||
if (ret) {
|
if (ret)
|
||||||
dev_err(dev, "devm_request_threaded_irq error: %d\n", ret);
|
return dev_err_probe(dev, ret, "devm_request_threaded_irq error\n");
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* rproc_add() can end up enabling the DSP's clk with the DSP
|
* 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
|
* *not* in reset, but da8xx_rproc_start() needs the DSP to be
|
||||||
* held in reset at the time it is called.
|
* held in reset at the time it is called.
|
||||||
*/
|
*/
|
||||||
ret = reset_control_assert(dsp_reset);
|
ret = reset_control_assert(drproc->dsp_reset);
|
||||||
if (ret)
|
if (ret)
|
||||||
return 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);
|
ret = devm_rproc_add(dev, rproc);
|
||||||
if (ret) {
|
if (ret)
|
||||||
dev_err(dev, "rproc_add failed: %d\n", ret);
|
return dev_err_probe(dev, ret, "rproc_add failed\n");
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -812,7 +812,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv,
|
|||||||
|
|
||||||
/* Not use resource version, because we might share region */
|
/* Not use resource version, because we might share region */
|
||||||
priv->mem[b].cpu_addr = devm_ioremap_resource_wc(&pdev->dev, &res);
|
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);
|
dev_err(dev, "failed to remap %pr\n", &res);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
@@ -1007,7 +1007,11 @@ static int imx_rproc_mmio_detect_mode(struct rproc *rproc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
priv->regmap = regmap;
|
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) {
|
if (priv->gpr) {
|
||||||
ret = regmap_read(priv->gpr, dcfg->gpr_reg, &val);
|
ret = regmap_read(priv->gpr, dcfg->gpr_reg, &val);
|
||||||
|
|||||||
@@ -173,35 +173,16 @@ static int keystone_rproc_start(struct rproc *rproc)
|
|||||||
|
|
||||||
INIT_WORK(&ksproc->workqueue, handle_event);
|
INIT_WORK(&ksproc->workqueue, handle_event);
|
||||||
|
|
||||||
ret = request_irq(ksproc->irq_ring, keystone_rproc_vring_interrupt, 0,
|
enable_irq(ksproc->irq_ring);
|
||||||
dev_name(ksproc->dev), ksproc);
|
enable_irq(ksproc->irq_fault);
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = keystone_rproc_dsp_boot(ksproc, rproc->bootaddr);
|
ret = keystone_rproc_dsp_boot(ksproc, rproc->bootaddr);
|
||||||
if (ret)
|
if (ret) {
|
||||||
goto free_exc_irq;
|
flush_work(&ksproc->workqueue);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
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;
|
struct keystone_rproc *ksproc = rproc->priv;
|
||||||
|
|
||||||
keystone_rproc_dsp_reset(ksproc);
|
keystone_rproc_dsp_reset(ksproc);
|
||||||
free_irq(ksproc->irq_fault, ksproc);
|
disable_irq(ksproc->irq_fault);
|
||||||
free_irq(ksproc->irq_ring, ksproc);
|
disable_irq(ksproc->irq_ring);
|
||||||
flush_work(&ksproc->workqueue);
|
flush_work(&ksproc->workqueue);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -427,10 +408,18 @@ static int keystone_rproc_probe(struct platform_device *pdev)
|
|||||||
ksproc->irq_ring = platform_get_irq_byname(pdev, "vring");
|
ksproc->irq_ring = platform_get_irq_byname(pdev, "vring");
|
||||||
if (ksproc->irq_ring < 0)
|
if (ksproc->irq_ring < 0)
|
||||||
return ksproc->irq_ring;
|
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");
|
ksproc->irq_fault = platform_get_irq_byname(pdev, "exception");
|
||||||
if (ksproc->irq_fault < 0)
|
if (ksproc->irq_fault < 0)
|
||||||
return ksproc->irq_fault;
|
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);
|
ksproc->kick_gpio = devm_gpiod_get(dev, "kick", GPIOD_ASIS);
|
||||||
ret = PTR_ERR_OR_ZERO(ksproc->kick_gpio);
|
ret = PTR_ERR_OR_ZERO(ksproc->kick_gpio);
|
||||||
|
|||||||
@@ -1003,11 +1003,9 @@ static int pru_rproc_probe(struct platform_device *pdev)
|
|||||||
if (!data)
|
if (!data)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
ret = of_property_read_string(np, "firmware-name", &fw_name);
|
ret = rproc_of_parse_firmware(dev, 0, &fw_name);
|
||||||
if (ret) {
|
if (ret)
|
||||||
dev_err(dev, "unable to retrieve firmware-name %d\n", ret);
|
return dev_err_probe(dev, ret, "unable to retrieve firmware-name\n");
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
rproc = devm_rproc_alloc(dev, pdev->name, &pru_rproc_ops, fw_name,
|
rproc = devm_rproc_alloc(dev, pdev->name, &pru_rproc_ops, fw_name,
|
||||||
sizeof(*pru));
|
sizeof(*pru));
|
||||||
@@ -1080,14 +1078,6 @@ static int pru_rproc_probe(struct platform_device *pdev)
|
|||||||
return 0;
|
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 = {
|
static const struct pru_private_data pru_data = {
|
||||||
.type = PRU_TYPE_PRU,
|
.type = PRU_TYPE_PRU,
|
||||||
};
|
};
|
||||||
@@ -1133,7 +1123,6 @@ static struct platform_driver pru_rproc_driver = {
|
|||||||
.suppress_bind_attrs = true,
|
.suppress_bind_attrs = true,
|
||||||
},
|
},
|
||||||
.probe = pru_rproc_probe,
|
.probe = pru_rproc_probe,
|
||||||
.remove = pru_rproc_remove,
|
|
||||||
};
|
};
|
||||||
module_platform_driver(pru_rproc_driver);
|
module_platform_driver(pru_rproc_driver);
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
#define to_ssr_subdev(d) container_of(d, struct qcom_rproc_ssr, subdev)
|
#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 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 MAX_REGION_NAME_LENGTH 16
|
||||||
#define SBL_MINIDUMP_SMEM_ID 602
|
#define SBL_MINIDUMP_SMEM_ID 602
|
||||||
#define MINIDUMP_REGION_VALID ('V' << 24 | 'A' << 16 | 'L' << 8 | 'I' << 0)
|
#define MINIDUMP_REGION_VALID ('V' << 24 | 'A' << 16 | 'L' << 8 | 'I' << 0)
|
||||||
@@ -80,7 +79,7 @@ struct minidump_global_toc {
|
|||||||
__le32 status;
|
__le32 status;
|
||||||
__le32 md_revision;
|
__le32 md_revision;
|
||||||
__le32 enabled;
|
__le32 enabled;
|
||||||
struct minidump_subsystem subsystems[MAX_NUM_OF_SS];
|
struct minidump_subsystem subsystems[];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct qcom_ssr_subsystem {
|
struct qcom_ssr_subsystem {
|
||||||
@@ -151,9 +150,11 @@ void qcom_minidump(struct rproc *rproc, unsigned int minidump_id,
|
|||||||
int ret;
|
int ret;
|
||||||
struct minidump_subsystem *subsystem;
|
struct minidump_subsystem *subsystem;
|
||||||
struct minidump_global_toc *toc;
|
struct minidump_global_toc *toc;
|
||||||
|
unsigned int num_ss;
|
||||||
|
size_t toc_size;
|
||||||
|
|
||||||
/* Get Global minidump ToC*/
|
/* 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 */
|
/* check if global table pointer exists and init is set */
|
||||||
if (IS_ERR(toc) || !toc->status) {
|
if (IS_ERR(toc) || !toc->status) {
|
||||||
@@ -161,6 +162,16 @@ void qcom_minidump(struct rproc *rproc, unsigned int minidump_id,
|
|||||||
return;
|
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 */
|
/* Get subsystem table of contents using the minidump id */
|
||||||
subsystem = &toc->subsystems[minidump_id];
|
subsystem = &toc->subsystems[minidump_id];
|
||||||
|
|
||||||
|
|||||||
@@ -124,6 +124,7 @@
|
|||||||
#define QDSP6v56_CLAMP_QMC_MEM BIT(22)
|
#define QDSP6v56_CLAMP_QMC_MEM BIT(22)
|
||||||
#define QDSP6SS_XO_CBCR 0x0038
|
#define QDSP6SS_XO_CBCR 0x0038
|
||||||
#define QDSP6SS_ACC_OVERRIDE_VAL 0x20
|
#define QDSP6SS_ACC_OVERRIDE_VAL 0x20
|
||||||
|
#define QDSP6SS_ACC_OVERRIDE_VAL_9607 0x80800000
|
||||||
#define QDSP6v55_BHS_EN_REST_ACK BIT(0)
|
#define QDSP6v55_BHS_EN_REST_ACK BIT(0)
|
||||||
|
|
||||||
/* QDSP6v65 parameters */
|
/* QDSP6v65 parameters */
|
||||||
@@ -162,6 +163,7 @@ struct rproc_hexagon_res {
|
|||||||
char **proxy_pd_names;
|
char **proxy_pd_names;
|
||||||
int version;
|
int version;
|
||||||
bool need_mem_protection;
|
bool need_mem_protection;
|
||||||
|
bool need_pas_mem_setup;
|
||||||
bool has_alt_reset;
|
bool has_alt_reset;
|
||||||
bool has_mba_logs;
|
bool has_mba_logs;
|
||||||
bool has_spare_reg;
|
bool has_spare_reg;
|
||||||
@@ -240,6 +242,7 @@ struct q6v5 {
|
|||||||
struct qcom_sysmon *sysmon;
|
struct qcom_sysmon *sysmon;
|
||||||
struct platform_device *bam_dmux;
|
struct platform_device *bam_dmux;
|
||||||
bool need_mem_protection;
|
bool need_mem_protection;
|
||||||
|
bool need_pas_mem_setup;
|
||||||
bool has_alt_reset;
|
bool has_alt_reset;
|
||||||
bool has_mba_logs;
|
bool has_mba_logs;
|
||||||
bool has_spare_reg;
|
bool has_spare_reg;
|
||||||
@@ -254,10 +257,14 @@ struct q6v5 {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
MSS_MDM9607,
|
||||||
MSS_MSM8226,
|
MSS_MSM8226,
|
||||||
MSS_MSM8909,
|
MSS_MSM8909,
|
||||||
MSS_MSM8916,
|
MSS_MSM8916,
|
||||||
|
MSS_MSM8917,
|
||||||
MSS_MSM8926,
|
MSS_MSM8926,
|
||||||
|
MSS_MSM8937,
|
||||||
|
MSS_MSM8940,
|
||||||
MSS_MSM8953,
|
MSS_MSM8953,
|
||||||
MSS_MSM8974,
|
MSS_MSM8974,
|
||||||
MSS_MSM8996,
|
MSS_MSM8996,
|
||||||
@@ -745,15 +752,25 @@ static int q6v5proc_reset(struct q6v5 *qproc)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
goto pbl_wait;
|
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_MSM8953 ||
|
||||||
qproc->version == MSS_MSM8996 ||
|
qproc->version == MSS_MSM8996 ||
|
||||||
qproc->version == MSS_MSM8998 ||
|
qproc->version == MSS_MSM8998 ||
|
||||||
qproc->version == MSS_SDM660) {
|
qproc->version == MSS_SDM660) {
|
||||||
|
|
||||||
if (qproc->version != MSS_MSM8909 &&
|
/* Override the ACC value if required */
|
||||||
qproc->version != MSS_MSM8953)
|
if (qproc->version == MSS_MDM9607 ||
|
||||||
/* Override the ACC value if required */
|
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,
|
writel(QDSP6SS_ACC_OVERRIDE_VAL,
|
||||||
qproc->reg_base + QDSP6SS_STRAP_ACC);
|
qproc->reg_base + QDSP6SS_STRAP_ACC);
|
||||||
|
|
||||||
@@ -799,6 +816,7 @@ static int q6v5proc_reset(struct q6v5 *qproc)
|
|||||||
|
|
||||||
if (qproc->version != MSS_MSM8909) {
|
if (qproc->version != MSS_MSM8909) {
|
||||||
int mem_pwr_ctl;
|
int mem_pwr_ctl;
|
||||||
|
int reverse;
|
||||||
|
|
||||||
/* Deassert QDSP6 compiler memory clamp */
|
/* Deassert QDSP6 compiler memory clamp */
|
||||||
val = readl(qproc->reg_base + QDSP6SS_PWR_CTL_REG);
|
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);
|
writel(val, qproc->reg_base + QDSP6SS_PWR_CTL_REG);
|
||||||
|
|
||||||
/* Turn on L1, L2, ETB and JU memories 1 at a time */
|
/* 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) {
|
qproc->version == MSS_MSM8996) {
|
||||||
mem_pwr_ctl = QDSP6SS_MEM_PWR_CTL;
|
mem_pwr_ctl = QDSP6SS_MEM_PWR_CTL;
|
||||||
i = 19;
|
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 {
|
} else {
|
||||||
/* MSS_MSM8998, MSS_SDM660 */
|
/* MSS_MSM8998, MSS_SDM660 */
|
||||||
mem_pwr_ctl = QDSP6V6SS_MEM_PWR_CTL;
|
mem_pwr_ctl = QDSP6V6SS_MEM_PWR_CTL;
|
||||||
i = 28;
|
i = 28;
|
||||||
|
reverse = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
val = readl(qproc->reg_base + mem_pwr_ctl);
|
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);
|
val |= BIT(i);
|
||||||
writel(val, qproc->reg_base + mem_pwr_ctl);
|
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
|
* wait for 1us for both memory peripheral and data
|
||||||
* array to turn on.
|
* array to turn on.
|
||||||
*/
|
*/
|
||||||
val |= readl(qproc->reg_base + mem_pwr_ctl);
|
val = readl(qproc->reg_base + mem_pwr_ctl);
|
||||||
udelay(1);
|
udelay(1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1441,7 +1479,7 @@ static int q6v5_mpss_load(struct q6v5 *qproc)
|
|||||||
max_addr = ALIGN(phdr->p_paddr + phdr->p_memsz, SZ_4K);
|
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);
|
ret = qcom_scm_pas_mem_setup(MPSS_PAS_ID, qproc->mpss_phys, qproc->mpss_size);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(qproc->dev,
|
dev_err(qproc->dev,
|
||||||
@@ -2224,6 +2262,7 @@ static const struct rproc_hexagon_res sc7180_mss = {
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
.need_mem_protection = true,
|
.need_mem_protection = true,
|
||||||
|
.need_pas_mem_setup = false,
|
||||||
.has_alt_reset = false,
|
.has_alt_reset = false,
|
||||||
.has_mba_logs = true,
|
.has_mba_logs = true,
|
||||||
.has_spare_reg = true,
|
.has_spare_reg = true,
|
||||||
@@ -2253,6 +2292,7 @@ static const struct rproc_hexagon_res sc7280_mss = {
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
.need_mem_protection = true,
|
.need_mem_protection = true,
|
||||||
|
.need_pas_mem_setup = false,
|
||||||
.has_alt_reset = false,
|
.has_alt_reset = false,
|
||||||
.has_mba_logs = true,
|
.has_mba_logs = true,
|
||||||
.has_spare_reg = false,
|
.has_spare_reg = false,
|
||||||
@@ -2285,6 +2325,7 @@ static const struct rproc_hexagon_res sdm660_mss = {
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
.need_mem_protection = true,
|
.need_mem_protection = true,
|
||||||
|
.need_pas_mem_setup = false,
|
||||||
.has_alt_reset = false,
|
.has_alt_reset = false,
|
||||||
.has_mba_logs = false,
|
.has_mba_logs = false,
|
||||||
.has_spare_reg = false,
|
.has_spare_reg = false,
|
||||||
@@ -2321,6 +2362,7 @@ static const struct rproc_hexagon_res sdm845_mss = {
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
.need_mem_protection = true,
|
.need_mem_protection = true,
|
||||||
|
.need_pas_mem_setup = false,
|
||||||
.has_alt_reset = true,
|
.has_alt_reset = true,
|
||||||
.has_mba_logs = false,
|
.has_mba_logs = false,
|
||||||
.has_spare_reg = false,
|
.has_spare_reg = false,
|
||||||
@@ -2353,6 +2395,7 @@ static const struct rproc_hexagon_res msm8998_mss = {
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
.need_mem_protection = true,
|
.need_mem_protection = true,
|
||||||
|
.need_pas_mem_setup = false,
|
||||||
.has_alt_reset = false,
|
.has_alt_reset = false,
|
||||||
.has_mba_logs = false,
|
.has_mba_logs = false,
|
||||||
.has_spare_reg = false,
|
.has_spare_reg = false,
|
||||||
@@ -2392,6 +2435,7 @@ static const struct rproc_hexagon_res msm8996_mss = {
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
.need_mem_protection = true,
|
.need_mem_protection = true,
|
||||||
|
.need_pas_mem_setup = false,
|
||||||
.has_alt_reset = false,
|
.has_alt_reset = false,
|
||||||
.has_mba_logs = false,
|
.has_mba_logs = false,
|
||||||
.has_spare_reg = false,
|
.has_spare_reg = false,
|
||||||
@@ -2402,6 +2446,41 @@ static const struct rproc_hexagon_res msm8996_mss = {
|
|||||||
.version = MSS_MSM8996,
|
.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 = {
|
static const struct rproc_hexagon_res msm8909_mss = {
|
||||||
.hexagon_mba_image = "mba.mbn",
|
.hexagon_mba_image = "mba.mbn",
|
||||||
.proxy_supply = (struct qcom_mss_reg_res[]) {
|
.proxy_supply = (struct qcom_mss_reg_res[]) {
|
||||||
@@ -2427,6 +2506,7 @@ static const struct rproc_hexagon_res msm8909_mss = {
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
.need_mem_protection = false,
|
.need_mem_protection = false,
|
||||||
|
.need_pas_mem_setup = false,
|
||||||
.has_alt_reset = false,
|
.has_alt_reset = false,
|
||||||
.has_mba_logs = false,
|
.has_mba_logs = false,
|
||||||
.has_spare_reg = false,
|
.has_spare_reg = false,
|
||||||
@@ -2473,6 +2553,7 @@ static const struct rproc_hexagon_res msm8916_mss = {
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
.need_mem_protection = false,
|
.need_mem_protection = false,
|
||||||
|
.need_pas_mem_setup = false,
|
||||||
.has_alt_reset = false,
|
.has_alt_reset = false,
|
||||||
.has_mba_logs = false,
|
.has_mba_logs = false,
|
||||||
.has_spare_reg = false,
|
.has_spare_reg = false,
|
||||||
@@ -2483,6 +2564,138 @@ static const struct rproc_hexagon_res msm8916_mss = {
|
|||||||
.version = MSS_MSM8916,
|
.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 = {
|
static const struct rproc_hexagon_res msm8953_mss = {
|
||||||
.hexagon_mba_image = "mba.mbn",
|
.hexagon_mba_image = "mba.mbn",
|
||||||
.proxy_supply = (struct qcom_mss_reg_res[]) {
|
.proxy_supply = (struct qcom_mss_reg_res[]) {
|
||||||
@@ -2509,6 +2722,7 @@ static const struct rproc_hexagon_res msm8953_mss = {
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
.need_mem_protection = false,
|
.need_mem_protection = false,
|
||||||
|
.need_pas_mem_setup = true,
|
||||||
.has_alt_reset = false,
|
.has_alt_reset = false,
|
||||||
.has_mba_logs = false,
|
.has_mba_logs = false,
|
||||||
.has_spare_reg = false,
|
.has_spare_reg = false,
|
||||||
@@ -2562,6 +2776,7 @@ static const struct rproc_hexagon_res msm8974_mss = {
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
.need_mem_protection = false,
|
.need_mem_protection = false,
|
||||||
|
.need_pas_mem_setup = false,
|
||||||
.has_alt_reset = false,
|
.has_alt_reset = false,
|
||||||
.has_mba_logs = false,
|
.has_mba_logs = false,
|
||||||
.has_spare_reg = false,
|
.has_spare_reg = false,
|
||||||
@@ -2600,6 +2815,7 @@ static const struct rproc_hexagon_res msm8226_mss = {
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
.need_mem_protection = false,
|
.need_mem_protection = false,
|
||||||
|
.need_pas_mem_setup = false,
|
||||||
.has_alt_reset = false,
|
.has_alt_reset = false,
|
||||||
.has_mba_logs = false,
|
.has_mba_logs = false,
|
||||||
.has_spare_reg = false,
|
.has_spare_reg = false,
|
||||||
@@ -2646,6 +2862,7 @@ static const struct rproc_hexagon_res msm8926_mss = {
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
.need_mem_protection = false,
|
.need_mem_protection = false,
|
||||||
|
.need_pas_mem_setup = false,
|
||||||
.has_alt_reset = false,
|
.has_alt_reset = false,
|
||||||
.has_mba_logs = false,
|
.has_mba_logs = false,
|
||||||
.has_spare_reg = false,
|
.has_spare_reg = false,
|
||||||
@@ -2657,19 +2874,23 @@ static const struct rproc_hexagon_res msm8926_mss = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct of_device_id q6v5_of_match[] = {
|
static const struct of_device_id q6v5_of_match[] = {
|
||||||
{ .compatible = "qcom,q6v5-pil", .data = &msm8916_mss},
|
{ .compatible = "qcom,q6v5-pil", .data = &msm8916_mss },
|
||||||
{ .compatible = "qcom,msm8226-mss-pil", .data = &msm8226_mss},
|
{ .compatible = "qcom,mdm9607-mss-pil", .data = &mdm9607_mss },
|
||||||
{ .compatible = "qcom,msm8909-mss-pil", .data = &msm8909_mss},
|
{ .compatible = "qcom,msm8226-mss-pil", .data = &msm8226_mss },
|
||||||
{ .compatible = "qcom,msm8916-mss-pil", .data = &msm8916_mss},
|
{ .compatible = "qcom,msm8909-mss-pil", .data = &msm8909_mss },
|
||||||
{ .compatible = "qcom,msm8926-mss-pil", .data = &msm8926_mss},
|
{ .compatible = "qcom,msm8916-mss-pil", .data = &msm8916_mss },
|
||||||
{ .compatible = "qcom,msm8953-mss-pil", .data = &msm8953_mss},
|
{ .compatible = "qcom,msm8917-mss-pil", .data = &msm8917_mss },
|
||||||
{ .compatible = "qcom,msm8974-mss-pil", .data = &msm8974_mss},
|
{ .compatible = "qcom,msm8926-mss-pil", .data = &msm8926_mss },
|
||||||
{ .compatible = "qcom,msm8996-mss-pil", .data = &msm8996_mss},
|
{ .compatible = "qcom,msm8937-mss-pil", .data = &msm8937_mss },
|
||||||
{ .compatible = "qcom,msm8998-mss-pil", .data = &msm8998_mss},
|
{ .compatible = "qcom,msm8940-mss-pil", .data = &msm8940_mss },
|
||||||
{ .compatible = "qcom,sc7180-mss-pil", .data = &sc7180_mss},
|
{ .compatible = "qcom,msm8953-mss-pil", .data = &msm8953_mss },
|
||||||
{ .compatible = "qcom,sc7280-mss-pil", .data = &sc7280_mss},
|
{ .compatible = "qcom,msm8974-mss-pil", .data = &msm8974_mss },
|
||||||
{ .compatible = "qcom,sdm660-mss-pil", .data = &sdm660_mss},
|
{ .compatible = "qcom,msm8996-mss-pil", .data = &msm8996_mss },
|
||||||
{ .compatible = "qcom,sdm845-mss-pil", .data = &sdm845_mss},
|
{ .compatible = "qcom,msm8998-mss-pil", .data = &msm8998_mss },
|
||||||
|
{ .compatible = "qcom,sc7180-mss-pil", .data = &sc7180_mss },
|
||||||
|
{ .compatible = "qcom,sc7280-mss-pil", .data = &sc7280_mss },
|
||||||
|
{ .compatible = "qcom,sdm660-mss-pil", .data = &sdm660_mss },
|
||||||
|
{ .compatible = "qcom,sdm845-mss-pil", .data = &sdm845_mss },
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, q6v5_of_match);
|
MODULE_DEVICE_TABLE(of, q6v5_of_match);
|
||||||
|
|||||||
@@ -1531,78 +1531,79 @@ static const struct qcom_pas_data sm8750_mpss_resource = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct of_device_id qcom_pas_of_match[] = {
|
static const struct of_device_id qcom_pas_of_match[] = {
|
||||||
{ .compatible = "qcom,milos-adsp-pas", .data = &sm8550_adsp_resource},
|
{ .compatible = "qcom,eliza-adsp-pas", .data = &sm8550_adsp_resource },
|
||||||
{ .compatible = "qcom,milos-cdsp-pas", .data = &milos_cdsp_resource},
|
{ .compatible = "qcom,milos-adsp-pas", .data = &sm8550_adsp_resource },
|
||||||
{ .compatible = "qcom,milos-mpss-pas", .data = &sm8450_mpss_resource},
|
{ .compatible = "qcom,milos-cdsp-pas", .data = &milos_cdsp_resource },
|
||||||
{ .compatible = "qcom,milos-wpss-pas", .data = &sc7280_wpss_resource},
|
{ .compatible = "qcom,milos-mpss-pas", .data = &sm8450_mpss_resource },
|
||||||
{ .compatible = "qcom,msm8226-adsp-pil", .data = &msm8996_adsp_resource},
|
{ .compatible = "qcom,milos-wpss-pas", .data = &sc7280_wpss_resource },
|
||||||
{ .compatible = "qcom,msm8953-adsp-pil", .data = &msm8996_adsp_resource},
|
{ .compatible = "qcom,msm8226-adsp-pil", .data = &msm8996_adsp_resource },
|
||||||
{ .compatible = "qcom,msm8974-adsp-pil", .data = &msm8996_adsp_resource},
|
{ .compatible = "qcom,msm8953-adsp-pil", .data = &msm8996_adsp_resource },
|
||||||
{ .compatible = "qcom,msm8996-adsp-pil", .data = &msm8996_adsp_resource},
|
{ .compatible = "qcom,msm8974-adsp-pil", .data = &msm8996_adsp_resource },
|
||||||
{ .compatible = "qcom,msm8996-slpi-pil", .data = &msm8996_slpi_resource_init},
|
{ .compatible = "qcom,msm8996-adsp-pil", .data = &msm8996_adsp_resource },
|
||||||
{ .compatible = "qcom,msm8998-adsp-pas", .data = &msm8996_adsp_resource},
|
{ .compatible = "qcom,msm8996-slpi-pil", .data = &msm8996_slpi_resource_init },
|
||||||
{ .compatible = "qcom,msm8998-slpi-pas", .data = &msm8996_slpi_resource_init},
|
{ .compatible = "qcom,msm8998-adsp-pas", .data = &msm8996_adsp_resource },
|
||||||
|
{ .compatible = "qcom,msm8998-slpi-pas", .data = &msm8996_slpi_resource_init },
|
||||||
{ .compatible = "qcom,qcs404-adsp-pas", .data = &adsp_resource_init },
|
{ .compatible = "qcom,qcs404-adsp-pas", .data = &adsp_resource_init },
|
||||||
{ .compatible = "qcom,qcs404-cdsp-pas", .data = &cdsp_resource_init },
|
{ .compatible = "qcom,qcs404-cdsp-pas", .data = &cdsp_resource_init },
|
||||||
{ .compatible = "qcom,qcs404-wcss-pas", .data = &wcss_resource_init },
|
{ .compatible = "qcom,qcs404-wcss-pas", .data = &wcss_resource_init },
|
||||||
{ .compatible = "qcom,sa8775p-adsp-pas", .data = &sa8775p_adsp_resource},
|
{ .compatible = "qcom,sa8775p-adsp-pas", .data = &sa8775p_adsp_resource },
|
||||||
{ .compatible = "qcom,sa8775p-cdsp0-pas", .data = &sa8775p_cdsp0_resource},
|
{ .compatible = "qcom,sa8775p-cdsp0-pas", .data = &sa8775p_cdsp0_resource },
|
||||||
{ .compatible = "qcom,sa8775p-cdsp1-pas", .data = &sa8775p_cdsp1_resource},
|
{ .compatible = "qcom,sa8775p-cdsp1-pas", .data = &sa8775p_cdsp1_resource },
|
||||||
{ .compatible = "qcom,sa8775p-gpdsp0-pas", .data = &sa8775p_gpdsp0_resource},
|
{ .compatible = "qcom,sa8775p-gpdsp0-pas", .data = &sa8775p_gpdsp0_resource },
|
||||||
{ .compatible = "qcom,sa8775p-gpdsp1-pas", .data = &sa8775p_gpdsp1_resource},
|
{ .compatible = "qcom,sa8775p-gpdsp1-pas", .data = &sa8775p_gpdsp1_resource },
|
||||||
{ .compatible = "qcom,sar2130p-adsp-pas", .data = &sm8350_adsp_resource},
|
{ .compatible = "qcom,sar2130p-adsp-pas", .data = &sm8350_adsp_resource },
|
||||||
{ .compatible = "qcom,sc7180-adsp-pas", .data = &sm8250_adsp_resource},
|
{ .compatible = "qcom,sc7180-adsp-pas", .data = &sm8250_adsp_resource },
|
||||||
{ .compatible = "qcom,sc7180-mpss-pas", .data = &mpss_resource_init},
|
{ .compatible = "qcom,sc7180-mpss-pas", .data = &mpss_resource_init },
|
||||||
{ .compatible = "qcom,sc7280-adsp-pas", .data = &sm8350_adsp_resource},
|
{ .compatible = "qcom,sc7280-adsp-pas", .data = &sm8350_adsp_resource },
|
||||||
{ .compatible = "qcom,sc7280-cdsp-pas", .data = &sm6350_cdsp_resource},
|
{ .compatible = "qcom,sc7280-cdsp-pas", .data = &sm6350_cdsp_resource },
|
||||||
{ .compatible = "qcom,sc7280-mpss-pas", .data = &mpss_resource_init},
|
{ .compatible = "qcom,sc7280-mpss-pas", .data = &mpss_resource_init },
|
||||||
{ .compatible = "qcom,sc7280-wpss-pas", .data = &sc7280_wpss_resource},
|
{ .compatible = "qcom,sc7280-wpss-pas", .data = &sc7280_wpss_resource },
|
||||||
{ .compatible = "qcom,sc8180x-adsp-pas", .data = &sm8150_adsp_resource},
|
{ .compatible = "qcom,sc8180x-adsp-pas", .data = &sm8150_adsp_resource },
|
||||||
{ .compatible = "qcom,sc8180x-cdsp-pas", .data = &sm8150_cdsp_resource},
|
{ .compatible = "qcom,sc8180x-cdsp-pas", .data = &sm8150_cdsp_resource },
|
||||||
{ .compatible = "qcom,sc8180x-mpss-pas", .data = &sc8180x_mpss_resource},
|
{ .compatible = "qcom,sc8180x-mpss-pas", .data = &sc8180x_mpss_resource },
|
||||||
{ .compatible = "qcom,sc8280xp-adsp-pas", .data = &sm8250_adsp_resource},
|
{ .compatible = "qcom,sc8280xp-adsp-pas", .data = &sm8250_adsp_resource },
|
||||||
{ .compatible = "qcom,sc8280xp-nsp0-pas", .data = &sc8280xp_nsp0_resource},
|
{ .compatible = "qcom,sc8280xp-nsp0-pas", .data = &sc8280xp_nsp0_resource },
|
||||||
{ .compatible = "qcom,sc8280xp-nsp1-pas", .data = &sc8280xp_nsp1_resource},
|
{ .compatible = "qcom,sc8280xp-nsp1-pas", .data = &sc8280xp_nsp1_resource },
|
||||||
{ .compatible = "qcom,sdm660-adsp-pas", .data = &adsp_resource_init},
|
{ .compatible = "qcom,sdm660-adsp-pas", .data = &adsp_resource_init },
|
||||||
{ .compatible = "qcom,sdm660-cdsp-pas", .data = &cdsp_resource_init},
|
{ .compatible = "qcom,sdm660-cdsp-pas", .data = &cdsp_resource_init },
|
||||||
{ .compatible = "qcom,sdm845-adsp-pas", .data = &sdm845_adsp_resource_init},
|
{ .compatible = "qcom,sdm845-adsp-pas", .data = &sdm845_adsp_resource_init },
|
||||||
{ .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init},
|
{ .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init },
|
||||||
{ .compatible = "qcom,sdm845-slpi-pas", .data = &sdm845_slpi_resource_init},
|
{ .compatible = "qcom,sdm845-slpi-pas", .data = &sdm845_slpi_resource_init },
|
||||||
{ .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource},
|
{ .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource },
|
||||||
{ .compatible = "qcom,sdx75-mpss-pas", .data = &sm8650_mpss_resource},
|
{ .compatible = "qcom,sdx75-mpss-pas", .data = &sm8650_mpss_resource },
|
||||||
{ .compatible = "qcom,sm6115-adsp-pas", .data = &adsp_resource_init},
|
{ .compatible = "qcom,sm6115-adsp-pas", .data = &adsp_resource_init },
|
||||||
{ .compatible = "qcom,sm6115-cdsp-pas", .data = &cdsp_resource_init},
|
{ .compatible = "qcom,sm6115-cdsp-pas", .data = &cdsp_resource_init },
|
||||||
{ .compatible = "qcom,sm6115-mpss-pas", .data = &sc8180x_mpss_resource},
|
{ .compatible = "qcom,sm6115-mpss-pas", .data = &sc8180x_mpss_resource },
|
||||||
{ .compatible = "qcom,sm6350-adsp-pas", .data = &sm6350_adsp_resource},
|
{ .compatible = "qcom,sm6350-adsp-pas", .data = &sm6350_adsp_resource },
|
||||||
{ .compatible = "qcom,sm6350-cdsp-pas", .data = &sm6350_cdsp_resource},
|
{ .compatible = "qcom,sm6350-cdsp-pas", .data = &sm6350_cdsp_resource },
|
||||||
{ .compatible = "qcom,sm6350-mpss-pas", .data = &mpss_resource_init},
|
{ .compatible = "qcom,sm6350-mpss-pas", .data = &mpss_resource_init },
|
||||||
{ .compatible = "qcom,sm6375-adsp-pas", .data = &sm6350_adsp_resource},
|
{ .compatible = "qcom,sm6375-adsp-pas", .data = &sm6350_adsp_resource },
|
||||||
{ .compatible = "qcom,sm6375-cdsp-pas", .data = &sm8150_cdsp_resource},
|
{ .compatible = "qcom,sm6375-cdsp-pas", .data = &sm8150_cdsp_resource },
|
||||||
{ .compatible = "qcom,sm6375-mpss-pas", .data = &sm6375_mpss_resource},
|
{ .compatible = "qcom,sm6375-mpss-pas", .data = &sm6375_mpss_resource },
|
||||||
{ .compatible = "qcom,sm8150-adsp-pas", .data = &sm8150_adsp_resource},
|
{ .compatible = "qcom,sm8150-adsp-pas", .data = &sm8150_adsp_resource },
|
||||||
{ .compatible = "qcom,sm8150-cdsp-pas", .data = &sm8150_cdsp_resource},
|
{ .compatible = "qcom,sm8150-cdsp-pas", .data = &sm8150_cdsp_resource },
|
||||||
{ .compatible = "qcom,sm8150-mpss-pas", .data = &mpss_resource_init},
|
{ .compatible = "qcom,sm8150-mpss-pas", .data = &mpss_resource_init },
|
||||||
{ .compatible = "qcom,sm8150-slpi-pas", .data = &sdm845_slpi_resource_init},
|
{ .compatible = "qcom,sm8150-slpi-pas", .data = &sdm845_slpi_resource_init },
|
||||||
{ .compatible = "qcom,sm8250-adsp-pas", .data = &sm8250_adsp_resource},
|
{ .compatible = "qcom,sm8250-adsp-pas", .data = &sm8250_adsp_resource },
|
||||||
{ .compatible = "qcom,sm8250-cdsp-pas", .data = &sm8250_cdsp_resource},
|
{ .compatible = "qcom,sm8250-cdsp-pas", .data = &sm8250_cdsp_resource },
|
||||||
{ .compatible = "qcom,sm8250-slpi-pas", .data = &sdm845_slpi_resource_init},
|
{ .compatible = "qcom,sm8250-slpi-pas", .data = &sdm845_slpi_resource_init },
|
||||||
{ .compatible = "qcom,sm8350-adsp-pas", .data = &sm8350_adsp_resource},
|
{ .compatible = "qcom,sm8350-adsp-pas", .data = &sm8350_adsp_resource },
|
||||||
{ .compatible = "qcom,sm8350-cdsp-pas", .data = &sm8350_cdsp_resource},
|
{ .compatible = "qcom,sm8350-cdsp-pas", .data = &sm8350_cdsp_resource },
|
||||||
{ .compatible = "qcom,sm8350-slpi-pas", .data = &sdm845_slpi_resource_init},
|
{ .compatible = "qcom,sm8350-slpi-pas", .data = &sdm845_slpi_resource_init },
|
||||||
{ .compatible = "qcom,sm8350-mpss-pas", .data = &mpss_resource_init},
|
{ .compatible = "qcom,sm8350-mpss-pas", .data = &mpss_resource_init },
|
||||||
{ .compatible = "qcom,sm8450-adsp-pas", .data = &sm8350_adsp_resource},
|
{ .compatible = "qcom,sm8450-adsp-pas", .data = &sm8350_adsp_resource },
|
||||||
{ .compatible = "qcom,sm8450-cdsp-pas", .data = &sm8350_cdsp_resource},
|
{ .compatible = "qcom,sm8450-cdsp-pas", .data = &sm8350_cdsp_resource },
|
||||||
{ .compatible = "qcom,sm8450-slpi-pas", .data = &sdm845_slpi_resource_init},
|
{ .compatible = "qcom,sm8450-slpi-pas", .data = &sdm845_slpi_resource_init },
|
||||||
{ .compatible = "qcom,sm8450-mpss-pas", .data = &sm8450_mpss_resource},
|
{ .compatible = "qcom,sm8450-mpss-pas", .data = &sm8450_mpss_resource },
|
||||||
{ .compatible = "qcom,sm8550-adsp-pas", .data = &sm8550_adsp_resource},
|
{ .compatible = "qcom,sm8550-adsp-pas", .data = &sm8550_adsp_resource },
|
||||||
{ .compatible = "qcom,sm8550-cdsp-pas", .data = &sm8550_cdsp_resource},
|
{ .compatible = "qcom,sm8550-cdsp-pas", .data = &sm8550_cdsp_resource },
|
||||||
{ .compatible = "qcom,sm8550-mpss-pas", .data = &sm8550_mpss_resource},
|
{ .compatible = "qcom,sm8550-mpss-pas", .data = &sm8550_mpss_resource },
|
||||||
{ .compatible = "qcom,sm8650-adsp-pas", .data = &sm8550_adsp_resource},
|
{ .compatible = "qcom,sm8650-adsp-pas", .data = &sm8550_adsp_resource },
|
||||||
{ .compatible = "qcom,sm8650-cdsp-pas", .data = &sm8650_cdsp_resource},
|
{ .compatible = "qcom,sm8650-cdsp-pas", .data = &sm8650_cdsp_resource },
|
||||||
{ .compatible = "qcom,sm8650-mpss-pas", .data = &sm8650_mpss_resource},
|
{ .compatible = "qcom,sm8650-mpss-pas", .data = &sm8650_mpss_resource },
|
||||||
{ .compatible = "qcom,sm8750-mpss-pas", .data = &sm8750_mpss_resource},
|
{ .compatible = "qcom,sm8750-mpss-pas", .data = &sm8750_mpss_resource },
|
||||||
{ .compatible = "qcom,x1e80100-adsp-pas", .data = &x1e80100_adsp_resource},
|
{ .compatible = "qcom,x1e80100-adsp-pas", .data = &x1e80100_adsp_resource },
|
||||||
{ .compatible = "qcom,x1e80100-cdsp-pas", .data = &x1e80100_cdsp_resource},
|
{ .compatible = "qcom,x1e80100-cdsp-pas", .data = &x1e80100_cdsp_resource },
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, qcom_pas_of_match);
|
MODULE_DEVICE_TABLE(of, qcom_pas_of_match);
|
||||||
|
|||||||
@@ -677,7 +677,7 @@ struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
|
|||||||
return ERR_PTR(ret);
|
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.prepare = sysmon_prepare;
|
||||||
sysmon->subdev.start = sysmon_start;
|
sysmon->subdev.start = sysmon_start;
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ bool rproc_u64_fit_in_size_t(u64 val)
|
|||||||
if (sizeof(size_t) == sizeof(u64))
|
if (sizeof(size_t) == sizeof(u64))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return (val <= (size_t) -1);
|
return val <= SIZE_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* REMOTEPROC_INTERNAL_H */
|
#endif /* REMOTEPROC_INTERNAL_H */
|
||||||
|
|||||||
@@ -513,7 +513,7 @@ int k3_reserved_mem_init(struct k3_rproc *kproc)
|
|||||||
kproc->rmem[i].dev_addr = (u32)res.start;
|
kproc->rmem[i].dev_addr = (u32)res.start;
|
||||||
kproc->rmem[i].size = resource_size(&res);
|
kproc->rmem[i].size = resource_size(&res);
|
||||||
kproc->rmem[i].cpu_addr = devm_ioremap_resource_wc(dev, &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",
|
dev_err(dev, "failed to map reserved memory#%d at %pR\n",
|
||||||
i + 1, &res);
|
i + 1, &res);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|||||||
@@ -232,17 +232,19 @@ static void zynqmp_r5_mb_rx_cb(struct mbox_client *cl, void *msg)
|
|||||||
|
|
||||||
ipi = container_of(cl, struct mbox_info, mbox_cl);
|
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;
|
ipi_msg = (struct zynqmp_ipi_message *)msg;
|
||||||
buf_msg = (struct zynqmp_ipi_message *)ipi->rx_mc_buf;
|
if (ipi_msg) {
|
||||||
len = ipi_msg->len;
|
buf_msg = (struct zynqmp_ipi_message *)ipi->rx_mc_buf;
|
||||||
if (len > IPI_BUF_LEN_MAX) {
|
len = ipi_msg->len;
|
||||||
dev_warn(cl->dev, "msg size exceeded than %d\n",
|
if (len > IPI_BUF_LEN_MAX) {
|
||||||
IPI_BUF_LEN_MAX);
|
dev_warn(cl->dev, "msg size exceeded than %d\n",
|
||||||
len = IPI_BUF_LEN_MAX;
|
IPI_BUF_LEN_MAX);
|
||||||
|
len = IPI_BUF_LEN_MAX;
|
||||||
|
}
|
||||||
|
buf_msg->len = len;
|
||||||
|
memcpy(buf_msg->data, ipi_msg->data, len);
|
||||||
}
|
}
|
||||||
buf_msg->len = len;
|
|
||||||
memcpy(buf_msg->data, ipi_msg->data, len);
|
|
||||||
|
|
||||||
/* received and processed interrupt ack */
|
/* received and processed interrupt ack */
|
||||||
if (mbox_send_message(ipi->rx_chan, NULL) < 0)
|
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_client *mbox_cl;
|
||||||
struct mbox_info *ipi;
|
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);
|
ipi = kzalloc_obj(*ipi);
|
||||||
if (!ipi)
|
if (!ipi)
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -1005,7 +1011,7 @@ static int zynqmp_r5_get_sram_banks(struct zynqmp_r5_core *r5_core)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get SRAM device address */
|
/* 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) {
|
if (ret) {
|
||||||
dev_err(dev, "failed to get reg property\n");
|
dev_err(dev, "failed to get reg property\n");
|
||||||
goto fail_sram_get;
|
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",
|
dev_err(cluster->dev, "failed to %s rproc %d\n",
|
||||||
rproc_state_str, rproc->index);
|
rproc_state_str, rproc->index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
zynqmp_r5_free_mbox(r5_core->ipi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user