Skip to content

Commit cfd7ca0

Browse files
superm1herbertx
authored andcommitted
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@chromium.org> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Mark Hasemeyer <markhas@chromium.org> Tested-by: Mark Hasemeyer <markhas@chromium.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent c79a316 commit cfd7ca0

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

drivers/crypto/ccp/platform-access.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@
2020

2121
#define PSP_CMD_TIMEOUT_US (500 * USEC_PER_MSEC)
2222

23-
/* Doorbell shouldn't be ringing */
24-
static int check_doorbell(u32 __iomem *doorbell)
25-
{
26-
u32 tmp;
27-
28-
return readl_poll_timeout(doorbell, tmp, tmp != 0, 0, PSP_CMD_TIMEOUT_US);
29-
}
30-
3123
/* Recovery field should be equal 0 to start sending commands */
3224
static int check_recovery(u32 __iomem *cmd)
3325
{
@@ -156,18 +148,6 @@ int psp_ring_platform_doorbell(int msg)
156148

157149
mutex_lock(&pa_dev->doorbell_mutex);
158150

159-
if (check_doorbell(button)) {
160-
dev_dbg(psp->dev, "doorbell is not ready\n");
161-
ret = -EBUSY;
162-
goto unlock;
163-
}
164-
165-
if (check_recovery(cmd)) {
166-
dev_dbg(psp->dev, "doorbell command in recovery\n");
167-
ret = -EBUSY;
168-
goto unlock;
169-
}
170-
171151
if (wait_cmd(cmd)) {
172152
dev_dbg(psp->dev, "doorbell command not done processing\n");
173153
ret = -EBUSY;

0 commit comments

Comments
 (0)