Skip to content

Commit

Permalink
crypto: ccp - move setting PSP master to earlier in the init
Browse files Browse the repository at this point in the history
Dynamic boost control needs to use platform access symbols
that look for the PSP master as part of initialization.

So move the PSP master before psp_init() so that dynamic boost
control can be initialized properly.

Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Mario Limonciello authored and Herbert Xu committed Jul 20, 2023
1 parent e938b08 commit b8440d5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/crypto/ccp/psp-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,14 @@ int psp_dev_init(struct sp_device *sp)
goto e_err;
}

/* master device must be set for platform access */
if (psp->sp->set_psp_master_device)
psp->sp->set_psp_master_device(psp->sp);

ret = psp_init(psp);
if (ret)
goto e_irq;

if (sp->set_psp_master_device)
sp->set_psp_master_device(sp);

/* Enable interrupt */
iowrite32(-1, psp->io_regs + psp->vdata->inten_reg);

Expand All @@ -188,6 +189,9 @@ int psp_dev_init(struct sp_device *sp)
return 0;

e_irq:
if (sp->clear_psp_master_device)
sp->clear_psp_master_device(sp);

sp_free_psp_irq(psp->sp, psp);
e_err:
sp->psp_data = NULL;
Expand Down

0 comments on commit b8440d5

Please sign in to comment.