rpmsg updates for v6.8
This make virtio free driver_override upon removal. It also updates the rpmsg documentation after earlier API updates. -----BEGIN PGP SIGNATURE----- iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmWkpMwVHGFuZGVyc3Nv bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3F7UEQAKgcJv5lrpnhWhRTlZUx+vmVhrNe nLxndp2NJz5b2+JOrvlaZfwpIMBSNOQ+e1eUbbm+WUzl/tfOBxTpaOWhKXKt1Wpc bxfRkWebCs0MCIIrXrMBkbtMZtv/IS+wNlKjwdvkkiPssCjxCStBsl+61fhxvx4F vtWp6TrhQjwKnIhmHhtblRaT4pPkvV9Y3uouZvZqvHsm+CnxY2m0qk8oHNXO5Ive hiK8P0SukvcBP8UfhpwvlORoFQss1NxIXYJW+bz0+3mQCCzUfrh1NpL4JDAX1gV6 5MdcXM6rneNHCFPoHnBDqtkN8246J+UTHVxAXJ69OU7SIRRRcNh9q9SZquda5exd wgR7fsruxCjUAX3P3J2zjDf1RStJdcuKW9Mwwynqb8UzbnRS4+XmfIloHDeyE7HD RefJUG7gFEriCPpLLueAEsS8INAGpbDVRjMc+zXJXoXNharpQrfgOMd/apnQdKlP +8pkD1JOOSohAuBroQcv8JEaLGvN4GJMUEGMo0WOovujZdnh8WaBCKEgVHfZUEg+ F4E7dSvp9SkFMLjjMYMa5vLUyrNriPWTOytFpKjtR5fJlAoa4MgQGYxcb+anoQ4/ g1DEnLF4HyOOQax6DKV7OTiuk6c+U5Kd2UNUi46OxXhR8UlnAGgg+/N1XKNIAKUt Q96cQQpj9yrQX/6Z =aycZ -----END PGP SIGNATURE----- Merge tag 'rpmsg-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull rpmsg updates from Bjorn Andersson: "This make virtio free driver_override upon removal. It also updates the rpmsg documentation after earlier API updates" * tag 'rpmsg-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: rpmsg: virtio: Free driver_override when rpmsg_remove() doc: rmpsg: Update with rpmsg_endpoint
This commit is contained in:
commit
2a43434675
|
@ -68,13 +68,14 @@ User API
|
|||
|
||||
::
|
||||
|
||||
int rpmsg_send(struct rpmsg_channel *rpdev, void *data, int len);
|
||||
int rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len);
|
||||
|
||||
sends a message across to the remote processor on a given channel.
|
||||
The caller should specify the channel, the data it wants to send,
|
||||
sends a message across to the remote processor from the given endpoint.
|
||||
The caller should specify the endpoint, the data it wants to send,
|
||||
and its length (in bytes). The message will be sent on the specified
|
||||
channel, i.e. its source and destination address fields will be
|
||||
set to the channel's src and dst addresses.
|
||||
endpoint's channel, i.e. its source and destination address fields will be
|
||||
respectively set to the endpoint's src address and its parent channel
|
||||
dst addresses.
|
||||
|
||||
In case there are no TX buffers available, the function will block until
|
||||
one becomes available (i.e. until the remote processor consumes
|
||||
|
@ -87,17 +88,18 @@ Returns 0 on success and an appropriate error value on failure.
|
|||
|
||||
::
|
||||
|
||||
int rpmsg_sendto(struct rpmsg_channel *rpdev, void *data, int len, u32 dst);
|
||||
int rpmsg_sendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst);
|
||||
|
||||
sends a message across to the remote processor on a given channel,
|
||||
sends a message across to the remote processor from a given endpoint,
|
||||
to a destination address provided by the caller.
|
||||
|
||||
The caller should specify the channel, the data it wants to send,
|
||||
The caller should specify the endpoint, the data it wants to send,
|
||||
its length (in bytes), and an explicit destination address.
|
||||
|
||||
The message will then be sent to the remote processor to which the
|
||||
channel belongs, using the channel's src address, and the user-provided
|
||||
dst address (thus the channel's dst address will be ignored).
|
||||
endpoints's channel belongs, using the endpoints's src address,
|
||||
and the user-provided dst address (thus the channel's dst address
|
||||
will be ignored).
|
||||
|
||||
In case there are no TX buffers available, the function will block until
|
||||
one becomes available (i.e. until the remote processor consumes
|
||||
|
@ -110,18 +112,19 @@ Returns 0 on success and an appropriate error value on failure.
|
|||
|
||||
::
|
||||
|
||||
int rpmsg_send_offchannel(struct rpmsg_channel *rpdev, u32 src, u32 dst,
|
||||
int rpmsg_send_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst,
|
||||
void *data, int len);
|
||||
|
||||
|
||||
sends a message across to the remote processor, using the src and dst
|
||||
addresses provided by the user.
|
||||
|
||||
The caller should specify the channel, the data it wants to send,
|
||||
The caller should specify the endpoint, the data it wants to send,
|
||||
its length (in bytes), and explicit source and destination addresses.
|
||||
The message will then be sent to the remote processor to which the
|
||||
channel belongs, but the channel's src and dst addresses will be
|
||||
ignored (and the user-provided addresses will be used instead).
|
||||
endpoint's channel belongs, but the endpoint's src and channel dst
|
||||
addresses will be ignored (and the user-provided addresses will
|
||||
be used instead).
|
||||
|
||||
In case there are no TX buffers available, the function will block until
|
||||
one becomes available (i.e. until the remote processor consumes
|
||||
|
@ -134,13 +137,14 @@ Returns 0 on success and an appropriate error value on failure.
|
|||
|
||||
::
|
||||
|
||||
int rpmsg_trysend(struct rpmsg_channel *rpdev, void *data, int len);
|
||||
int rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len);
|
||||
|
||||
sends a message across to the remote processor on a given channel.
|
||||
The caller should specify the channel, the data it wants to send,
|
||||
sends a message across to the remote processor from a given endpoint.
|
||||
The caller should specify the endpoint, the data it wants to send,
|
||||
and its length (in bytes). The message will be sent on the specified
|
||||
channel, i.e. its source and destination address fields will be
|
||||
set to the channel's src and dst addresses.
|
||||
endpoint's channel, i.e. its source and destination address fields will be
|
||||
respectively set to the endpoint's src address and its parent channel
|
||||
dst addresses.
|
||||
|
||||
In case there are no TX buffers available, the function will immediately
|
||||
return -ENOMEM without waiting until one becomes available.
|
||||
|
@ -150,10 +154,10 @@ Returns 0 on success and an appropriate error value on failure.
|
|||
|
||||
::
|
||||
|
||||
int rpmsg_trysendto(struct rpmsg_channel *rpdev, void *data, int len, u32 dst)
|
||||
int rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst)
|
||||
|
||||
|
||||
sends a message across to the remote processor on a given channel,
|
||||
sends a message across to the remote processor from a given endoint,
|
||||
to a destination address provided by the user.
|
||||
|
||||
The user should specify the channel, the data it wants to send,
|
||||
|
@ -171,7 +175,7 @@ Returns 0 on success and an appropriate error value on failure.
|
|||
|
||||
::
|
||||
|
||||
int rpmsg_trysend_offchannel(struct rpmsg_channel *rpdev, u32 src, u32 dst,
|
||||
int rpmsg_trysend_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst,
|
||||
void *data, int len);
|
||||
|
||||
|
||||
|
@ -284,7 +288,7 @@ content to the console.
|
|||
dev_info(&rpdev->dev, "chnl: 0x%x -> 0x%x\n", rpdev->src, rpdev->dst);
|
||||
|
||||
/* send a message on our channel */
|
||||
err = rpmsg_send(rpdev, "hello!", 6);
|
||||
err = rpmsg_send(rpdev->ept, "hello!", 6);
|
||||
if (err) {
|
||||
pr_err("rpmsg_send failed: %d\n", err);
|
||||
return err;
|
||||
|
|
|
@ -378,6 +378,7 @@ static void virtio_rpmsg_release_device(struct device *dev)
|
|||
struct rpmsg_device *rpdev = to_rpmsg_device(dev);
|
||||
struct virtio_rpmsg_channel *vch = to_virtio_rpmsg_channel(rpdev);
|
||||
|
||||
kfree(rpdev->driver_override);
|
||||
kfree(vch);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue