diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2016-05-11 10:17:55 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-05-13 15:30:05 +0200 |
commit | 0e9b41ab98ec8065263e6def8baebff1c1cd2c31 (patch) | |
tree | 507b7a50de23d54b4c5e225417201a282196a886 /drivers/staging/greybus/connection.c | |
parent | 501cc8bd09485624beaeecf476739400977489b4 (diff) | |
download | op-kernel-dev-0e9b41ab98ec8065263e6def8baebff1c1cd2c31.zip op-kernel-dev-0e9b41ab98ec8065263e6def8baebff1c1cd2c31.tar.gz |
greybus: connection: add no-flow-control connection flag
Add a no-flow-control connection flag, which is set for connection that
should not have any flow-control feature enabled.
This flag is specifically set for all connections to the legacy ES3
bootrom, and will also be used by the camera driver eventually.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r-- | drivers/staging/greybus/connection.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index 1564db8..9e88281 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -183,6 +183,8 @@ _gb_connection_create(struct gb_host_device *hd, int hd_cport_id, connection->bundle = bundle; connection->handler = handler; connection->flags = flags; + if (intf && (intf->quirks & GB_INTERFACE_QUIRK_NO_CPORT_FEATURES)) + connection->flags |= GB_CONNECTION_FLAG_NO_FLOWCTRL; connection->state = GB_CONNECTION_STATE_DISABLED; atomic_set(&connection->op_cycle, 0); @@ -338,11 +340,10 @@ gb_connection_svc_connection_create(struct gb_connection *connection) intf = connection->intf; /* - * Enable either E2EFC or CSD, unless the interface does not support - * any CPort features. + * Enable either E2EFC or CSD, unless no flow control is requested. */ cport_flags = GB_SVC_CPORT_FLAG_CSV_N; - if (intf->quirks & GB_INTERFACE_QUIRK_NO_CPORT_FEATURES) { + if (gb_connection_flow_control_disabled(connection)) { cport_flags |= GB_SVC_CPORT_FLAG_CSD_N; } else if (gb_connection_e2efc_enabled(connection)) { cport_flags |= GB_SVC_CPORT_FLAG_CSD_N | |