qualcommax: 6.12: MPD: add missing <linux/of_platform.h>

It seems that kernel cleaned up its kernels so we need to include
<linux/of_platform.h> for of_platform_device_create().

Link: https://github.com/openwrt/openwrt/pull/18795
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Robert Marko 2025-05-12 15:56:50 +02:00
parent 2018a61211
commit fc4eaa34f8
6 changed files with 46 additions and 45 deletions

View file

@ -96,7 +96,7 @@ Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
obj-$(CONFIG_QCOM_Q6V5_WCSS) += qcom_q6v5_wcss.o obj-$(CONFIG_QCOM_Q6V5_WCSS) += qcom_q6v5_wcss.o
--- /dev/null --- /dev/null
+++ b/drivers/remoteproc/qcom_q6v5_mpd.c +++ b/drivers/remoteproc/qcom_q6v5_mpd.c
@@ -0,0 +1,800 @@ @@ -0,0 +1,801 @@
+// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0
+/* +/*
+ * Copyright (C) 2016-2018 Linaro Ltd. + * Copyright (C) 2016-2018 Linaro Ltd.
@ -113,6 +113,7 @@ Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
+#include <linux/module.h> +#include <linux/module.h>
+#include <linux/of_address.h> +#include <linux/of_address.h>
+#include <linux/of_device.h> +#include <linux/of_device.h>
+#include <linux/of_platform.h>
+#include <linux/of_reserved_mem.h> +#include <linux/of_reserved_mem.h>
+#include <linux/platform_device.h> +#include <linux/platform_device.h>
+#include <linux/reset.h> +#include <linux/reset.h>

View file

@ -16,7 +16,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
--- a/drivers/remoteproc/qcom_q6v5_mpd.c --- a/drivers/remoteproc/qcom_q6v5_mpd.c
+++ b/drivers/remoteproc/qcom_q6v5_mpd.c +++ b/drivers/remoteproc/qcom_q6v5_mpd.c
@@ -44,10 +44,6 @@ @@ -45,10 +45,6 @@
#define VERSION2 2 #define VERSION2 2
static LIST_HEAD(upd_rproc_list); static LIST_HEAD(upd_rproc_list);
@ -27,7 +27,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
/** /**
* struct userpd_boot_info_header - header of user pd bootinfo * struct userpd_boot_info_header - header of user pd bootinfo
@@ -82,10 +78,15 @@ struct q6_wcss { @@ -83,10 +79,15 @@ struct q6_wcss {
phys_addr_t mem_reloc; phys_addr_t mem_reloc;
void *mem_region; void *mem_region;
size_t mem_size; size_t mem_size;
@ -45,7 +45,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
}; };
struct wcss_data { struct wcss_data {
@@ -101,8 +102,8 @@ struct wcss_data { @@ -102,8 +103,8 @@ struct wcss_data {
*/ */
static u8 qcom_get_pd_asid(struct rproc *rproc) static u8 qcom_get_pd_asid(struct rproc *rproc)
{ {
@ -56,7 +56,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
return bit / 8; return bit / 8;
} }
@@ -131,37 +132,37 @@ static int q6_wcss_start(struct rproc *r @@ -132,37 +133,37 @@ static int q6_wcss_start(struct rproc *r
static int q6_wcss_spawn_pd(struct rproc *rproc) static int q6_wcss_spawn_pd(struct rproc *rproc)
{ {
int ret; int ret;
@ -105,7 +105,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
ret = q6_wcss_spawn_pd(rproc); ret = q6_wcss_spawn_pd(rproc);
if (ret) if (ret)
return ret; return ret;
@@ -213,22 +214,22 @@ static int q6_wcss_stop(struct rproc *rp @@ -214,22 +215,22 @@ static int q6_wcss_stop(struct rproc *rp
*/ */
static int wcss_pd_stop(struct rproc *rproc) static int wcss_pd_stop(struct rproc *rproc)
{ {
@ -135,7 +135,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
return ret; return ret;
} }
@@ -273,7 +274,8 @@ static int share_upd_bootinfo_to_q6(stru @@ -274,7 +275,8 @@ static int share_upd_bootinfo_to_q6(stru
size_t size; size_t size;
u16 cnt = 0, version; u16 cnt = 0, version;
void *ptr; void *ptr;
@ -145,7 +145,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
struct rproc *upd_rproc; struct rproc *upd_rproc;
struct userpd_boot_info upd_bootinfo = {0}; struct userpd_boot_info upd_bootinfo = {0};
const struct firmware *fw; const struct firmware *fw;
@@ -308,7 +310,7 @@ static int share_upd_bootinfo_to_q6(stru @@ -309,7 +311,7 @@ static int share_upd_bootinfo_to_q6(stru
ptr += sizeof(u16); ptr += sizeof(u16);
list_for_each_entry(upd_rproc, &upd_rproc_list, node) { list_for_each_entry(upd_rproc, &upd_rproc_list, node) {
@ -154,7 +154,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
/* TYPE */ /* TYPE */
upd_bootinfo.header.type = UPD_BOOT_INFO_HEADER_TYPE; upd_bootinfo.header.type = UPD_BOOT_INFO_HEADER_TYPE;
@@ -318,11 +320,11 @@ static int share_upd_bootinfo_to_q6(stru @@ -319,11 +321,11 @@ static int share_upd_bootinfo_to_q6(stru
sizeof(upd_bootinfo) - sizeof(upd_bootinfo.header); sizeof(upd_bootinfo) - sizeof(upd_bootinfo.header);
/* Process ID */ /* Process ID */
@ -169,7 +169,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
return ret; return ret;
} }
@@ -421,19 +423,20 @@ static int q6_wcss_load(struct rproc *rp @@ -422,19 +424,20 @@ static int q6_wcss_load(struct rproc *rp
*/ */
static int wcss_pd_load(struct rproc *rproc, const struct firmware *fw) static int wcss_pd_load(struct rproc *rproc, const struct firmware *fw)
{ {
@ -195,7 +195,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
} }
static unsigned long q6_wcss_panic(struct rproc *rproc) static unsigned long q6_wcss_panic(struct rproc *rproc)
@@ -465,26 +468,15 @@ static int q6_alloc_memory_region(struct @@ -466,26 +469,15 @@ static int q6_alloc_memory_region(struct
struct device_node *node; struct device_node *node;
struct device *dev = wcss->dev; struct device *dev = wcss->dev;
@ -231,7 +231,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
} }
wcss->mem_phys = rmem->base; wcss->mem_phys = rmem->base;
@@ -508,7 +500,7 @@ static int q6_get_inbound_irq(struct qco @@ -509,7 +501,7 @@ static int q6_get_inbound_irq(struct qco
{ {
int ret, irq; int ret, irq;
char *interrupt, *tmp = (char *)int_name; char *interrupt, *tmp = (char *)int_name;
@ -240,7 +240,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
irq = platform_get_irq(pdev, index); irq = platform_get_irq(pdev, index);
if (irq < 0) if (irq < 0)
@@ -520,7 +512,7 @@ static int q6_get_inbound_irq(struct qco @@ -521,7 +513,7 @@ static int q6_get_inbound_irq(struct qco
if (!interrupt) if (!interrupt)
return -ENOMEM; return -ENOMEM;
@ -249,7 +249,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
ret = devm_request_threaded_irq(&pdev->dev, *pirq, ret = devm_request_threaded_irq(&pdev->dev, *pirq,
NULL, handler, NULL, handler,
@@ -561,7 +553,7 @@ static int init_irq(struct qcom_q6v5 *q6 @@ -562,7 +554,7 @@ static int init_irq(struct qcom_q6v5 *q6
void (*handover)(struct qcom_q6v5 *q6)) void (*handover)(struct qcom_q6v5 *q6))
{ {
int ret; int ret;
@ -258,7 +258,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
q6->rproc = rproc; q6->rproc = rproc;
q6->dev = &pdev->dev; q6->dev = &pdev->dev;
@@ -581,7 +573,7 @@ static int init_irq(struct qcom_q6v5 *q6 @@ -582,7 +574,7 @@ static int init_irq(struct qcom_q6v5 *q6
return ret; return ret;
/* Get pd_asid to prepare interrupt names */ /* Get pd_asid to prepare interrupt names */
@ -267,7 +267,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
ret = q6_get_inbound_irq(q6, pdev, "fatal", 0, &q6->fatal_irq, ret = q6_get_inbound_irq(q6, pdev, "fatal", 0, &q6->fatal_irq,
q6v5_fatal_interrupt); q6v5_fatal_interrupt);
@@ -619,7 +611,7 @@ static void q6_release_resources(void) @@ -620,7 +612,7 @@ static void q6_release_resources(void)
static int q6_register_userpd(struct platform_device *pdev, static int q6_register_userpd(struct platform_device *pdev,
struct device_node *userpd_np) struct device_node *userpd_np)
{ {
@ -276,7 +276,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
struct rproc *rproc = NULL; struct rproc *rproc = NULL;
int ret; int ret;
struct platform_device *userpd_pdev; struct platform_device *userpd_pdev;
@@ -652,21 +644,16 @@ static int q6_register_userpd(struct pla @@ -653,21 +645,16 @@ static int q6_register_userpd(struct pla
userpd_pdev->dev.driver = pdev->dev.driver; userpd_pdev->dev.driver = pdev->dev.driver;
rproc = rproc_alloc(&userpd_pdev->dev, userpd_pdev->name, &wcss_ops, rproc = rproc_alloc(&userpd_pdev->dev, userpd_pdev->name, &wcss_ops,
@ -302,7 +302,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
WCSS_CRASH_REASON, NULL, NULL); WCSS_CRASH_REASON, NULL, NULL);
if (ret) if (ret)
goto free_rproc; goto free_rproc;
@@ -678,7 +665,7 @@ static int q6_register_userpd(struct pla @@ -679,7 +666,7 @@ static int q6_register_userpd(struct pla
list_add(&rproc->node, &upd_rproc_list); list_add(&rproc->node, &upd_rproc_list);
platform_set_drvdata(userpd_pdev, rproc); platform_set_drvdata(userpd_pdev, rproc);
@ -311,7 +311,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
return 0; return 0;
free_rproc: free_rproc:
@@ -719,7 +706,6 @@ static int q6_wcss_probe(struct platform @@ -720,7 +707,6 @@ static int q6_wcss_probe(struct platform
wcss->dev = &pdev->dev; wcss->dev = &pdev->dev;
wcss->desc = desc; wcss->desc = desc;
wcss->firmware = firmware; wcss->firmware = firmware;

View file

@ -50,7 +50,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
--- a/drivers/remoteproc/qcom_q6v5_mpd.c --- a/drivers/remoteproc/qcom_q6v5_mpd.c
+++ b/drivers/remoteproc/qcom_q6v5_mpd.c +++ b/drivers/remoteproc/qcom_q6v5_mpd.c
@@ -33,6 +33,7 @@ @@ -34,6 +34,7 @@
#define BUF_SIZE 35 #define BUF_SIZE 35
@ -58,7 +58,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
#define MAX_FIRMWARE 3 #define MAX_FIRMWARE 3
#define RPD_SWID MPD_WCNSS_PAS_ID #define RPD_SWID MPD_WCNSS_PAS_ID
@@ -43,8 +44,6 @@ @@ -44,8 +45,6 @@
#define UPD_BOOT_INFO_SMEM_ID 507 #define UPD_BOOT_INFO_SMEM_ID 507
#define VERSION2 2 #define VERSION2 2
@ -67,7 +67,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
/** /**
* struct userpd_boot_info_header - header of user pd bootinfo * struct userpd_boot_info_header - header of user pd bootinfo
* @type: type of bootinfo passing over smem * @type: type of bootinfo passing over smem
@@ -80,6 +79,7 @@ struct q6_wcss { @@ -81,6 +80,7 @@ struct q6_wcss {
size_t mem_size; size_t mem_size;
const struct wcss_data *desc; const struct wcss_data *desc;
const char **firmware; const char **firmware;
@ -75,7 +75,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
}; };
struct userpd { struct userpd {
@@ -270,13 +270,12 @@ static void *q6_wcss_da_to_va(struct rpr @@ -271,13 +271,12 @@ static void *q6_wcss_da_to_va(struct rpr
*/ */
static int share_upd_bootinfo_to_q6(struct rproc *rproc) static int share_upd_bootinfo_to_q6(struct rproc *rproc)
{ {
@ -90,7 +90,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
struct userpd_boot_info upd_bootinfo = {0}; struct userpd_boot_info upd_bootinfo = {0};
const struct firmware *fw; const struct firmware *fw;
@@ -301,16 +300,19 @@ static int share_upd_bootinfo_to_q6(stru @@ -302,16 +301,19 @@ static int share_upd_bootinfo_to_q6(stru
memcpy_toio(ptr, &version, sizeof(version)); memcpy_toio(ptr, &version, sizeof(version));
ptr += sizeof(version); ptr += sizeof(version);
@ -114,7 +114,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
/* TYPE */ /* TYPE */
upd_bootinfo.header.type = UPD_BOOT_INFO_HEADER_TYPE; upd_bootinfo.header.type = UPD_BOOT_INFO_HEADER_TYPE;
@@ -322,14 +324,14 @@ static int share_upd_bootinfo_to_q6(stru @@ -323,14 +325,14 @@ static int share_upd_bootinfo_to_q6(stru
/* Process ID */ /* Process ID */
upd_bootinfo.pid = upd->pd_asid + 1; upd_bootinfo.pid = upd->pd_asid + 1;
@ -131,7 +131,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
/* Firmware mem size */ /* Firmware mem size */
upd_bootinfo.data_size = qcom_mdt_get_size(fw); upd_bootinfo.data_size = qcom_mdt_get_size(fw);
@@ -597,18 +599,23 @@ static int init_irq(struct qcom_q6v5 *q6 @@ -598,18 +600,23 @@ static int init_irq(struct qcom_q6v5 *q6
return 0; return 0;
} }
@ -161,7 +161,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
struct device_node *userpd_np) struct device_node *userpd_np)
{ {
struct userpd *upd; struct userpd *upd;
@@ -633,16 +640,16 @@ static int q6_register_userpd(struct pla @@ -634,16 +641,16 @@ static int q6_register_userpd(struct pla
return ret; return ret;
} }
@ -182,7 +182,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
rproc = rproc_alloc(&userpd_pdev->dev, userpd_pdev->name, &wcss_ops, rproc = rproc_alloc(&userpd_pdev->dev, userpd_pdev->name, &wcss_ops,
firmware_name, sizeof(*upd)); firmware_name, sizeof(*upd));
if (!rproc) { if (!rproc) {
@@ -663,7 +670,7 @@ static int q6_register_userpd(struct pla @@ -664,7 +671,7 @@ static int q6_register_userpd(struct pla
if (ret) if (ret)
goto free_rproc; goto free_rproc;
@ -191,7 +191,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
platform_set_drvdata(userpd_pdev, rproc); platform_set_drvdata(userpd_pdev, rproc);
qcom_add_ssr_subdev(rproc, &upd->ssr_subdev, userpd_pdev->name); qcom_add_ssr_subdev(rproc, &upd->ssr_subdev, userpd_pdev->name);
return 0; return 0;
@@ -728,10 +735,10 @@ static int q6_wcss_probe(struct platform @@ -729,10 +736,10 @@ static int q6_wcss_probe(struct platform
/* Iterate over userpd child's and register with rproc */ /* Iterate over userpd child's and register with rproc */
for_each_available_child_of_node(pdev->dev.of_node, userpd_np) { for_each_available_child_of_node(pdev->dev.of_node, userpd_np) {

View file

@ -10,7 +10,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
--- a/drivers/remoteproc/qcom_q6v5_mpd.c --- a/drivers/remoteproc/qcom_q6v5_mpd.c
+++ b/drivers/remoteproc/qcom_q6v5_mpd.c +++ b/drivers/remoteproc/qcom_q6v5_mpd.c
@@ -77,6 +77,8 @@ struct q6_wcss { @@ -78,6 +78,8 @@ struct q6_wcss {
phys_addr_t mem_reloc; phys_addr_t mem_reloc;
void *mem_region; void *mem_region;
size_t mem_size; size_t mem_size;
@ -19,7 +19,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
const struct wcss_data *desc; const struct wcss_data *desc;
const char **firmware; const char **firmware;
struct userpd *upd[MAX_UPD]; struct userpd *upd[MAX_UPD];
@@ -718,6 +720,16 @@ static int q6_wcss_probe(struct platform @@ -719,6 +721,16 @@ static int q6_wcss_probe(struct platform
if (ret) if (ret)
goto free_rproc; goto free_rproc;

View file

@ -10,7 +10,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
--- a/drivers/remoteproc/qcom_q6v5_mpd.c --- a/drivers/remoteproc/qcom_q6v5_mpd.c
+++ b/drivers/remoteproc/qcom_q6v5_mpd.c +++ b/drivers/remoteproc/qcom_q6v5_mpd.c
@@ -155,6 +155,8 @@ static int q6_wcss_spawn_pd(struct rproc @@ -156,6 +156,8 @@ static int q6_wcss_spawn_pd(struct rproc
static int wcss_pd_start(struct rproc *rproc) static int wcss_pd_start(struct rproc *rproc)
{ {
struct userpd *upd = rproc->priv; struct userpd *upd = rproc->priv;
@ -19,7 +19,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
u32 pasid = (upd->pd_asid << 8) | UPD_SWID; u32 pasid = (upd->pd_asid << 8) | UPD_SWID;
int ret; int ret;
@@ -170,6 +172,14 @@ static int wcss_pd_start(struct rproc *r @@ -171,6 +173,14 @@ static int wcss_pd_start(struct rproc *r
return ret; return ret;
} }
@ -34,7 +34,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
return ret; return ret;
} }
@@ -179,6 +189,12 @@ static int q6_wcss_stop(struct rproc *rp @@ -180,6 +190,12 @@ static int q6_wcss_stop(struct rproc *rp
const struct wcss_data *desc = wcss->desc; const struct wcss_data *desc = wcss->desc;
int ret; int ret;
@ -47,7 +47,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
ret = qcom_scm_pas_shutdown(desc->pasid); ret = qcom_scm_pas_shutdown(desc->pasid);
if (ret) { if (ret) {
dev_err(wcss->dev, "not able to shutdown\n"); dev_err(wcss->dev, "not able to shutdown\n");
@@ -218,6 +234,7 @@ static int wcss_pd_stop(struct rproc *rp @@ -219,6 +235,7 @@ static int wcss_pd_stop(struct rproc *rp
{ {
struct userpd *upd = rproc->priv; struct userpd *upd = rproc->priv;
struct rproc *rpd_rproc = dev_get_drvdata(upd->dev->parent); struct rproc *rpd_rproc = dev_get_drvdata(upd->dev->parent);
@ -55,7 +55,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
u32 pasid = (upd->pd_asid << 8) | UPD_SWID; u32 pasid = (upd->pd_asid << 8) | UPD_SWID;
int ret; int ret;
@@ -229,6 +246,14 @@ static int wcss_pd_stop(struct rproc *rp @@ -230,6 +247,14 @@ static int wcss_pd_stop(struct rproc *rp
} }
} }
@ -70,7 +70,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
ret = qcom_scm_msa_unlock(pasid); ret = qcom_scm_msa_unlock(pasid);
if (ret) { if (ret) {
dev_err(upd->dev, "failed to power down pd\n"); dev_err(upd->dev, "failed to power down pd\n");
@@ -430,15 +455,14 @@ static int wcss_pd_load(struct rproc *rp @@ -431,15 +456,14 @@ static int wcss_pd_load(struct rproc *rp
struct userpd *upd = rproc->priv; struct userpd *upd = rproc->priv;
struct rproc *rpd_rproc = dev_get_drvdata(upd->dev->parent); struct rproc *rpd_rproc = dev_get_drvdata(upd->dev->parent);
struct q6_wcss *wcss = rpd_rproc->priv; struct q6_wcss *wcss = rpd_rproc->priv;
@ -88,7 +88,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
wcss->mem_phys, wcss->mem_size, wcss->mem_phys, wcss->mem_size,
NULL); NULL);
} }
@@ -775,6 +799,12 @@ static void q6_wcss_remove(struct platfo @@ -776,6 +800,12 @@ static void q6_wcss_remove(struct platfo
rproc_free(rproc); rproc_free(rproc);
} }
@ -101,7 +101,7 @@ Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
static const struct wcss_data q6_ipq5332_res_init = { static const struct wcss_data q6_ipq5332_res_init = {
.pasid = MPD_WCNSS_PAS_ID, .pasid = MPD_WCNSS_PAS_ID,
.share_upd_info_to_q6 = true, .share_upd_info_to_q6 = true,
@@ -785,6 +815,7 @@ static const struct wcss_data q6_ipq9574 @@ -786,6 +816,7 @@ static const struct wcss_data q6_ipq9574
}; };
static const struct of_device_id q6_wcss_of_match[] = { static const struct of_device_id q6_wcss_of_match[] = {

View file

@ -39,7 +39,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
--- ---
--- a/drivers/remoteproc/qcom_q6v5_mpd.c --- a/drivers/remoteproc/qcom_q6v5_mpd.c
+++ b/drivers/remoteproc/qcom_q6v5_mpd.c +++ b/drivers/remoteproc/qcom_q6v5_mpd.c
@@ -42,7 +42,11 @@ @@ -43,7 +43,11 @@
#define UPD_BOOT_INFO_SMEM_SIZE 4096 #define UPD_BOOT_INFO_SMEM_SIZE 4096
#define UPD_BOOT_INFO_HEADER_TYPE 0x2 #define UPD_BOOT_INFO_HEADER_TYPE 0x2
#define UPD_BOOT_INFO_SMEM_ID 507 #define UPD_BOOT_INFO_SMEM_ID 507
@ -52,7 +52,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
/** /**
* struct userpd_boot_info_header - header of user pd bootinfo * struct userpd_boot_info_header - header of user pd bootinfo
@@ -94,6 +98,7 @@ struct userpd { @@ -95,6 +99,7 @@ struct userpd {
struct wcss_data { struct wcss_data {
u32 pasid; u32 pasid;
bool share_upd_info_to_q6; bool share_upd_info_to_q6;
@ -60,7 +60,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
}; };
/** /**
@@ -298,10 +303,13 @@ static void *q6_wcss_da_to_va(struct rpr @@ -299,10 +304,13 @@ static void *q6_wcss_da_to_va(struct rpr
static int share_upd_bootinfo_to_q6(struct rproc *rproc) static int share_upd_bootinfo_to_q6(struct rproc *rproc)
{ {
int i, ret; int i, ret;
@ -74,7 +74,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
struct userpd *upd; struct userpd *upd;
struct userpd_boot_info upd_bootinfo = {0}; struct userpd_boot_info upd_bootinfo = {0};
const struct firmware *fw; const struct firmware *fw;
@@ -323,10 +331,47 @@ static int share_upd_bootinfo_to_q6(stru @@ -324,10 +332,47 @@ static int share_upd_bootinfo_to_q6(stru
} }
/*Version*/ /*Version*/
@ -123,7 +123,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
for (i = 0; i < ARRAY_SIZE(wcss->upd); i++) for (i = 0; i < ARRAY_SIZE(wcss->upd); i++)
if (wcss->upd[i]) if (wcss->upd[i])
cnt++; cnt++;
@@ -382,12 +427,14 @@ static int q6_wcss_load(struct rproc *rp @@ -383,12 +428,14 @@ static int q6_wcss_load(struct rproc *rp
/* Share user pd boot info to Q6 remote processor */ /* Share user pd boot info to Q6 remote processor */
if (desc->share_upd_info_to_q6) { if (desc->share_upd_info_to_q6) {
@ -144,7 +144,7 @@ Signed-off-by: George Moussalem <george.moussalem@outlook.com>
} }
} }
@@ -801,13 +848,15 @@ static void q6_wcss_remove(struct platfo @@ -802,13 +849,15 @@ static void q6_wcss_remove(struct platfo
static const struct wcss_data q6_ipq5018_res_init = { static const struct wcss_data q6_ipq5018_res_init = {
.pasid = MPD_WCNSS_PAS_ID, .pasid = MPD_WCNSS_PAS_ID,