summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.c
diff options
context:
space:
mode:
authorJohan Hovold2016-03-03 13:34:38 +0100
committerGreg Kroah-Hartman2016-03-05 03:26:08 +0100
commit27f25c17ad7fa2b24a24a4e617077dec20a026ce (patch)
tree6ba52ef40c0cbceea4a8aba80714d5496a1e2ecd /drivers/staging/greybus/connection.c
parentgreybus: svc: clean up CPortFlags handling (diff)
downloadkernel-qcow2-linux-27f25c17ad7fa2b24a24a4e617077dec20a026ce.tar.gz
kernel-qcow2-linux-27f25c17ad7fa2b24a24a4e617077dec20a026ce.tar.xz
kernel-qcow2-linux-27f25c17ad7fa2b24a24a4e617077dec20a026ce.zip
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.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index eaceafc4f8dd..01d31f66b28e 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",