summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/interface.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2016-05-27 17:26:23 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2016-05-27 12:19:29 -0700
commita4b08df4e01beac8a5e90f5dfb8a1ffda943d73d (patch)
tree97cba85e6a925424663e4cc18ea964e8d3e26022 /drivers/staging/greybus/interface.c
parent7aefe7918f8e053f9cd8077fcc98182689f1341e (diff)
downloadop-kernel-dev-a4b08df4e01beac8a5e90f5dfb8a1ffda943d73d.zip
op-kernel-dev-a4b08df4e01beac8a5e90f5dfb8a1ffda943d73d.tar.gz
greybus: interface: clean up bootrom quirk handling
Clean up bootrom quirk handling in preparation for addition of further flags. Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/interface.c')
-rw-r--r--drivers/staging/greybus/interface.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c
index d1e2c45..0f2b591 100644
--- a/drivers/staging/greybus/interface.c
+++ b/drivers/staging/greybus/interface.c
@@ -174,6 +174,7 @@ static void gb_interface_route_destroy(struct gb_interface *intf)
static int gb_interface_read_and_clear_init_status(struct gb_interface *intf)
{
struct gb_host_device *hd = intf->hd;
+ unsigned long bootrom_quirks;
int ret;
u32 value;
u16 attr;
@@ -217,16 +218,18 @@ static int gb_interface_read_and_clear_init_status(struct gb_interface *intf)
init_status = value >> 24;
/*
- * Check if the interface is executing the quirky ES3 bootrom that
- * requires E2EFC, CSD and CSV to be disabled.
+ * Check if the interface is executing the quirky ES3 bootrom that,
+ * for example, requires E2EFC, CSD and CSV to be disabled.
*/
+ bootrom_quirks = GB_INTERFACE_QUIRK_NO_CPORT_FEATURES;
+
switch (init_status) {
case GB_INIT_BOOTROM_UNIPRO_BOOT_STARTED:
case GB_INIT_BOOTROM_FALLBACK_UNIPRO_BOOT_STARTED:
- intf->quirks |= GB_INTERFACE_QUIRK_NO_CPORT_FEATURES;
+ intf->quirks |= bootrom_quirks;
break;
default:
- intf->quirks &= ~GB_INTERFACE_QUIRK_NO_CPORT_FEATURES;
+ intf->quirks &= ~bootrom_quirks;
}
/* Clear the init status. */
OpenPOWER on IntegriCloud