crypto: ccp - Enable platform access interface on client PSP parts
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 10 Mar 2023 21:19:48 +0000 (15:19 -0600)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 17 Mar 2023 03:16:43 +0000 (11:16 +0800)
Client PSP parts support the platform access interface. Add
the register offsets so that client parts will initialize this
interface.

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>
drivers/crypto/ccp/sp-pci.c

index cde33b2ac71b25f8b21932e82e4b923266bf9d1f..18aa902eb5ce99b0796b2c47199b30f9c7c957c6 100644 (file)
@@ -361,6 +361,12 @@ static const struct tee_vdata teev1 = {
        .ring_rptr_reg          = 0x10554,      /* C2PMSG_21 */
 };
 
+static const struct platform_access_vdata pa_v1 = {
+       .cmdresp_reg            = 0x10570,      /* C2PMSG_28 */
+       .cmdbuff_addr_lo_reg    = 0x10574,      /* C2PMSG_29 */
+       .cmdbuff_addr_hi_reg    = 0x10578,      /* C2PMSG_30 */
+};
+
 static const struct psp_vdata pspv1 = {
        .sev                    = &sevv1,
        .feature_reg            = 0x105fc,      /* C2PMSG_63 */
@@ -377,6 +383,7 @@ static const struct psp_vdata pspv2 = {
 
 static const struct psp_vdata pspv3 = {
        .tee                    = &teev1,
+       .platform_access        = &pa_v1,
        .feature_reg            = 0x109fc,      /* C2PMSG_63 */
        .inten_reg              = 0x10690,      /* P2CMSG_INTEN */
        .intsts_reg             = 0x10694,      /* P2CMSG_INTSTS */