soc/intel/common/block/xdci: Use vboot_can_enable_udc in xdci_can_enable

This change uses the newly added vboot_can_enable_udc to decide if it
is okay to enable xDCI in vboot developer mode.

BUG=b:78577893
BRANCH=poppy

Change-Id: Ia83b91ce17eec782faf5bb318ad8c00c09e2db05
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/25848
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Furquan Shaikh 2018-04-25 18:19:58 -07:00
parent 95673afc78
commit 0b78ae5476
1 changed files with 1 additions and 5 deletions

View File

@ -24,13 +24,9 @@
__weak void soc_xdci_init(struct device *dev) { /* no-op */ }
/* Only allow xDCI controller in developer mode if VBOOT is enabled */
int xdci_can_enable(void)
{
if (IS_ENABLED(CONFIG_VBOOT))
return vboot_developer_mode_enabled() ? 1 : 0;
else
return 1;
return vboot_can_enable_udc();
}
static struct device_operations usb_xdci_ops = {