Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f19ce20 authored by Gary R Hook's avatar Gary R Hook Committed by Herbert Xu
Browse files

crypto: ccp - Remove check for x86 family and model



Each x86 SoC will make use of a unique PCI ID for the CCP
device so it is not necessary to check for the CPU family
and model.

Signed-off-by: default avatarGary R Hook <gary.hook@amd.com>
Acked-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent ce0ae266
Loading
Loading
Loading
Loading
+11 −36
Original line number Diff line number Diff line
/*
 * AMD Cryptographic Coprocessor (CCP) driver
 *
 * Copyright (C) 2013 Advanced Micro Devices, Inc.
 * Copyright (C) 2013,2016 Advanced Micro Devices, Inc.
 *
 * Author: Tom Lendacky <thomas.lendacky@amd.com>
 *
@@ -577,27 +577,11 @@ bool ccp_queues_suspended(struct ccp_device *ccp)
}
#endif

#ifdef CONFIG_X86
static const struct x86_cpu_id ccp_support[] = {
	{ X86_VENDOR_AMD, 22, },
	{ },
};
#endif

static int __init ccp_mod_init(void)
{
#ifdef CONFIG_X86
	struct cpuinfo_x86 *cpuinfo = &boot_cpu_data;
	int ret;

	if (!x86_match_cpu(ccp_support))
		return -ENODEV;

	switch (cpuinfo->x86) {
	case 22:
		if ((cpuinfo->x86_model < 48) || (cpuinfo->x86_model > 63))
			return -ENODEV;

	ret = ccp_pci_init();
	if (ret)
		return ret;
@@ -609,9 +593,6 @@ static int __init ccp_mod_init(void)
	}

	return 0;

		break;
	}
#endif

#ifdef CONFIG_ARM64
@@ -636,13 +617,7 @@ static int __init ccp_mod_init(void)
static void __exit ccp_mod_exit(void)
{
#ifdef CONFIG_X86
	struct cpuinfo_x86 *cpuinfo = &boot_cpu_data;

	switch (cpuinfo->x86) {
	case 22:
	ccp_pci_exit();
		break;
	}
#endif

#ifdef CONFIG_ARM64