]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: venus: core: Hook to V6 base registers when appropriate
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Fri, 2 Apr 2021 10:06:34 +0000 (12:06 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 6 Apr 2021 13:45:39 +0000 (15:45 +0200)
This commit points the IO base registers 6xx offsets when probing for 6xx
hardware.

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>
drivers/media/platform/qcom/venus/core.c

index 58d04a2c2ba79c7c8149a531a48873511e43bda0..f5b88b96f5f793a53233e3b9393dc4102018e7f1 100644 (file)
@@ -210,13 +210,23 @@ err:
 
 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;
-       core->wrapper_tz_base = 0;
-       core->aon_base = 0;
+       if (IS_V6(core)) {
+               core->vbif_base = core->base + VBIF_BASE;
+               core->cpu_base = core->base + CPU_BASE_V6;
+               core->cpu_cs_base = core->base + CPU_CS_BASE_V6;
+               core->cpu_ic_base = core->base + CPU_IC_BASE_V6;
+               core->wrapper_base = core->base + WRAPPER_BASE_V6;
+               core->wrapper_tz_base = core->base + WRAPPER_TZ_BASE_V6;
+               core->aon_base = core->base + AON_BASE_V6;
+       } else {
+               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;
+               core->wrapper_tz_base = 0;
+               core->aon_base = 0;
+       }
 }
 
 static int venus_probe(struct platform_device *pdev)