[RFC][PATCH 04/14] soc: qcom: smem: add minidump device
Bjorn Andersson
andersson at kernel.org
Wed May 7 09:56:22 PDT 2025
On Tue, Apr 22, 2025 at 02:31:46PM +0300, Eugen Hristev wrote:
> Add a minidump platform device.
Please provide a bit more context here.
>
> Signed-off-by: Eugen Hristev <eugen.hristev at linaro.org>
> ---
> drivers/soc/qcom/smem.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
> index 592819701809..985147b563f8 100644
> --- a/drivers/soc/qcom/smem.c
> +++ b/drivers/soc/qcom/smem.c
> @@ -270,6 +270,7 @@ struct smem_region {
> * @partitions: list of partitions of current processor/host
> * @item_count: max accepted item number
> * @socinfo: platform device pointer
> + * @mdinfo: minidump device pointer
> * @num_regions: number of @regions
> * @regions: list of the memory regions defining the shared memory
> */
> @@ -280,6 +281,7 @@ struct qcom_smem {
>
> u32 item_count;
> struct platform_device *socinfo;
> + struct platform_device *mdinfo;
> struct smem_ptable *ptable;
> struct smem_partition global_partition;
> struct smem_partition partitions[SMEM_HOST_COUNT];
> @@ -1236,12 +1238,20 @@ static int qcom_smem_probe(struct platform_device *pdev)
> if (IS_ERR(smem->socinfo))
> dev_dbg(&pdev->dev, "failed to register socinfo device\n");
>
> + smem->mdinfo = platform_device_register_data(&pdev->dev, "qcom-md",
Let's spell out "minidump" here.
Regards,
Bjorn
> + PLATFORM_DEVID_AUTO, NULL,
> + 0);
> + if (IS_ERR(smem->mdinfo))
> + dev_err(&pdev->dev, "failed to register platform md device\n");
> +
> return 0;
> }
>
> static void qcom_smem_remove(struct platform_device *pdev)
> {
> platform_device_unregister(__smem->socinfo);
> + if (!IS_ERR(__smem->mdinfo))
> + platform_device_unregister(__smem->mdinfo);
>
> hwspin_lock_free(__smem->hwlock);
> __smem = NULL;
> --
> 2.43.0
>
More information about the linux-arm-kernel
mailing list