Skip to content

Commit b31eec6

Browse files
superm1opsiff
authored andcommitted
crypto: ccp - Add support for PCI device 0x115A
[ Upstream commit 9fc6290 ] PCI device 0x115A is similar to pspv5, except it doesn't have platform access mailbox support. Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> Acked-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit 1c553c454f540e1f312a5d47280612fd50d52091) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 166ddfe commit b31eec6

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

drivers/crypto/ccp/sp-pci.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,17 @@ static const struct psp_vdata pspv6 = {
459459
.intsts_reg = 0x10514, /* P2CMSG_INTSTS */
460460
};
461461

462+
static const struct psp_vdata pspv7 = {
463+
.tee = &teev2,
464+
.cmdresp_reg = 0x10944, /* C2PMSG_17 */
465+
.cmdbuff_addr_lo_reg = 0x10948, /* C2PMSG_18 */
466+
.cmdbuff_addr_hi_reg = 0x1094c, /* C2PMSG_19 */
467+
.bootloader_info_reg = 0x109ec, /* C2PMSG_59 */
468+
.feature_reg = 0x109fc, /* C2PMSG_63 */
469+
.inten_reg = 0x10510, /* P2CMSG_INTEN */
470+
.intsts_reg = 0x10514, /* P2CMSG_INTSTS */
471+
};
472+
462473
#endif
463474

464475
static const struct sp_dev_vdata dev_vdata[] = {
@@ -525,6 +536,13 @@ static const struct sp_dev_vdata dev_vdata[] = {
525536
.psp_vdata = &pspv6,
526537
#endif
527538
},
539+
{ /* 9 */
540+
.bar = 2,
541+
#ifdef CONFIG_CRYPTO_DEV_SP_PSP
542+
.psp_vdata = &pspv7,
543+
#endif
544+
},
545+
528546
};
529547
static const struct pci_device_id sp_pci_table[] = {
530548
{ PCI_VDEVICE(AMD, 0x1537), (kernel_ulong_t)&dev_vdata[0] },
@@ -539,6 +557,7 @@ static const struct pci_device_id sp_pci_table[] = {
539557
{ PCI_VDEVICE(AMD, 0x17E0), (kernel_ulong_t)&dev_vdata[7] },
540558
{ PCI_VDEVICE(AMD, 0x156E), (kernel_ulong_t)&dev_vdata[8] },
541559
{ PCI_VDEVICE(AMD, 0x17D8), (kernel_ulong_t)&dev_vdata[8] },
560+
{ PCI_VDEVICE(AMD, 0x115A), (kernel_ulong_t)&dev_vdata[9] },
542561
/* Last entry must be zero */
543562
{ 0, }
544563
};

0 commit comments

Comments
 (0)