mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 13:22:23 +00:00
greybus: connection: add api to {en,dis}able unipro fct flow
In order to support mailbox-free control cport init on the bridges the AP must be able to enable/disable the flow of unipro fct tokens. Add a new API that will enable or disable on APBA the flow of fct tokens. Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Fabien Parent <fparent@baylibre.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
c5e7cbaf3a
commit
9ed5e1ba33
@ -274,6 +274,34 @@ static void gb_connection_hd_cport_disable(struct gb_connection *connection)
|
|||||||
hd->driver->cport_disable(hd, connection->hd_cport_id);
|
hd->driver->cport_disable(hd, connection->hd_cport_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int gb_connection_hd_fct_flow_enable(struct gb_connection *connection)
|
||||||
|
{
|
||||||
|
struct gb_host_device *hd = connection->hd;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if (!hd->driver->fct_flow_enable)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
ret = hd->driver->fct_flow_enable(hd, connection->hd_cport_id);
|
||||||
|
if (ret) {
|
||||||
|
dev_err(&hd->dev, "%s: failed to enable FCT flow: %d\n",
|
||||||
|
connection->name, ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void gb_connection_hd_fct_flow_disable(struct gb_connection *connection)
|
||||||
|
{
|
||||||
|
struct gb_host_device *hd = connection->hd;
|
||||||
|
|
||||||
|
if (!hd->driver->fct_flow_disable)
|
||||||
|
return;
|
||||||
|
|
||||||
|
hd->driver->fct_flow_disable(hd, connection->hd_cport_id);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Request the SVC to create a connection from AP's cport to interface's
|
* Request the SVC to create a connection from AP's cport to interface's
|
||||||
* cport.
|
* cport.
|
||||||
|
@ -25,6 +25,8 @@ struct gb_hd_driver {
|
|||||||
int (*latency_tag_disable)(struct gb_host_device *hd, u16 cport_id);
|
int (*latency_tag_disable)(struct gb_host_device *hd, u16 cport_id);
|
||||||
int (*output)(struct gb_host_device *hd, void *req, u16 size, u8 cmd,
|
int (*output)(struct gb_host_device *hd, void *req, u16 size, u8 cmd,
|
||||||
bool async);
|
bool async);
|
||||||
|
int (*fct_flow_enable)(struct gb_host_device *hd, u16 cport_id);
|
||||||
|
int (*fct_flow_disable)(struct gb_host_device *hd, u16 cport_id);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct gb_host_device {
|
struct gb_host_device {
|
||||||
|
Loading…
Reference in New Issue
Block a user