lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250314152939.2759573-7-serghox@gmail.com>
Date: Fri, 14 Mar 2025 18:29:27 +0300
From: Sergey Khimich <serghox@...il.com>
To: linux-media@...r.kernel.org
Cc: Philipp Zabel <p.zabel@...gutronix.de>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	linux-kernel@...r.kernel.org,
	Vladimir Yakovlev <vovchkir@...il.com>,
	Maksim Turok <turok.m7@...il.com>
Subject: [PATCH 06/18] media: coda: Add reset device before getting interrupt

From: Vladimir Yakovlev <vovchkir@...il.com>

Get access to the reset and reset the Coda HW before getting
interrupt because sometimes after hot boot(reboot) irq can remain
from previous session.

Co-developed-by: Sergey Khimich <serghox@...il.com>
Signed-off-by: Sergey Khimich <serghox@...il.com>
Signed-off-by: Vladimir Yakovlev <vovchkir@...il.com>
---
 .../platform/chips-media/coda/coda-common.c      | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/media/platform/chips-media/coda/coda-common.c b/drivers/media/platform/chips-media/coda/coda-common.c
index b240091cdc9d..33c7e8398f31 100644
--- a/drivers/media/platform/chips-media/coda/coda-common.c
+++ b/drivers/media/platform/chips-media/coda/coda-common.c
@@ -3177,6 +3177,15 @@ static int coda_probe(struct platform_device *pdev)
 	if (IS_ERR(dev->regs_base))
 		return PTR_ERR(dev->regs_base);
 
+	dev->rstc = devm_reset_control_array_get_optional_exclusive(&pdev->dev);
+	if (IS_ERR(dev->rstc)) {
+		ret = PTR_ERR(dev->rstc);
+		dev_err(&pdev->dev, "failed get reset control: %d\n", ret);
+		return ret;
+	}
+
+	reset_control_reset(dev->rstc);
+
 	/* IRQ */
 	irq = platform_get_irq_byname(pdev, "bit");
 	if (irq < 0)
@@ -3209,13 +3218,6 @@ static int coda_probe(struct platform_device *pdev)
 		}
 	}
 
-	dev->rstc = devm_reset_control_array_get_optional_exclusive(&pdev->dev);
-	if (IS_ERR(dev->rstc)) {
-		ret = PTR_ERR(dev->rstc);
-		dev_err(&pdev->dev, "failed get reset control: %d\n", ret);
-		return ret;
-	}
-
 	/* Get IRAM pool from device tree */
 	pool = of_gen_pool_get(np, "iram", 0);
 	if (!pool) {
-- 
2.30.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ