mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
media: venus: firmware: Sanitize per-VPU-version
Replace the general IS_V6 checks with more specific VPU version checks. Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
365b4824eb
commit
c38610f898
@@ -29,7 +29,7 @@ static void venus_reset_cpu(struct venus_core *core)
|
|||||||
u32 fw_size = core->fw.mapped_mem_size;
|
u32 fw_size = core->fw.mapped_mem_size;
|
||||||
void __iomem *wrapper_base;
|
void __iomem *wrapper_base;
|
||||||
|
|
||||||
if (IS_V6(core))
|
if (IS_IRIS2_1(core))
|
||||||
wrapper_base = core->wrapper_tz_base;
|
wrapper_base = core->wrapper_tz_base;
|
||||||
else
|
else
|
||||||
wrapper_base = core->wrapper_base;
|
wrapper_base = core->wrapper_base;
|
||||||
@@ -41,7 +41,7 @@ static void venus_reset_cpu(struct venus_core *core)
|
|||||||
writel(fw_size, wrapper_base + WRAPPER_NONPIX_START_ADDR);
|
writel(fw_size, wrapper_base + WRAPPER_NONPIX_START_ADDR);
|
||||||
writel(fw_size, wrapper_base + WRAPPER_NONPIX_END_ADDR);
|
writel(fw_size, wrapper_base + WRAPPER_NONPIX_END_ADDR);
|
||||||
|
|
||||||
if (IS_V6(core)) {
|
if (IS_IRIS2_1(core)) {
|
||||||
/* Bring XTSS out of reset */
|
/* Bring XTSS out of reset */
|
||||||
writel(0, wrapper_base + WRAPPER_TZ_XTSS_SW_RESET);
|
writel(0, wrapper_base + WRAPPER_TZ_XTSS_SW_RESET);
|
||||||
} else {
|
} else {
|
||||||
@@ -67,7 +67,7 @@ int venus_set_hw_state(struct venus_core *core, bool resume)
|
|||||||
if (resume) {
|
if (resume) {
|
||||||
venus_reset_cpu(core);
|
venus_reset_cpu(core);
|
||||||
} else {
|
} else {
|
||||||
if (IS_V6(core))
|
if (IS_IRIS2_1(core))
|
||||||
writel(WRAPPER_XTSS_SW_RESET_BIT,
|
writel(WRAPPER_XTSS_SW_RESET_BIT,
|
||||||
core->wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET);
|
core->wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET);
|
||||||
else
|
else
|
||||||
@@ -179,7 +179,7 @@ static int venus_shutdown_no_tz(struct venus_core *core)
|
|||||||
void __iomem *wrapper_base = core->wrapper_base;
|
void __iomem *wrapper_base = core->wrapper_base;
|
||||||
void __iomem *wrapper_tz_base = core->wrapper_tz_base;
|
void __iomem *wrapper_tz_base = core->wrapper_tz_base;
|
||||||
|
|
||||||
if (IS_V6(core)) {
|
if (IS_IRIS2_1(core)) {
|
||||||
/* Assert the reset to XTSS */
|
/* Assert the reset to XTSS */
|
||||||
reg = readl(wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET);
|
reg = readl(wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET);
|
||||||
reg |= WRAPPER_XTSS_SW_RESET_BIT;
|
reg |= WRAPPER_XTSS_SW_RESET_BIT;
|
||||||
|
|||||||
Reference in New Issue
Block a user