diff options
author | Joel Kitching <kitching@google.com> | 2019-03-18 16:36:36 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-26 13:20:09 -0700 |
commit | e1761d644a336f98a73d65317eea90fb7c81d24f (patch) | |
tree | 4f3cdda5f0cd7cebf051a90e0b40478a19a056dd /host | |
parent | eb0fc5749e6cca0b9ab22000fc5b53c43433e18e (diff) | |
download | vboot-e1761d644a336f98a73d65317eea90fb7c81d24f.tar.gz |
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 <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1526070
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'host')
-rw-r--r-- | host/arch/arm/lib/crossystem_arch.c | 6 | ||||
-rw-r--r-- | host/arch/x86/lib/crossystem_arch.c | 6 |
2 files changed, 2 insertions, 10 deletions
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")) { |