mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
Merge tag 'rpmsg-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux
Pull rpmsg updates from Bjorn Andersson: "Mark 'data' argument in rpmsg_send() const, and perculate to related drivers. Replace deprecated class_destroy() with class_unregister()" * tag 'rpmsg-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: media: platform: mtk-mdp3: Constify buffer passed to mdp_vpu_sendmsg() ASoC: qcom: Constify GPR packet being send over GPR interface rpmsg: Constify buffer passed to send API remoteproc: mtk_scp: Constify buffer passed to scp_send_ipi() remoteproc: mtk_scp_ipi: Constify buffer passed to scp_ipi_send() drivers: rpmsg: class_destroy() is deprecated
This commit is contained in:
@@ -163,7 +163,7 @@ void mdp_vpu_unregister(struct mdp_dev *mdp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int mdp_vpu_sendmsg(struct mdp_vpu_dev *vpu, enum scp_ipi_id id,
|
static int mdp_vpu_sendmsg(struct mdp_vpu_dev *vpu, enum scp_ipi_id id,
|
||||||
void *buf, unsigned int len)
|
const void *buf, unsigned int len)
|
||||||
{
|
{
|
||||||
struct mdp_dev *mdp = vpu_to_mdp(vpu);
|
struct mdp_dev *mdp = vpu_to_mdp(vpu);
|
||||||
unsigned int t = MDP_VPU_MESSAGE_TIMEOUT;
|
unsigned int t = MDP_VPU_MESSAGE_TIMEOUT;
|
||||||
|
|||||||
@@ -1078,7 +1078,7 @@ static void scp_unregister_ipi(struct platform_device *pdev, u32 id)
|
|||||||
scp_ipi_unregister(scp, id);
|
scp_ipi_unregister(scp, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int scp_send_ipi(struct platform_device *pdev, u32 id, void *buf,
|
static int scp_send_ipi(struct platform_device *pdev, u32 id, const void *buf,
|
||||||
unsigned int len, unsigned int wait)
|
unsigned int len, unsigned int wait)
|
||||||
{
|
{
|
||||||
struct mtk_scp *scp = platform_get_drvdata(pdev);
|
struct mtk_scp *scp = platform_get_drvdata(pdev);
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ EXPORT_SYMBOL_GPL(scp_ipi_unlock);
|
|||||||
*
|
*
|
||||||
* Return: 0 if sending data successfully, -error on error.
|
* Return: 0 if sending data successfully, -error on error.
|
||||||
**/
|
**/
|
||||||
int scp_ipi_send(struct mtk_scp *scp, u32 id, void *buf, unsigned int len,
|
int scp_ipi_send(struct mtk_scp *scp, u32 id, const void *buf, unsigned int len,
|
||||||
unsigned int wait)
|
unsigned int wait)
|
||||||
{
|
{
|
||||||
struct mtk_share_obj __iomem *send_obj = scp->send_buf;
|
struct mtk_share_obj __iomem *send_obj = scp->send_buf;
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ static void mtk_rpmsg_destroy_ept(struct rpmsg_endpoint *ept)
|
|||||||
kref_put(&ept->refcount, __mtk_ept_release);
|
kref_put(&ept->refcount, __mtk_ept_release);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mtk_rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len)
|
static int mtk_rpmsg_send(struct rpmsg_endpoint *ept, const void *data, int len)
|
||||||
{
|
{
|
||||||
struct mtk_rpmsg_rproc_subdev *mtk_subdev =
|
struct mtk_rpmsg_rproc_subdev *mtk_subdev =
|
||||||
to_mtk_rpmsg_endpoint(ept)->mtk_subdev;
|
to_mtk_rpmsg_endpoint(ept)->mtk_subdev;
|
||||||
@@ -144,7 +144,7 @@ static int mtk_rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len)
|
|||||||
len, 0);
|
len, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mtk_rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len)
|
static int mtk_rpmsg_trysend(struct rpmsg_endpoint *ept, const void *data, int len)
|
||||||
{
|
{
|
||||||
struct mtk_rpmsg_rproc_subdev *mtk_subdev =
|
struct mtk_rpmsg_rproc_subdev *mtk_subdev =
|
||||||
to_mtk_rpmsg_endpoint(ept)->mtk_subdev;
|
to_mtk_rpmsg_endpoint(ept)->mtk_subdev;
|
||||||
|
|||||||
@@ -1474,7 +1474,7 @@ unlock:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int __qcom_glink_send(struct glink_channel *channel,
|
static int __qcom_glink_send(struct glink_channel *channel,
|
||||||
void *data, int len, bool wait)
|
const void *data, int len, bool wait)
|
||||||
{
|
{
|
||||||
struct qcom_glink *glink = channel->glink;
|
struct qcom_glink *glink = channel->glink;
|
||||||
struct glink_core_rx_intent *intent = NULL;
|
struct glink_core_rx_intent *intent = NULL;
|
||||||
@@ -1553,28 +1553,31 @@ static int __qcom_glink_send(struct glink_channel *channel,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qcom_glink_send(struct rpmsg_endpoint *ept, void *data, int len)
|
static int qcom_glink_send(struct rpmsg_endpoint *ept, const void *data, int len)
|
||||||
{
|
{
|
||||||
struct glink_channel *channel = to_glink_channel(ept);
|
struct glink_channel *channel = to_glink_channel(ept);
|
||||||
|
|
||||||
return __qcom_glink_send(channel, data, len, true);
|
return __qcom_glink_send(channel, data, len, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qcom_glink_trysend(struct rpmsg_endpoint *ept, void *data, int len)
|
static int qcom_glink_trysend(struct rpmsg_endpoint *ept, const void *data,
|
||||||
|
int len)
|
||||||
{
|
{
|
||||||
struct glink_channel *channel = to_glink_channel(ept);
|
struct glink_channel *channel = to_glink_channel(ept);
|
||||||
|
|
||||||
return __qcom_glink_send(channel, data, len, false);
|
return __qcom_glink_send(channel, data, len, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qcom_glink_sendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst)
|
static int qcom_glink_sendto(struct rpmsg_endpoint *ept, const void *data,
|
||||||
|
int len, u32 dst)
|
||||||
{
|
{
|
||||||
struct glink_channel *channel = to_glink_channel(ept);
|
struct glink_channel *channel = to_glink_channel(ept);
|
||||||
|
|
||||||
return __qcom_glink_send(channel, data, len, true);
|
return __qcom_glink_send(channel, data, len, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qcom_glink_trysendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst)
|
static int qcom_glink_trysendto(struct rpmsg_endpoint *ept, const void *data,
|
||||||
|
int len, u32 dst)
|
||||||
{
|
{
|
||||||
struct glink_channel *channel = to_glink_channel(ept);
|
struct glink_channel *channel = to_glink_channel(ept);
|
||||||
|
|
||||||
|
|||||||
@@ -960,28 +960,30 @@ static void qcom_smd_destroy_ept(struct rpmsg_endpoint *ept)
|
|||||||
kref_put(&ept->refcount, __ept_release);
|
kref_put(&ept->refcount, __ept_release);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qcom_smd_send(struct rpmsg_endpoint *ept, void *data, int len)
|
static int qcom_smd_send(struct rpmsg_endpoint *ept, const void *data, int len)
|
||||||
{
|
{
|
||||||
struct qcom_smd_endpoint *qsept = to_smd_endpoint(ept);
|
struct qcom_smd_endpoint *qsept = to_smd_endpoint(ept);
|
||||||
|
|
||||||
return __qcom_smd_send(qsept->qsch, data, len, true);
|
return __qcom_smd_send(qsept->qsch, data, len, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qcom_smd_trysend(struct rpmsg_endpoint *ept, void *data, int len)
|
static int qcom_smd_trysend(struct rpmsg_endpoint *ept, const void *data, int len)
|
||||||
{
|
{
|
||||||
struct qcom_smd_endpoint *qsept = to_smd_endpoint(ept);
|
struct qcom_smd_endpoint *qsept = to_smd_endpoint(ept);
|
||||||
|
|
||||||
return __qcom_smd_send(qsept->qsch, data, len, false);
|
return __qcom_smd_send(qsept->qsch, data, len, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qcom_smd_sendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst)
|
static int qcom_smd_sendto(struct rpmsg_endpoint *ept, const void *data, int len,
|
||||||
|
u32 dst)
|
||||||
{
|
{
|
||||||
struct qcom_smd_endpoint *qsept = to_smd_endpoint(ept);
|
struct qcom_smd_endpoint *qsept = to_smd_endpoint(ept);
|
||||||
|
|
||||||
return __qcom_smd_send(qsept->qsch, data, len, true);
|
return __qcom_smd_send(qsept->qsch, data, len, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qcom_smd_trysendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst)
|
static int qcom_smd_trysendto(struct rpmsg_endpoint *ept, const void *data,
|
||||||
|
int len, u32 dst)
|
||||||
{
|
{
|
||||||
struct qcom_smd_endpoint *qsept = to_smd_endpoint(ept);
|
struct qcom_smd_endpoint *qsept = to_smd_endpoint(ept);
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ EXPORT_SYMBOL(rpmsg_destroy_ept);
|
|||||||
*
|
*
|
||||||
* Return: 0 on success and an appropriate error value on failure.
|
* Return: 0 on success and an appropriate error value on failure.
|
||||||
*/
|
*/
|
||||||
int rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len)
|
int rpmsg_send(struct rpmsg_endpoint *ept, const void *data, int len)
|
||||||
{
|
{
|
||||||
if (WARN_ON(!ept))
|
if (WARN_ON(!ept))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -182,7 +182,7 @@ EXPORT_SYMBOL(rpmsg_send);
|
|||||||
*
|
*
|
||||||
* Return: 0 on success and an appropriate error value on failure.
|
* Return: 0 on success and an appropriate error value on failure.
|
||||||
*/
|
*/
|
||||||
int rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst)
|
int rpmsg_sendto(struct rpmsg_endpoint *ept, const void *data, int len, u32 dst)
|
||||||
{
|
{
|
||||||
if (WARN_ON(!ept))
|
if (WARN_ON(!ept))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -210,7 +210,7 @@ EXPORT_SYMBOL(rpmsg_sendto);
|
|||||||
*
|
*
|
||||||
* Return: 0 on success and an appropriate error value on failure.
|
* Return: 0 on success and an appropriate error value on failure.
|
||||||
*/
|
*/
|
||||||
int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len)
|
int rpmsg_trysend(struct rpmsg_endpoint *ept, const void *data, int len)
|
||||||
{
|
{
|
||||||
if (WARN_ON(!ept))
|
if (WARN_ON(!ept))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -238,7 +238,7 @@ EXPORT_SYMBOL(rpmsg_trysend);
|
|||||||
*
|
*
|
||||||
* Return: 0 on success and an appropriate error value on failure.
|
* Return: 0 on success and an appropriate error value on failure.
|
||||||
*/
|
*/
|
||||||
int rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst)
|
int rpmsg_trysendto(struct rpmsg_endpoint *ept, const void *data, int len, u32 dst)
|
||||||
{
|
{
|
||||||
if (WARN_ON(!ept))
|
if (WARN_ON(!ept))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -650,7 +650,7 @@ static int __init rpmsg_init(void)
|
|||||||
ret = bus_register(&rpmsg_bus);
|
ret = bus_register(&rpmsg_bus);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("failed to register rpmsg bus: %d\n", ret);
|
pr_err("failed to register rpmsg bus: %d\n", ret);
|
||||||
class_destroy(&rpmsg_class);
|
class_unregister(&rpmsg_class);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -659,7 +659,7 @@ postcore_initcall(rpmsg_init);
|
|||||||
static void __exit rpmsg_fini(void)
|
static void __exit rpmsg_fini(void)
|
||||||
{
|
{
|
||||||
bus_unregister(&rpmsg_bus);
|
bus_unregister(&rpmsg_bus);
|
||||||
class_destroy(&rpmsg_class);
|
class_unregister(&rpmsg_class);
|
||||||
}
|
}
|
||||||
module_exit(rpmsg_fini);
|
module_exit(rpmsg_fini);
|
||||||
|
|
||||||
|
|||||||
@@ -63,11 +63,11 @@ struct rpmsg_device_ops {
|
|||||||
struct rpmsg_endpoint_ops {
|
struct rpmsg_endpoint_ops {
|
||||||
void (*destroy_ept)(struct rpmsg_endpoint *ept);
|
void (*destroy_ept)(struct rpmsg_endpoint *ept);
|
||||||
|
|
||||||
int (*send)(struct rpmsg_endpoint *ept, void *data, int len);
|
int (*send)(struct rpmsg_endpoint *ept, const void *data, int len);
|
||||||
int (*sendto)(struct rpmsg_endpoint *ept, void *data, int len, u32 dst);
|
int (*sendto)(struct rpmsg_endpoint *ept, const void *data, int len, u32 dst);
|
||||||
|
|
||||||
int (*trysend)(struct rpmsg_endpoint *ept, void *data, int len);
|
int (*trysend)(struct rpmsg_endpoint *ept, const void *data, int len);
|
||||||
int (*trysendto)(struct rpmsg_endpoint *ept, void *data, int len, u32 dst);
|
int (*trysendto)(struct rpmsg_endpoint *ept, const void *data, int len, u32 dst);
|
||||||
__poll_t (*poll)(struct rpmsg_endpoint *ept, struct file *filp,
|
__poll_t (*poll)(struct rpmsg_endpoint *ept, struct file *filp,
|
||||||
poll_table *wait);
|
poll_table *wait);
|
||||||
int (*set_flow_control)(struct rpmsg_endpoint *ept, bool pause, u32 dst);
|
int (*set_flow_control)(struct rpmsg_endpoint *ept, bool pause, u32 dst);
|
||||||
|
|||||||
@@ -136,11 +136,12 @@ struct virtio_rpmsg_channel {
|
|||||||
#define RPMSG_RESERVED_ADDRESSES (1024)
|
#define RPMSG_RESERVED_ADDRESSES (1024)
|
||||||
|
|
||||||
static void virtio_rpmsg_destroy_ept(struct rpmsg_endpoint *ept);
|
static void virtio_rpmsg_destroy_ept(struct rpmsg_endpoint *ept);
|
||||||
static int virtio_rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len);
|
static int virtio_rpmsg_send(struct rpmsg_endpoint *ept, const void *data, int len);
|
||||||
static int virtio_rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len,
|
static int virtio_rpmsg_sendto(struct rpmsg_endpoint *ept, const void *data,
|
||||||
u32 dst);
|
int len, u32 dst);
|
||||||
static int virtio_rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len);
|
static int virtio_rpmsg_trysend(struct rpmsg_endpoint *ept, const void *data,
|
||||||
static int virtio_rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data,
|
int len);
|
||||||
|
static int virtio_rpmsg_trysendto(struct rpmsg_endpoint *ept, const void *data,
|
||||||
int len, u32 dst);
|
int len, u32 dst);
|
||||||
static __poll_t virtio_rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp,
|
static __poll_t virtio_rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp,
|
||||||
poll_table *wait);
|
poll_table *wait);
|
||||||
@@ -490,7 +491,7 @@ static void *get_a_tx_buf(struct virtproc_info *vrp)
|
|||||||
*/
|
*/
|
||||||
static int rpmsg_send_offchannel_raw(struct rpmsg_device *rpdev,
|
static int rpmsg_send_offchannel_raw(struct rpmsg_device *rpdev,
|
||||||
u32 src, u32 dst,
|
u32 src, u32 dst,
|
||||||
void *data, int len, bool wait)
|
const void *data, int len, bool wait)
|
||||||
{
|
{
|
||||||
struct virtio_rpmsg_channel *vch = to_virtio_rpmsg_channel(rpdev);
|
struct virtio_rpmsg_channel *vch = to_virtio_rpmsg_channel(rpdev);
|
||||||
struct virtproc_info *vrp = vch->vrp;
|
struct virtproc_info *vrp = vch->vrp;
|
||||||
@@ -580,7 +581,7 @@ out:
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int virtio_rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len)
|
static int virtio_rpmsg_send(struct rpmsg_endpoint *ept, const void *data, int len)
|
||||||
{
|
{
|
||||||
struct rpmsg_device *rpdev = ept->rpdev;
|
struct rpmsg_device *rpdev = ept->rpdev;
|
||||||
u32 src = ept->addr, dst = rpdev->dst;
|
u32 src = ept->addr, dst = rpdev->dst;
|
||||||
@@ -588,8 +589,8 @@ static int virtio_rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len)
|
|||||||
return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, true);
|
return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int virtio_rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len,
|
static int virtio_rpmsg_sendto(struct rpmsg_endpoint *ept, const void *data,
|
||||||
u32 dst)
|
int len, u32 dst)
|
||||||
{
|
{
|
||||||
struct rpmsg_device *rpdev = ept->rpdev;
|
struct rpmsg_device *rpdev = ept->rpdev;
|
||||||
u32 src = ept->addr;
|
u32 src = ept->addr;
|
||||||
@@ -597,7 +598,8 @@ static int virtio_rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len,
|
|||||||
return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, true);
|
return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int virtio_rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len)
|
static int virtio_rpmsg_trysend(struct rpmsg_endpoint *ept, const void *data,
|
||||||
|
int len)
|
||||||
{
|
{
|
||||||
struct rpmsg_device *rpdev = ept->rpdev;
|
struct rpmsg_device *rpdev = ept->rpdev;
|
||||||
u32 src = ept->addr, dst = rpdev->dst;
|
u32 src = ept->addr, dst = rpdev->dst;
|
||||||
@@ -605,7 +607,7 @@ static int virtio_rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len)
|
|||||||
return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, false);
|
return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int virtio_rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data,
|
static int virtio_rpmsg_trysendto(struct rpmsg_endpoint *ept, const void *data,
|
||||||
int len, u32 dst)
|
int len, u32 dst)
|
||||||
{
|
{
|
||||||
struct rpmsg_device *rpdev = ept->rpdev;
|
struct rpmsg_device *rpdev = ept->rpdev;
|
||||||
|
|||||||
@@ -123,10 +123,10 @@ gpr_port_t *gpr_alloc_port(struct apr_device *gdev, struct device *dev,
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(gpr_alloc_port);
|
EXPORT_SYMBOL_GPL(gpr_alloc_port);
|
||||||
|
|
||||||
static int pkt_router_send_svc_pkt(struct pkt_router_svc *svc, struct gpr_pkt *pkt)
|
static int pkt_router_send_svc_pkt(struct pkt_router_svc *svc, const struct gpr_pkt *pkt)
|
||||||
{
|
{
|
||||||
struct packet_router *pr = svc->pr;
|
struct packet_router *pr = svc->pr;
|
||||||
struct gpr_hdr *hdr;
|
const struct gpr_hdr *hdr;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@@ -139,13 +139,13 @@ static int pkt_router_send_svc_pkt(struct pkt_router_svc *svc, struct gpr_pkt *p
|
|||||||
return ret ? ret : hdr->pkt_size;
|
return ret ? ret : hdr->pkt_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
int gpr_send_pkt(struct apr_device *gdev, struct gpr_pkt *pkt)
|
int gpr_send_pkt(struct apr_device *gdev, const struct gpr_pkt *pkt)
|
||||||
{
|
{
|
||||||
return pkt_router_send_svc_pkt(&gdev->svc, pkt);
|
return pkt_router_send_svc_pkt(&gdev->svc, pkt);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(gpr_send_pkt);
|
EXPORT_SYMBOL_GPL(gpr_send_pkt);
|
||||||
|
|
||||||
int gpr_send_port_pkt(gpr_port_t *port, struct gpr_pkt *pkt)
|
int gpr_send_port_pkt(gpr_port_t *port, const struct gpr_pkt *pkt)
|
||||||
{
|
{
|
||||||
return pkt_router_send_svc_pkt(port, pkt);
|
return pkt_router_send_svc_pkt(port, pkt);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ int scp_ipi_register(struct mtk_scp *scp, u32 id, scp_ipi_handler_t handler,
|
|||||||
void *priv);
|
void *priv);
|
||||||
void scp_ipi_unregister(struct mtk_scp *scp, u32 id);
|
void scp_ipi_unregister(struct mtk_scp *scp, u32 id);
|
||||||
|
|
||||||
int scp_ipi_send(struct mtk_scp *scp, u32 id, void *buf, unsigned int len,
|
int scp_ipi_send(struct mtk_scp *scp, u32 id, const void *buf, unsigned int len,
|
||||||
unsigned int wait);
|
unsigned int wait);
|
||||||
|
|
||||||
unsigned int scp_get_vdec_hw_capa(struct mtk_scp *scp);
|
unsigned int scp_get_vdec_hw_capa(struct mtk_scp *scp);
|
||||||
|
|||||||
@@ -182,11 +182,11 @@ struct rpmsg_endpoint *rpmsg_create_ept(struct rpmsg_device *,
|
|||||||
rpmsg_rx_cb_t cb, void *priv,
|
rpmsg_rx_cb_t cb, void *priv,
|
||||||
struct rpmsg_channel_info chinfo);
|
struct rpmsg_channel_info chinfo);
|
||||||
|
|
||||||
int rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len);
|
int rpmsg_send(struct rpmsg_endpoint *ept, const void *data, int len);
|
||||||
int rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst);
|
int rpmsg_sendto(struct rpmsg_endpoint *ept, const void *data, int len, u32 dst);
|
||||||
|
|
||||||
int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len);
|
int rpmsg_trysend(struct rpmsg_endpoint *ept, const void *data, int len);
|
||||||
int rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst);
|
int rpmsg_trysendto(struct rpmsg_endpoint *ept, const void *data, int len, u32 dst);
|
||||||
|
|
||||||
__poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp,
|
__poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp,
|
||||||
poll_table *wait);
|
poll_table *wait);
|
||||||
@@ -249,7 +249,7 @@ static inline struct rpmsg_endpoint *rpmsg_create_ept(struct rpmsg_device *rpdev
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len)
|
static inline int rpmsg_send(struct rpmsg_endpoint *ept, const void *data, int len)
|
||||||
{
|
{
|
||||||
/* This shouldn't be possible */
|
/* This shouldn't be possible */
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
@@ -257,7 +257,7 @@ static inline int rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len)
|
|||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len,
|
static inline int rpmsg_sendto(struct rpmsg_endpoint *ept, const void *data, int len,
|
||||||
u32 dst)
|
u32 dst)
|
||||||
{
|
{
|
||||||
/* This shouldn't be possible */
|
/* This shouldn't be possible */
|
||||||
@@ -267,7 +267,8 @@ static inline int rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len)
|
static inline int rpmsg_trysend(struct rpmsg_endpoint *ept, const void *data,
|
||||||
|
int len)
|
||||||
{
|
{
|
||||||
/* This shouldn't be possible */
|
/* This shouldn't be possible */
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
@@ -275,7 +276,7 @@ static inline int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len)
|
|||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data,
|
static inline int rpmsg_trysendto(struct rpmsg_endpoint *ept, const void *data,
|
||||||
int len, u32 dst)
|
int len, u32 dst)
|
||||||
{
|
{
|
||||||
/* This shouldn't be possible */
|
/* This shouldn't be possible */
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ struct mtk_rpmsg_info {
|
|||||||
ipi_handler_t handler, void *priv);
|
ipi_handler_t handler, void *priv);
|
||||||
void (*unregister_ipi)(struct platform_device *pdev, u32 id);
|
void (*unregister_ipi)(struct platform_device *pdev, u32 id);
|
||||||
int (*send_ipi)(struct platform_device *pdev, u32 id,
|
int (*send_ipi)(struct platform_device *pdev, u32 id,
|
||||||
void *buf, unsigned int len, unsigned int wait);
|
const void *buf, unsigned int len, unsigned int wait);
|
||||||
int ns_ipi_id;
|
int ns_ipi_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ int apr_send_pkt(struct apr_device *adev, struct apr_pkt *pkt);
|
|||||||
gpr_port_t *gpr_alloc_port(gpr_device_t *gdev, struct device *dev,
|
gpr_port_t *gpr_alloc_port(gpr_device_t *gdev, struct device *dev,
|
||||||
gpr_port_cb cb, void *priv);
|
gpr_port_cb cb, void *priv);
|
||||||
void gpr_free_port(gpr_port_t *port);
|
void gpr_free_port(gpr_port_t *port);
|
||||||
int gpr_send_port_pkt(gpr_port_t *port, struct gpr_pkt *pkt);
|
int gpr_send_port_pkt(gpr_port_t *port, const struct gpr_pkt *pkt);
|
||||||
int gpr_send_pkt(gpr_device_t *gdev, struct gpr_pkt *pkt);
|
int gpr_send_pkt(gpr_device_t *gdev, const struct gpr_pkt *pkt);
|
||||||
|
|
||||||
#endif /* __QCOM_APR_H_ */
|
#endif /* __QCOM_APR_H_ */
|
||||||
|
|||||||
@@ -579,10 +579,10 @@ EXPORT_SYMBOL_GPL(audioreach_alloc_graph_pkt);
|
|||||||
int audioreach_send_cmd_sync(struct device *dev, gpr_device_t *gdev,
|
int audioreach_send_cmd_sync(struct device *dev, gpr_device_t *gdev,
|
||||||
struct gpr_ibasic_rsp_result_t *result, struct mutex *cmd_lock,
|
struct gpr_ibasic_rsp_result_t *result, struct mutex *cmd_lock,
|
||||||
gpr_port_t *port, wait_queue_head_t *cmd_wait,
|
gpr_port_t *port, wait_queue_head_t *cmd_wait,
|
||||||
struct gpr_pkt *pkt, uint32_t rsp_opcode)
|
const struct gpr_pkt *pkt, uint32_t rsp_opcode)
|
||||||
{
|
{
|
||||||
|
|
||||||
struct gpr_hdr *hdr = &pkt->hdr;
|
const struct gpr_hdr *hdr = &pkt->hdr;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
mutex_lock(cmd_lock);
|
mutex_lock(cmd_lock);
|
||||||
@@ -622,7 +622,7 @@ err:
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(audioreach_send_cmd_sync);
|
EXPORT_SYMBOL_GPL(audioreach_send_cmd_sync);
|
||||||
|
|
||||||
int audioreach_graph_send_cmd_sync(struct q6apm_graph *graph, struct gpr_pkt *pkt,
|
int audioreach_graph_send_cmd_sync(struct q6apm_graph *graph, const struct gpr_pkt *pkt,
|
||||||
uint32_t rsp_opcode)
|
uint32_t rsp_opcode)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -841,8 +841,8 @@ int audioreach_tplg_init(struct snd_soc_component *component);
|
|||||||
void audioreach_graph_free_buf(struct q6apm_graph *graph);
|
void audioreach_graph_free_buf(struct q6apm_graph *graph);
|
||||||
int audioreach_send_cmd_sync(struct device *dev, gpr_device_t *gdev, struct gpr_ibasic_rsp_result_t *result,
|
int audioreach_send_cmd_sync(struct device *dev, gpr_device_t *gdev, struct gpr_ibasic_rsp_result_t *result,
|
||||||
struct mutex *cmd_lock, gpr_port_t *port, wait_queue_head_t *cmd_wait,
|
struct mutex *cmd_lock, gpr_port_t *port, wait_queue_head_t *cmd_wait,
|
||||||
struct gpr_pkt *pkt, uint32_t rsp_opcode);
|
const struct gpr_pkt *pkt, uint32_t rsp_opcode);
|
||||||
int audioreach_graph_send_cmd_sync(struct q6apm_graph *graph, struct gpr_pkt *pkt,
|
int audioreach_graph_send_cmd_sync(struct q6apm_graph *graph, const struct gpr_pkt *pkt,
|
||||||
uint32_t rsp_opcode);
|
uint32_t rsp_opcode);
|
||||||
int audioreach_set_media_format(struct q6apm_graph *graph,
|
int audioreach_set_media_format(struct q6apm_graph *graph,
|
||||||
const struct audioreach_module *module,
|
const struct audioreach_module *module,
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ struct apm_graph_mgmt_cmd {
|
|||||||
|
|
||||||
static struct q6apm *g_apm;
|
static struct q6apm *g_apm;
|
||||||
|
|
||||||
int q6apm_send_cmd_sync(struct q6apm *apm, struct gpr_pkt *pkt, uint32_t rsp_opcode)
|
int q6apm_send_cmd_sync(struct q6apm *apm, const struct gpr_pkt *pkt,
|
||||||
|
uint32_t rsp_opcode)
|
||||||
{
|
{
|
||||||
gpr_device_t *gdev = apm->gdev;
|
gpr_device_t *gdev = apm->gdev;
|
||||||
|
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ int q6apm_alloc_fragments(struct q6apm_graph *graph,
|
|||||||
int q6apm_free_fragments(struct q6apm_graph *graph, unsigned int dir);
|
int q6apm_free_fragments(struct q6apm_graph *graph, unsigned int dir);
|
||||||
int q6apm_unmap_memory_fixed_region(struct device *dev, unsigned int graph_id);
|
int q6apm_unmap_memory_fixed_region(struct device *dev, unsigned int graph_id);
|
||||||
/* Helpers */
|
/* Helpers */
|
||||||
int q6apm_send_cmd_sync(struct q6apm *apm, struct gpr_pkt *pkt,
|
int q6apm_send_cmd_sync(struct q6apm *apm, const struct gpr_pkt *pkt,
|
||||||
uint32_t rsp_opcode);
|
uint32_t rsp_opcode);
|
||||||
|
|
||||||
/* Callback for graph specific */
|
/* Callback for graph specific */
|
||||||
|
|||||||
Reference in New Issue
Block a user