RE: [PATCH v1 3/6] include: virtio_rpmsg: add virtio rpmsg configuration structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Wendy Liang [mailto:sunnyliangjy@xxxxxxxxx]
> Sent: Thursday, December 08, 2016 11:00 PM
> To: Loic PALLARDY <loic.pallardy@xxxxxx>
> Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>; Ohad Ben-Cohen
> <ohad@xxxxxxxxxx>; lee.jones@xxxxxxxxxx; Patrice CHOTARD
> <patrice.chotard@xxxxxx>; linux-remoteproc@xxxxxxxxxxxxxxx;
> kernel@xxxxxxxxxxx
> Subject: Re: [PATCH v1 3/6] include: virtio_rpmsg: add virtio rpmsg
> configuration structure
> 
> HI Loic,
> 
Hi Wendy,

> As this introduce a new virtio config. How about to add a new header file for
> virtio_rpmsg in the include/uapi/linux directory just like other virtio device
> driver, such as virtio_blk?

I put this new file in include/linux/rpmsg directory for two reasons (from my pov):
- because there is no API/struct shared with user space (only a struct shared between drivers)
- because virtio_rpmsg.c driver is in drivers/rpmsg directory and not in virtio tree. Goal was to be coherent with c file.

Bjorn, what's your view on this point?

Regards,
Loic
> 
> Thanks,
> Wendy
> 
> On Wed, Dec 7, 2016 at 12:35 PM, Loic Pallardy <loic.pallardy@xxxxxx> wrote:
> > Rpmsg channel configuration should be identical on host and
> > coprocessor side.
> > This patch proposes a new structure named struct virtio_rpmsg_cfg to
> > gather all configuration information to characterize the communication
> > link and.
> > This structure will be exchanged with coprocessor via the resource
> > table, expanding struct fw_rsc_vdev. It will guarantee that host and
> > coprocessor will share the same information.
> > virtio_rpmsg will access it thanks to virtio get and set features.
> > Presence of struct virtio_rpmsg_cfg is optional.
> >
> > Signed-off-by: Loic Pallardy <loic.pallardy@xxxxxx>
> > ---
> >  include/linux/rpmsg/virtio_rpmsg.h | 32
> > ++++++++++++++++++++++++++++++++
> >  1 file changed, 32 insertions(+)
> >  create mode 100644 include/linux/rpmsg/virtio_rpmsg.h
> >
> > diff --git a/include/linux/rpmsg/virtio_rpmsg.h
> > b/include/linux/rpmsg/virtio_rpmsg.h
> > new file mode 100644
> > index 0000000..5f3f0d0
> > --- /dev/null
> > +++ b/include/linux/rpmsg/virtio_rpmsg.h
> > @@ -0,0 +1,32 @@
> > +
> > +#ifndef _LINUX_VIRTIO_RPMSG_H
> > +#define _LINUX_VIRTIO_RPMSG_H
> > +
> > +/* Offset in struct fw_rsc_vdev */
> > +#define RPMSG_CONFIG_OFFSET    0
> > +
> > +/**
> > + * struct virtio_rpmsg_cfg - optional configuration field for virtio
> > +rpmsg
> > + * provided at probe time by virtio (get/set)
> > + * @id: virtio cfg id (as in virtio_ids.h)
> > + * @version: virtio_rpmsg_cfg structure version number
> > + * @va: virtual address (used when buffer allocated by low level
> > +driver)
> > + * @da: device address
> > + * @pa: physical address
> > + * @len: length (in bytes)
> > + * @buf_size: size of rpmsg buffer size (defined by firmware else default
> value
> > + *           used)
> > + * @reserved: reserved (must be zero)  */ struct virtio_rpmsg_cfg {
> > +       u32 id;
> > +       u32 version;
> > +       u64 va;
> > +       u32 da;
> > +       u32 pa;
> > +       u32 len;
> > +       u32 buf_size;
> > +       u32 reserved;
> > +} __packed;
> > +
> > +#endif
> > --
> > 1.9.1
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe
> > linux-remoteproc" in the body of a message to
> > majordomo@xxxxxxxxxxxxxxx More majordomo info at
> > http://vger.kernel.org/majordomo-info.html
��.n��������+%������w��{.n�����{�����ש����{ay�ʇڙ���f���h������_�(�階�ݢj"��������G����?���&��




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux