mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
crypto: ccp - Add support for DBC over PSP mailbox
On some SOCs DBC is supported through the PSP mailbox instead of the platform mailbox. This capability is advertised in the PSP capabilities register. Allow using this communication path if supported. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
3d5845e180
commit
0470bb1b71
@@ -187,23 +187,6 @@ static int psp_check_tee_support(struct psp_device *psp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void psp_init_platform_access(struct psp_device *psp)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = platform_access_dev_init(psp);
|
||||
if (ret) {
|
||||
dev_warn(psp->dev, "platform access init failed: %d\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
/* dbc must come after platform access as it tests the feature */
|
||||
ret = dbc_dev_init(psp);
|
||||
if (ret)
|
||||
dev_warn(psp->dev, "failed to init dynamic boost control: %d\n",
|
||||
ret);
|
||||
}
|
||||
|
||||
static int psp_init(struct psp_device *psp)
|
||||
{
|
||||
int ret;
|
||||
@@ -220,8 +203,19 @@ static int psp_init(struct psp_device *psp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (psp->vdata->platform_access)
|
||||
psp_init_platform_access(psp);
|
||||
if (psp->vdata->platform_access) {
|
||||
ret = platform_access_dev_init(psp);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* dbc must come after platform access as it tests the feature */
|
||||
if (PSP_FEATURE(psp, DBC) ||
|
||||
PSP_CAPABILITY(psp, DBC_THRU_EXT)) {
|
||||
ret = dbc_dev_init(psp);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user