summaryrefslogtreecommitdiff
path: root/drivers/media/platform/qcom/venus/core.c
diff options
context:
space:
mode:
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>2021-04-02 13:06:27 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-04-06 16:21:10 +0300
commitb4053a2097ec2f8ea622e817ae5a46a83b23aefe (patch)
treeacdd007ae18305a97c127c4a93a971bb388b9f98 /drivers/media/platform/qcom/venus/core.c
parent0aeabfa29a9cb5b0fa62b9edc530da0ed114034f (diff)
downloadlinux-b4053a2097ec2f8ea622e817ae5a46a83b23aefe.tar.xz
media: venus: core: Add io base variables for each block
New silicon means that the pre-determined offsets we have been using in this driver no longer hold. Existing blocks of registers can exist at different offsets relative to the IO base address. This commit adds a routine to assign the IO base hooks a subsequent commit will convert from absolute to relative addressing. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/qcom/venus/core.c')
-rw-r--r--drivers/media/platform/qcom/venus/core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 0ffe5b93ca7e..639ed691a88d 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -23,6 +23,7 @@
#include "core.h"
#include "firmware.h"
#include "pm_helpers.h"
+#include "hfi_venus_io.h"
static void venus_coredump(struct venus_core *core)
{
@@ -207,6 +208,15 @@ err:
return ret;
}
+static void venus_assign_register_offsets(struct venus_core *core)
+{
+ core->vbif_base = core->base + VBIF_BASE;
+ core->cpu_base = core->base + CPU_BASE;
+ core->cpu_cs_base = core->base + CPU_CS_BASE;
+ core->cpu_ic_base = core->base + CPU_IC_BASE;
+ core->wrapper_base = core->base + WRAPPER_BASE;
+}
+
static int venus_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -273,6 +283,8 @@ static int venus_probe(struct platform_device *pdev)
if (ret)
goto err_core_put;
+ venus_assign_register_offsets(core);
+
ret = v4l2_device_register(dev, &core->v4l2_dev);
if (ret)
goto err_core_deinit;