From e1761d644a336f98a73d65317eea90fb7c81d24f Mon Sep 17 00:00:00 2001 From: Joel Kitching Date: Mon, 18 Mar 2019 16:36:36 +0800 Subject: vboot: do not check for VBSD_HONOR_VIRT_DEV_SWITCH As part of chromium:942901, physical dev switch functionality is being deprecated. As such, we no longer need to specify the flag VBSD_HONOR_VIRT_DEV_SWITCH -- the virtual dev switch should always be honoured. Additionally, there is no longer a need to check this flag when looking up the value for crossystem devsw_cur. This constant will be marked as deprecated in a subsequent CL. BUG=b:124141368, b:124192753, chromium:942901 TEST=Build locally TEST=/work/vboot/src/repohooks/pre-upload.py TEST=make clean && make runtests TEST=make clean && COV=1 make coverage && make coverage_html BRANCH=none Change-Id: Ib1ab86d79b039650136f1038c23175f5990895db Signed-off-by: Joel Kitching Reviewed-on: https://chromium-review.googlesource.com/1526070 Commit-Ready: ChromeOS CL Exonerator Bot Tested-by: Joel Kitching Reviewed-by: Simon Glass Reviewed-by: Julius Werner --- host/arch/arm/lib/crossystem_arch.c | 6 +----- host/arch/x86/lib/crossystem_arch.c | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'host') diff --git a/host/arch/arm/lib/crossystem_arch.c b/host/arch/arm/lib/crossystem_arch.c index 539d765b..4dabb287 100644 --- a/host/arch/arm/lib/crossystem_arch.c +++ b/host/arch/arm/lib/crossystem_arch.c @@ -541,11 +541,7 @@ int VbGetArchPropertyInt(const char* name) } else if (!strcasecmp(name, "devsw_cur")) { /* Systems with virtual developer switches return at-boot * value */ - int flags = VbGetSystemPropertyInt("vdat_flags"); - if ((flags != -1) && (flags & VBSD_HONOR_VIRT_DEV_SWITCH)) - return VbGetSystemPropertyInt("devsw_boot"); - - return VbGetVarGpio("developer-switch"); + return VbGetSystemPropertyInt("devsw_boot"); } else if (!strcasecmp(name, "recoverysw_cur")) { int value; /* Try GPIO chardev API first. */ diff --git a/host/arch/x86/lib/crossystem_arch.c b/host/arch/x86/lib/crossystem_arch.c index 7de84dc5..41d601ca 100644 --- a/host/arch/x86/lib/crossystem_arch.c +++ b/host/arch/x86/lib/crossystem_arch.c @@ -791,11 +791,7 @@ int VbGetArchPropertyInt(const char* name) if (!strcasecmp(name,"devsw_cur")) { /* Systems with virtual developer switches return at-boot * value */ - int flags = VbGetSystemPropertyInt("vdat_flags"); - if ((flags != -1) && (flags & VBSD_HONOR_VIRT_DEV_SWITCH)) - value = VbGetSystemPropertyInt("devsw_boot"); - else - value = ReadGpio(GPIO_SIGNAL_TYPE_DEV); + value = VbGetSystemPropertyInt("devsw_boot"); } else if (!strcasecmp(name,"recoverysw_cur")) { value = ReadGpio(GPIO_SIGNAL_TYPE_RECOVERY); } else if (!strcasecmp(name,"wpsw_cur")) { -- cgit v1.2.1