diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2016-03-03 13:34:38 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-03-04 18:26:08 -0800 |
commit | 27f25c17ad7fa2b24a24a4e617077dec20a026ce (patch) | |
tree | 6ba52ef40c0cbceea4a8aba80714d5496a1e2ecd /drivers/staging/greybus/connection.c | |
parent | 34145b608d4198d7c89bfeffded6bc71012b6d79 (diff) | |
download | op-kernel-dev-27f25c17ad7fa2b24a24a4e617077dec20a026ce.zip op-kernel-dev-27f25c17ad7fa2b24a24a4e617077dec20a026ce.tar.gz |
greybus: connection: generalise CPortFlags handling
Generalise the svc connection-create helper to accept a cport-flags
argument and handle the flags in the connection code instead.
Note that the camera driver currently manages its data connection
directly. We keep E2EFC enabled for now even though it will soon need
to be disabled due to some pending firmware updates.
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/connection.c')
-rw-r--r-- | drivers/staging/greybus/connection.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index eaceafc..01d31f6 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -327,18 +327,29 @@ gb_connection_svc_connection_create(struct gb_connection *connection) { struct gb_host_device *hd = connection->hd; struct gb_interface *intf; + u8 cport_flags; int ret; if (gb_connection_is_static(connection)) return gb_connection_hd_fct_flow_enable(connection); intf = connection->intf; + + /* The ES2/ES3 bootrom requires E2EFC, CSD and CSV to be disabled. */ + cport_flags = GB_SVC_CPORT_FLAG_CSV_N; + if (intf->boot_over_unipro) { + cport_flags |= GB_SVC_CPORT_FLAG_CSD_N; + } else { + cport_flags |= GB_SVC_CPORT_FLAG_CSD_N | + GB_SVC_CPORT_FLAG_E2EFC; + } + ret = gb_svc_connection_create(hd->svc, hd->svc->ap_intf_id, connection->hd_cport_id, intf->interface_id, connection->intf_cport_id, - intf->boot_over_unipro); + cport_flags); if (ret) { dev_err(&connection->hd->dev, "%s: failed to create svc connection: %d\n", |