Commit dcbc0c6e authored by Tom Lendacky's avatar Tom Lendacky Committed by Herbert Xu

crypto: ccp - Add support for new CCP/PSP device ID

Add a new CCP/PSP PCI device ID and new PSP register offsets.
Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Acked-by: default avatarGary R Hook <gary.hook@amd.com>
Reviewed-by: default avatarBrijesh Singh <brijesh.singh@amd.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent ad01a984
...@@ -269,7 +269,7 @@ static int sp_pci_resume(struct pci_dev *pdev) ...@@ -269,7 +269,7 @@ static int sp_pci_resume(struct pci_dev *pdev)
#endif #endif
#ifdef CONFIG_CRYPTO_DEV_SP_PSP #ifdef CONFIG_CRYPTO_DEV_SP_PSP
static const struct psp_vdata psp_entry = { static const struct psp_vdata pspv1 = {
.cmdresp_reg = 0x10580, .cmdresp_reg = 0x10580,
.cmdbuff_addr_lo_reg = 0x105e0, .cmdbuff_addr_lo_reg = 0x105e0,
.cmdbuff_addr_hi_reg = 0x105e4, .cmdbuff_addr_hi_reg = 0x105e4,
...@@ -277,28 +277,46 @@ static const struct psp_vdata psp_entry = { ...@@ -277,28 +277,46 @@ static const struct psp_vdata psp_entry = {
.inten_reg = 0x10610, .inten_reg = 0x10610,
.intsts_reg = 0x10614, .intsts_reg = 0x10614,
}; };
static const struct psp_vdata pspv2 = {
.cmdresp_reg = 0x10980,
.cmdbuff_addr_lo_reg = 0x109e0,
.cmdbuff_addr_hi_reg = 0x109e4,
.feature_reg = 0x109fc,
.inten_reg = 0x10690,
.intsts_reg = 0x10694,
};
#endif #endif
static const struct sp_dev_vdata dev_vdata[] = { static const struct sp_dev_vdata dev_vdata[] = {
{ { /* 0 */
.bar = 2, .bar = 2,
#ifdef CONFIG_CRYPTO_DEV_SP_CCP #ifdef CONFIG_CRYPTO_DEV_SP_CCP
.ccp_vdata = &ccpv3, .ccp_vdata = &ccpv3,
#endif #endif
}, },
{ { /* 1 */
.bar = 2, .bar = 2,
#ifdef CONFIG_CRYPTO_DEV_SP_CCP #ifdef CONFIG_CRYPTO_DEV_SP_CCP
.ccp_vdata = &ccpv5a, .ccp_vdata = &ccpv5a,
#endif #endif
#ifdef CONFIG_CRYPTO_DEV_SP_PSP #ifdef CONFIG_CRYPTO_DEV_SP_PSP
.psp_vdata = &psp_entry .psp_vdata = &pspv1,
#endif #endif
}, },
{ { /* 2 */
.bar = 2, .bar = 2,
#ifdef CONFIG_CRYPTO_DEV_SP_CCP #ifdef CONFIG_CRYPTO_DEV_SP_CCP
.ccp_vdata = &ccpv5b, .ccp_vdata = &ccpv5b,
#endif
},
{ /* 3 */
.bar = 2,
#ifdef CONFIG_CRYPTO_DEV_SP_CCP
.ccp_vdata = &ccpv5a,
#endif
#ifdef CONFIG_CRYPTO_DEV_SP_PSP
.psp_vdata = &pspv2,
#endif #endif
}, },
}; };
...@@ -306,6 +324,7 @@ static const struct pci_device_id sp_pci_table[] = { ...@@ -306,6 +324,7 @@ static const struct pci_device_id sp_pci_table[] = {
{ PCI_VDEVICE(AMD, 0x1537), (kernel_ulong_t)&dev_vdata[0] }, { PCI_VDEVICE(AMD, 0x1537), (kernel_ulong_t)&dev_vdata[0] },
{ PCI_VDEVICE(AMD, 0x1456), (kernel_ulong_t)&dev_vdata[1] }, { PCI_VDEVICE(AMD, 0x1456), (kernel_ulong_t)&dev_vdata[1] },
{ PCI_VDEVICE(AMD, 0x1468), (kernel_ulong_t)&dev_vdata[2] }, { PCI_VDEVICE(AMD, 0x1468), (kernel_ulong_t)&dev_vdata[2] },
{ PCI_VDEVICE(AMD, 0x1486), (kernel_ulong_t)&dev_vdata[3] },
/* Last entry must be zero */ /* Last entry must be zero */
{ 0, } { 0, }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment