Skip to content

Commit dcbc0c6

Browse files
tlendackyherbertx
authored andcommitted
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: Tom Lendacky <thomas.lendacky@amd.com> Acked-by: Gary R Hook <gary.hook@amd.com> Reviewed-by: Brijesh Singh <brijesh.singh@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent ad01a98 commit dcbc0c6

1 file changed

Lines changed: 24 additions & 5 deletions

File tree

‎drivers/crypto/ccp/sp-pci.c‎

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,43 +269,62 @@ static int sp_pci_resume(struct pci_dev *pdev)
269269
#endif
270270

271271
#ifdef CONFIG_CRYPTO_DEV_SP_PSP
272-
static const struct psp_vdata psp_entry = {
272+
static const struct psp_vdata pspv1 = {
273273
.cmdresp_reg = 0x10580,
274274
.cmdbuff_addr_lo_reg = 0x105e0,
275275
.cmdbuff_addr_hi_reg = 0x105e4,
276276
.feature_reg = 0x105fc,
277277
.inten_reg = 0x10610,
278278
.intsts_reg = 0x10614,
279279
};
280+
281+
static const struct psp_vdata pspv2 = {
282+
.cmdresp_reg = 0x10980,
283+
.cmdbuff_addr_lo_reg = 0x109e0,
284+
.cmdbuff_addr_hi_reg = 0x109e4,
285+
.feature_reg = 0x109fc,
286+
.inten_reg = 0x10690,
287+
.intsts_reg = 0x10694,
288+
};
280289
#endif
281290

282291
static const struct sp_dev_vdata dev_vdata[] = {
283-
{
292+
{ /* 0 */
284293
.bar = 2,
285294
#ifdef CONFIG_CRYPTO_DEV_SP_CCP
286295
.ccp_vdata = &ccpv3,
287296
#endif
288297
},
289-
{
298+
{ /* 1 */
290299
.bar = 2,
291300
#ifdef CONFIG_CRYPTO_DEV_SP_CCP
292301
.ccp_vdata = &ccpv5a,
293302
#endif
294303
#ifdef CONFIG_CRYPTO_DEV_SP_PSP
295-
.psp_vdata = &psp_entry
304+
.psp_vdata = &pspv1,
296305
#endif
297306
},
298-
{
307+
{ /* 2 */
299308
.bar = 2,
300309
#ifdef CONFIG_CRYPTO_DEV_SP_CCP
301310
.ccp_vdata = &ccpv5b,
311+
#endif
312+
},
313+
{ /* 3 */
314+
.bar = 2,
315+
#ifdef CONFIG_CRYPTO_DEV_SP_CCP
316+
.ccp_vdata = &ccpv5a,
317+
#endif
318+
#ifdef CONFIG_CRYPTO_DEV_SP_PSP
319+
.psp_vdata = &pspv2,
302320
#endif
303321
},
304322
};
305323
static const struct pci_device_id sp_pci_table[] = {
306324
{ PCI_VDEVICE(AMD, 0x1537), (kernel_ulong_t)&dev_vdata[0] },
307325
{ PCI_VDEVICE(AMD, 0x1456), (kernel_ulong_t)&dev_vdata[1] },
308326
{ PCI_VDEVICE(AMD, 0x1468), (kernel_ulong_t)&dev_vdata[2] },
327+
{ PCI_VDEVICE(AMD, 0x1486), (kernel_ulong_t)&dev_vdata[3] },
309328
/* Last entry must be zero */
310329
{ 0, }
311330
};

0 commit comments

Comments
 (0)