| .. | .. |
|---|
| 14 | 14 | #include <linux/reset.h> |
|---|
| 15 | 15 | #include <linux/soc/qcom/mdt_loader.h> |
|---|
| 16 | 16 | #include "qcom_common.h" |
|---|
| 17 | +#include "qcom_pil_info.h" |
|---|
| 17 | 18 | #include "qcom_q6v5.h" |
|---|
| 18 | 19 | |
|---|
| 19 | 20 | #define WCSS_CRASH_REASON 421 |
|---|
| .. | .. |
|---|
| 91 | 92 | phys_addr_t mem_reloc; |
|---|
| 92 | 93 | void *mem_region; |
|---|
| 93 | 94 | size_t mem_size; |
|---|
| 95 | + |
|---|
| 96 | + struct qcom_rproc_glink glink_subdev; |
|---|
| 97 | + struct qcom_rproc_ssr ssr_subdev; |
|---|
| 94 | 98 | }; |
|---|
| 95 | 99 | |
|---|
| 96 | 100 | static int q6v5_wcss_reset(struct q6v5_wcss *wcss) |
|---|
| .. | .. |
|---|
| 406 | 410 | return 0; |
|---|
| 407 | 411 | } |
|---|
| 408 | 412 | |
|---|
| 409 | | -static void *q6v5_wcss_da_to_va(struct rproc *rproc, u64 da, int len) |
|---|
| 413 | +static void *q6v5_wcss_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) |
|---|
| 410 | 414 | { |
|---|
| 411 | 415 | struct q6v5_wcss *wcss = rproc->priv; |
|---|
| 412 | 416 | int offset; |
|---|
| .. | .. |
|---|
| 421 | 425 | static int q6v5_wcss_load(struct rproc *rproc, const struct firmware *fw) |
|---|
| 422 | 426 | { |
|---|
| 423 | 427 | struct q6v5_wcss *wcss = rproc->priv; |
|---|
| 428 | + int ret; |
|---|
| 424 | 429 | |
|---|
| 425 | | - return qcom_mdt_load_no_init(wcss->dev, fw, rproc->firmware, |
|---|
| 426 | | - 0, wcss->mem_region, wcss->mem_phys, |
|---|
| 427 | | - wcss->mem_size, &wcss->mem_reloc); |
|---|
| 430 | + ret = qcom_mdt_load_no_init(wcss->dev, fw, rproc->firmware, |
|---|
| 431 | + 0, wcss->mem_region, wcss->mem_phys, |
|---|
| 432 | + wcss->mem_size, &wcss->mem_reloc); |
|---|
| 433 | + if (ret) |
|---|
| 434 | + return ret; |
|---|
| 435 | + |
|---|
| 436 | + qcom_pil_info_store("wcnss", wcss->mem_phys, wcss->mem_size); |
|---|
| 437 | + |
|---|
| 438 | + return ret; |
|---|
| 428 | 439 | } |
|---|
| 429 | 440 | |
|---|
| 430 | 441 | static const struct rproc_ops q6v5_wcss_ops = { |
|---|
| .. | .. |
|---|
| 557 | 568 | if (ret) |
|---|
| 558 | 569 | goto free_rproc; |
|---|
| 559 | 570 | |
|---|
| 571 | + qcom_add_glink_subdev(rproc, &wcss->glink_subdev, "q6wcss"); |
|---|
| 572 | + qcom_add_ssr_subdev(rproc, &wcss->ssr_subdev, "q6wcss"); |
|---|
| 573 | + |
|---|
| 560 | 574 | ret = rproc_add(rproc); |
|---|
| 561 | 575 | if (ret) |
|---|
| 562 | 576 | goto free_rproc; |
|---|