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

Commit ed2f5fca authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: Correct the logic to determine if device is secure boot or not."

parents 3b24ae0f 471e59ed
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -27,7 +27,9 @@
#define TZ_INFO_GET_SECURE_STATE	0x4

/* Secure State Check */
#define SEC_STATE_VALID(a) (a & (BIT(0) | BIT(2) | BIT(6)))
#define SEC_STATE_VALID(a)       (a & BIT(0))
#define SCM_SECURE_BOOT_ENABLED  1
#define SCM_SECURE_BOOT_DISABLED 0

/* Register Offsets */
#define GLADIATOR_ID_COREID	0x0
@@ -616,9 +618,11 @@ static int scm_is_gladiator_erp_available(void)
	}

	if (SEC_STATE_VALID(desc.ret[0]))
		return 0;
		ret = SCM_SECURE_BOOT_DISABLED;
	else
		return -ENODEV;
		ret = SCM_SECURE_BOOT_ENABLED;

	return ret;
}

static struct platform_driver gladiator_erp_driver = {
@@ -636,7 +640,7 @@ static int init_gladiator_erp(void)

	ret = scm_is_gladiator_erp_available();
	if (ret) {
		pr_info("Gladiator Error Reporting not available\n");
		pr_info("Gladiator Error Reporting not available %d\n", ret);
		return -ENODEV;
	}