summaryrefslogtreecommitdiff
path: root/include/linux/firmware/qcom/qcom_pas.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-08-21 14:23:44 +0100
committerMark Brown <broonie@kernel.org>2026-08-21 14:23:44 +0100
commite29341f2eb346cf6491a443779aaa8baafa1e15e (patch)
treeec342d1e978041b1b7f26e4e214e5b3d098fff62 /include/linux/firmware/qcom/qcom_pas.h
parentebd7776db5abf0d5f37a9e7365430376fee90f50 (diff)
parentd4d61a4b0a52e8f3cdb3e1578602850a3452ec3e (diff)
downloadlinux-next-e29341f2eb346cf6491a443779aaa8baafa1e15e.tar.gz
linux-next-e29341f2eb346cf6491a443779aaa8baafa1e15e.zip
Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git
Diffstat (limited to 'include/linux/firmware/qcom/qcom_pas.h')
-rw-r--r--include/linux/firmware/qcom/qcom_pas.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/firmware/qcom/qcom_pas.h b/include/linux/firmware/qcom/qcom_pas.h
index 65b1c9564458..fb2ec3be6a16 100644
--- a/include/linux/firmware/qcom/qcom_pas.h
+++ b/include/linux/firmware/qcom/qcom_pas.h
@@ -8,7 +8,9 @@
#ifndef __QCOM_PAS_H
#define __QCOM_PAS_H
+#include <linux/device.h>
#include <linux/err.h>
+#include <linux/io.h>
#include <linux/types.h>
struct qcom_pas_context {
@@ -22,6 +24,16 @@ struct qcom_pas_context {
bool use_tzmem;
};
+static inline void __iomem *qcom_pas_ctx_map(struct qcom_pas_context *ctx)
+{
+ void __iomem *ptr = ioremap_wc(ctx->mem_phys, ctx->mem_size);
+
+ if (!ptr)
+ dev_err(ctx->dev, "unable to map memory region: %pa+%zx\n",
+ &ctx->mem_phys, ctx->mem_size);
+ return ptr;
+}
+
bool qcom_pas_is_available(void);
struct qcom_pas_context *devm_qcom_pas_context_alloc(struct device *dev,
u32 pas_id,