[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230329220753.7741-2-mario.limonciello@amd.com>
Date: Wed, 29 Mar 2023 17:07:47 -0500
From: Mario Limonciello <mario.limonciello@....com>
To: Jan Dąbroś <jsd@...ihalf.com>,
Grzegorz Bernacki <gjb@...ihalf.com>,
Mark Hasemeyer <markhas@...omium.org>,
Tom Lendacky <thomas.lendacky@....com>,
John Allen <john.allen@....com>
CC: Felix Held <Felix.Held@....com>,
Mario Limonciello <mario.limonciello@....com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
<linux-crypto@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH v7 1/6] crypto: ccp: Drop extra doorbell checks
The doorbell register set used for I2C arbitration is dedicated for this
purpose and there is no need to utilize other safety checks the platform
access register set uses.
Suggested-by: Mark Hasemeyer <markhas@...omium.org>
Signed-off-by: Mario Limonciello <mario.limonciello@....com>
---
v6->v7:
* new patch
---
drivers/crypto/ccp/platform-access.c | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/drivers/crypto/ccp/platform-access.c b/drivers/crypto/ccp/platform-access.c
index b51fb1196932..1ad3a0a512b1 100644
--- a/drivers/crypto/ccp/platform-access.c
+++ b/drivers/crypto/ccp/platform-access.c
@@ -20,14 +20,6 @@
#define PSP_CMD_TIMEOUT_US (500 * USEC_PER_MSEC)
-/* Doorbell shouldn't be ringing */
-static int check_doorbell(u32 __iomem *doorbell)
-{
- u32 tmp;
-
- return readl_poll_timeout(doorbell, tmp, tmp != 0, 0, PSP_CMD_TIMEOUT_US);
-}
-
/* Recovery field should be equal 0 to start sending commands */
static int check_recovery(u32 __iomem *cmd)
{
@@ -156,18 +148,6 @@ int psp_ring_platform_doorbell(int msg)
mutex_lock(&pa_dev->doorbell_mutex);
- if (check_doorbell(button)) {
- dev_dbg(psp->dev, "doorbell is not ready\n");
- ret = -EBUSY;
- goto unlock;
- }
-
- if (check_recovery(cmd)) {
- dev_dbg(psp->dev, "doorbell command in recovery\n");
- ret = -EBUSY;
- goto unlock;
- }
-
if (wait_cmd(cmd)) {
dev_dbg(psp->dev, "doorbell command not done processing\n");
ret = -EBUSY;
base-commit: 9117e682b8b79f7b5e2517fd28d42757d3e8b860
--
2.34.1
Powered by blists - more mailing lists