Re: [PATCH v8 05/18] dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support

2016-08-30 Thread Vinod Koul
On Fri, Aug 26, 2016 at 03:56:40PM +0100, Peter Griffin wrote:

>  config STM32_DMA
>   bool "STMicroelectronics STM32 DMA support"
>   depends on ARCH_STM32
> @@ -567,7 +580,6 @@ config ZX_DMA
>   help
> Support the DMA engine for ZTE ZX296702 platform devices.
>  
> -

unrelated change?

> + fdev->chans = devm_kzalloc(>dev,
> +fdev->nr_channels
> +* sizeof(struct st_fdma_chan), GFP_KERNEL);

devm_kcalloc()

> + if (!fdev->chans)
> + return -ENOMEM;
> +
> + fdev->dev = >dev;
> + fdev->drvdata = drvdata;
> + platform_set_drvdata(pdev, fdev);
> +
> + fdev->irq = platform_get_irq(pdev, 0);
> + if (fdev->irq < 0) {
> + dev_err(>dev, "Failed to get irq resource\n");
> + return -EINVAL;
> + }
> +
> + ret = devm_request_irq(>dev, fdev->irq, st_fdma_irq_handler, 0,
> +dev_name(>dev), fdev);
> + if (ret) {
> + dev_err(>dev, "Failed to request irq (%d)\n", ret);
> + goto err;
> + }
> +
> + fdev->slim_rproc = st_slim_rproc_alloc(pdev, fdev->fw_name);
> + if (!fdev->slim_rproc) {
> + ret = PTR_ERR(fdev->slim_rproc);
> + dev_err(>dev, "slim_rproc_alloc failed (%d)\n", ret);
> + goto err;
> + }
> +
> + /* Initialise list of FDMA channels */
> + INIT_LIST_HEAD(>dma_device.channels);
> + for (i = 0; i < fdev->nr_channels; i++) {
> + struct st_fdma_chan *fchan = >chans[i];
> +
> + fchan->fdev = fdev;
> + fchan->vchan.desc_free = st_fdma_free_desc;
> + vchan_init(>vchan, >dma_device);

this initialized a tasklet

> +static int st_fdma_remove(struct platform_device *pdev)
> +{
> + struct st_fdma_dev *fdev = platform_get_drvdata(pdev);
> +
> + devm_free_irq(>dev, fdev->irq, fdev);
> + st_slim_rproc_put(fdev->slim_rproc);
> + of_dma_controller_free(pdev->dev.of_node);
> + dma_async_device_unregister(>dma_device);

and that vchan tasklet is not quisced here :(

> +MODULE_LICENSE("GPL v2");
> +MODULE_DESCRIPTION("STMicroelectronics FDMA engine driver");
> +MODULE_AUTHOR("Ludovic.barre ");
> +MODULE_AUTHOR("Peter Griffin ");

No MODULE_ALIAS?

-- 
~Vinod
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PATCH v8 01/18] remoteproc: st_slim_rproc: add a slimcore rproc driver

2016-08-30 Thread Bjorn Andersson
On Tue 30 Aug 05:34 PDT 2016, Lee Jones wrote:

Thanks for your review Lee.

> On Fri, 26 Aug 2016, Peter Griffin wrote:
[..]
> > diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig
> > index 1a8bf76a..06765e0 100644
> > --- a/drivers/remoteproc/Kconfig
> > +++ b/drivers/remoteproc/Kconfig
> > @@ -100,4 +100,12 @@ config ST_REMOTEPROC
> >   processor framework.
> >   This can be either built-in or a loadable module.
> >  
> > +config ST_SLIM_REMOTEPROC
> > +   tristate "ST Slim remoteproc support"
> > +   select REMOTEPROC
> > +   help
> > + Say y here to support firmware loading on IP based around
> > + the Slim core.
> > + If unsure say N.

Saw one more thing when browsing through...

As this piece of code doesn't do anything on its own and is going to be
selected by the "function driver" I don't think this should be
user-selectable.

Regards,
Bjorn
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PATCH v8 01/18] remoteproc: st_slim_rproc: add a slimcore rproc driver

2016-08-30 Thread Peter Griffin
Hi Lee,

Thanks for reviewing.

On Tue, 30 Aug 2016, Lee Jones wrote:

> On Fri, 26 Aug 2016, Peter Griffin wrote:
> 
> > slim core is used as a basis for many IPs in the STi
> > chipsets such as fdma and demux. To avoid duplicating
> > the elf loading code in each device driver a slim
> > rproc driver has been created.
> > 
> > This driver is designed to be used by other device drivers
> > such as fdma, or demux whose IP is based around a slim core.
> > The device driver can call slim_rproc_alloc() to allocate
> > a slim rproc and slim_rproc_put() when finished.
> > 
> > This driver takes care of ioremapping the slim
> > registers (dmem, imem, slimcore, peripherals), whose offsets
> > and sizes can change between IP's. It also obtains and enables
> > any clocks used by the device. This approach avoids having
> > a double mapping of the registers as slim_rproc does not register
> > its own platform device. It also maps well to device tree
> > abstraction as it allows us to have one dt node for the whole
> > device.
> > 
> > All of the generic rproc elf loading code can be reused, and
> > we provide start() stop() hooks to start and stop the slim
> > core once the firmware has been loaded. This has been tested
> > successfully with fdma driver.
> 
> Nit.  It would be good to use a constant line-wrap.
> 
> 'M-x post-mode' will help with this.

Can you provide the magic which makes this happen for GIT commit messages?

> 
> > Signed-off-by: Peter Griffin 
> > ---
> >  drivers/remoteproc/Kconfig   |   8 +
> >  drivers/remoteproc/Makefile  |   1 +
> >  drivers/remoteproc/st_slim_rproc.c   | 364 
> > +++
> >  include/linux/remoteproc/st_slim_rproc.h |  53 +
> >  4 files changed, 426 insertions(+)
> >  create mode 100644 drivers/remoteproc/st_slim_rproc.c
> >  create mode 100644 include/linux/remoteproc/st_slim_rproc.h
> > 
> > diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig
> > index 1a8bf76a..06765e0 100644
> > --- a/drivers/remoteproc/Kconfig
> > +++ b/drivers/remoteproc/Kconfig
> > @@ -100,4 +100,12 @@ config ST_REMOTEPROC
> >   processor framework.
> >   This can be either built-in or a loadable module.
> >  
> > +config ST_SLIM_REMOTEPROC
> > +   tristate "ST Slim remoteproc support"
> > +   select REMOTEPROC
> > +   help
> > + Say y here to support firmware loading on IP based around
> > + the Slim core.
> > + If unsure say N.
> > +
> >  endmenu
> > diff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile
> > index 92d3758..db1dae7 100644
> > --- a/drivers/remoteproc/Makefile
> > +++ b/drivers/remoteproc/Makefile
> > @@ -14,3 +14,4 @@ obj-$(CONFIG_DA8XX_REMOTEPROC)+= 
> > da8xx_remoteproc.o
> >  obj-$(CONFIG_QCOM_MDT_LOADER)  += qcom_mdt_loader.o
> >  obj-$(CONFIG_QCOM_Q6V5_PIL)+= qcom_q6v5_pil.o
> >  obj-$(CONFIG_ST_REMOTEPROC)+= st_remoteproc.o
> > +obj-$(CONFIG_ST_SLIM_REMOTEPROC)   += st_slim_rproc.o
> > diff --git a/drivers/remoteproc/st_slim_rproc.c 
> > b/drivers/remoteproc/st_slim_rproc.c
> > new file mode 100644
> > index 000..f4bf2d7
> > --- /dev/null
> > +++ b/drivers/remoteproc/st_slim_rproc.c
> > @@ -0,0 +1,364 @@
> > +/*
> > + * st_slim_rproc.c
> 
> These serve no purpose and have a habit of becoming out-of-date.
> Please remove it and replace with a nice succinct description
> instead.

OK will fix.
> 
> > + * Copyright (C) 2016 STMicroelectronics
> 
> Nit: '\n' here.

Will fix. 
> 
> > + * Author: Peter Griffin 
> 
> Nit: '\n' here.

Will fix.

> 
> > + * License terms:  GNU General Public License (GPL), version 2
> 
> Are you sure ST are okay with the shortened version of the GPL?

Do you mean the banner should be like this?

 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.

As I'm not aware of a shortened version of the GPV v2 license.

> 
> > + */
> > +
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include "remoteproc_internal.h"
> > +
> > +/* slimcore registers */
> 
> What's it called? slimcore, slim core, ST Slim?

It is usually referred to as SLIM core, or SLIM CPU in the various functional
specifications.

> 
> Please be consistent.  Use the name from the datasheet.

OK. The datasheet isn't consistent either, so we will settle on SLIM core and
SLIM CPU.

> 
> > +#define SLIM_ID_OFST   0x0
> > +#define SLIM_VER_OFST  0x4
> > +
> > +#define SLIM_EN_OFST   0x8
> > +#define SLIM_EN_RUNBIT(0)
> > +
> > +#define SLIM_CLK_GATE_OFST 0xC
> > +#define SLIM_CLK_GATE_DIS  BIT(0)
> > +#define SLIM_CLK_GATE_RESET  

[PATCH] virtio_console: Stop doing DMA on the stack

2016-08-30 Thread Andy Lutomirski
virtio_console uses a small DMA buffer for control requests.  Move
that buffer into heap memory.

Doing virtio DMA on the stack is normally okay on non-DMA-API virtio
systems (which is currently most of them), but it breaks completely
if the stack is virtually mapped.

Tested by typing both directions using picocom aimed at /dev/hvc0.

Signed-off-by: Andy Lutomirski 
---

Hi all-

This is currently broken in tip:x86/asm.  If you (Amit) like this patch,
would it make sense for Ingo to add it to -tip?

Thanks,
Andy

 drivers/char/virtio_console.c | 23 +++
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index d2406fe25533..5da47e26a012 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -165,6 +165,12 @@ struct ports_device {
 */
struct virtqueue *c_ivq, *c_ovq;
 
+   /*
+* A control packet buffer for guest->host requests, protected
+* by c_ovq_lock.
+*/
+   struct virtio_console_control cpkt;
+
/* Array of per-port IO virtqueues */
struct virtqueue **in_vqs, **out_vqs;
 
@@ -560,28 +566,29 @@ static ssize_t __send_control_msg(struct ports_device 
*portdev, u32 port_id,
  unsigned int event, unsigned int value)
 {
struct scatterlist sg[1];
-   struct virtio_console_control cpkt;
struct virtqueue *vq;
unsigned int len;
 
if (!use_multiport(portdev))
return 0;
 
-   cpkt.id = cpu_to_virtio32(portdev->vdev, port_id);
-   cpkt.event = cpu_to_virtio16(portdev->vdev, event);
-   cpkt.value = cpu_to_virtio16(portdev->vdev, value);
-
vq = portdev->c_ovq;
 
-   sg_init_one(sg, , sizeof(cpkt));
-
spin_lock(>c_ovq_lock);
-   if (virtqueue_add_outbuf(vq, sg, 1, , GFP_ATOMIC) == 0) {
+
+   portdev->cpkt.id = cpu_to_virtio32(portdev->vdev, port_id);
+   portdev->cpkt.event = cpu_to_virtio16(portdev->vdev, event);
+   portdev->cpkt.value = cpu_to_virtio16(portdev->vdev, value);
+
+   sg_init_one(sg, >cpkt, sizeof(struct virtio_console_control));
+
+   if (virtqueue_add_outbuf(vq, sg, 1, >cpkt, GFP_ATOMIC) == 0) {
virtqueue_kick(vq);
while (!virtqueue_get_buf(vq, )
&& !virtqueue_is_broken(vq))
cpu_relax();
}
+
spin_unlock(>c_ovq_lock);
return 0;
 }
-- 
2.7.4

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PATCH v8 15/18] ARM: STi: DT: STiH407: Add uniperif reader dt nodes

2016-08-30 Thread Peter Griffin
Hi Lee,

Thanks for reviewing and your very valuable feedback.

On Tue, 30 Aug 2016, Lee Jones wrote:

> On Fri, 26 Aug 2016, Peter Griffin wrote:
> 
> > This patch adds the DT node for the uniperif reader
> > IP block found on STiH407 family silicon.
> > 
> > Signed-off-by: Arnaud Pouliquen 
> > Signed-off-by: Peter Griffin 
> > ---
> >  arch/arm/boot/dts/stih407-family.dtsi | 26 ++
> >  1 file changed, 26 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/stih407-family.dtsi 
> > b/arch/arm/boot/dts/stih407-family.dtsi
> > index d263c96..bdddf2c 100644
> > --- a/arch/arm/boot/dts/stih407-family.dtsi
> > +++ b/arch/arm/boot/dts/stih407-family.dtsi
> > @@ -956,5 +956,31 @@
> > st,version = <5>;
> > st,mode = "SPDIF";
> > };
> > +
> > +   sti_uni_reader0: sti-uni-reader@0 {
> > +   compatible = "st,sti-uni-reader";
> > +   status = "disabled";
> 
> I find it's normally nicer to place the status of the node at the
> bottom, separated by a '\n'.

Ok I'll add a superflous '\n' in the next version.

>  There isn't a functional difference
> admittedly, but it would be my preference, since it's not describing
> the device per se.

Will change to your preference in the next version.

> 
> > +   #sound-dai-cells = <0>;
> > +   st,syscfg = <_core>;
> > +   reg = <0x8D83000 0x158>;
> 
> We usually use lower-case for the address.

Will fix.

> 
> Since this has a 'reg' property, the '0' in the node name does not
> look appropriate.

Will fix.
> 
> > +   interrupts = ;
> > +   dmas = < 5 0 1>;
> > +   dma-names = "rx";
> > +   dai-name = "Uni Reader #0 (PCM IN)";
> 
> Oooo, not seen something like this before.
> 
> If it does not already have one, it would require a DT Ack.

No idea, the driver got merged 1 year ago.

Arnaud did you get a DT ack when you merged this driver & binding?
> 
> > +   st,version = <3>;
> 
> This will likely need a DT Ack too.  We usually encode this sort of
> information in the compatible string.

See 05c1b4480e86a871b18030d6f3d532dc0ecdf38c
> 
> > +   };
> > +
> > +   sti_uni_reader1: sti-uni-reader@1 {
> > +   compatible = "st,sti-uni-reader";
> > +   status = "disabled";
> > +   #sound-dai-cells = <0>;
> > +   st,syscfg = <_core>;
> > +   reg = <0x8D84000 0x158>;
> > +   interrupts = ;
> > +   dmas = < 6 0 1>;
> > +   dma-names = "rx";
> > +   dai-name = "Uni Reader #1 (HDMI RX)";
> > +   st,version = <3>;
> > +   };
> 
> All as above.
> 
> > };
> >  };
> 

Regards,

Peter.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PATCH v2 2/2] vfio: add virtio pci quirk

2016-08-30 Thread Alex Williamson
On Tue, 30 Aug 2016 08:20:38 +0300
"Michael S. Tsirkin"  wrote:

> On Mon, Aug 29, 2016 at 10:53:04PM -0600, Alex Williamson wrote:
> > On Mon, 29 Aug 2016 21:52:20 -0600
> > Alex Williamson  wrote:
> >   
> > > On Mon, 29 Aug 2016 21:23:25 -0600
> > > Alex Williamson  wrote:
> > >   
> > > > On Tue, 30 Aug 2016 05:27:17 +0300
> > > > "Michael S. Tsirkin"  wrote:
> > > > 
> > > > > Modern virtio pci devices can set VIRTIO_F_IOMMU_PLATFORM
> > > > > to signal they are safe to use with an IOMMU.
> > > > > 
> > > > > Without this bit, exposing the device to userspace is unsafe, so probe
> > > > > and fail VFIO initialization unless noiommu is enabled.
> > > > > 
> > > > > Signed-off-by: Michael S. Tsirkin 
> > > > > ---
> > > > >  drivers/vfio/pci/vfio_pci_private.h |   1 +
> > > > >  drivers/vfio/pci/vfio_pci.c |  14 
> > > > >  drivers/vfio/pci/vfio_pci_virtio.c  | 140 
> > > > > 
> > > > >  drivers/vfio/pci/Makefile   |   1 +
> > > > >  4 files changed, 156 insertions(+)
> > > > >  create mode 100644 drivers/vfio/pci/vfio_pci_virtio.c
> > > > > 
> > > > > diff --git a/drivers/vfio/pci/vfio_pci_private.h 
> > > > > b/drivers/vfio/pci/vfio_pci_private.h
> > > > > index 2128de8..2bd5616 100644
> > > > > --- a/drivers/vfio/pci/vfio_pci_private.h
> > > > > +++ b/drivers/vfio/pci/vfio_pci_private.h
> > > > > @@ -139,4 +139,5 @@ static inline int vfio_pci_igd_init(struct 
> > > > > vfio_pci_device *vdev)
> > > > >   return -ENODEV;
> > > > >  }
> > > > >  #endif
> > > > > +extern int vfio_pci_virtio_quirk(struct vfio_pci_device *vdev, bool 
> > > > > noiommu);
> > > > >  #endif /* VFIO_PCI_PRIVATE_H */
> > > > > diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
> > > > > index d624a52..e93bf0c 100644
> > > > > --- a/drivers/vfio/pci/vfio_pci.c
> > > > > +++ b/drivers/vfio/pci/vfio_pci.c
> > > > > @@ -1236,6 +1236,20 @@ static int vfio_pci_probe(struct pci_dev 
> > > > > *pdev, const struct pci_device_id *id)
> > > > >   return ret;
> > > > >   }
> > > > >  
> > > > > + if (pdev->vendor == PCI_VENDOR_ID_REDHAT_QUMRANET) {  
> > > > 
> > > > Perhaps a vfio_pci_is_virtio() like vga below?  Let's test the device
> > > > ID range initially as well, this test raised a big red flag for me
> > > > whether all devices within this vendor ID were virtio.
> > > > 
> > > > > + bool noiommu = vfio_is_noiommu_group_dev(>dev);   
> > > > >
> > > > 
> > > > I think you can use iommu_present() for this and avoid patch 1of2.
> > > > noiommu is mutually exclusive to an iommu being present.  Seems like
> > > > all of this logic should be in the quirk itself, I'm not sure what it
> > > > buys to get the value here but wait until later to use it.  Using
> > > > iommu_present() could also move this test much earlier in
> > > > vfio_pci_probe() making the exit path easier.
> > > 
> > > Except then I'm reintroducing the bug fixed by 16ab8a5cbea4 since
> > > iommu_present() assumes an IOMMU API based device.  I'll try to think if
> > > there's another way to avoid adding the is_noiommu function.  Thanks,  
> > 
> > I think something like this would do it.
> > 
> > --- a/drivers/vfio/pci/vfio_pci.c
> > +++ b/drivers/vfio/pci/vfio_pci.c
> > @@ -1214,6 +1214,22 @@ static int vfio_pci_probe(struct pci_dev *pdev, 
> > const str
> > if (pdev->hdr_type != PCI_HEADER_TYPE_NORMAL)
> > return -EINVAL;
> >  
> > +   /*
> > +* Filter out virtio devices that do not honor the iommu,
> > +* but only for real iommu groups.
> > +*/
> > +   if (vfio_pci_is_virtio(pdev)) {
> > +   struct iommu_group *tmp = iommu_group_get(>dev);
> > +
> > +   if (tmp) {
> > +   iommu_group_put(tmp);
> > +
> > +   ret = vfio_pci_virtio_quirk(pdev);
> > +   if (ret)
> > +   return ret;
> > +   }
> > +   }
> > +
> > group = vfio_iommu_group_get(>dev);
> > if (!group)
> > return -EINVAL;
> > 
> > Thanks,
> > Alex  
> 
> Yes but I think this will also prevent binding
> a vfio-noiommu to this device.
> 
> Arguably this is a separate bug as it's already impossible ...
> but now that we are disabling regular vfio the noiommu
> fallback becomes more important.
> 
> Any hints on how to fix?

I don't follow, prior to noiommu, we'd simply call iommu_group_get() and
rely on the iommu group created by the iommu driver.  Either there is
one and we allow binding to vfio-pci or there is not one and we would
fail.  With noiommu, vfio_iommu_group_get() wraps that call in some
logic that potentially creates an iommu group if noiommu is enabled.
So if we use the real iommu_group_get() prior to that and a group
exists, we know we're not using 

Re: [PATCH v8 01/18] remoteproc: st_slim_rproc: add a slimcore rproc driver

2016-08-30 Thread Lee Jones
On Fri, 26 Aug 2016, Peter Griffin wrote:

> slim core is used as a basis for many IPs in the STi
> chipsets such as fdma and demux. To avoid duplicating
> the elf loading code in each device driver a slim
> rproc driver has been created.
> 
> This driver is designed to be used by other device drivers
> such as fdma, or demux whose IP is based around a slim core.
> The device driver can call slim_rproc_alloc() to allocate
> a slim rproc and slim_rproc_put() when finished.
> 
> This driver takes care of ioremapping the slim
> registers (dmem, imem, slimcore, peripherals), whose offsets
> and sizes can change between IP's. It also obtains and enables
> any clocks used by the device. This approach avoids having
> a double mapping of the registers as slim_rproc does not register
> its own platform device. It also maps well to device tree
> abstraction as it allows us to have one dt node for the whole
> device.
> 
> All of the generic rproc elf loading code can be reused, and
> we provide start() stop() hooks to start and stop the slim
> core once the firmware has been loaded. This has been tested
> successfully with fdma driver.

Nit.  It would be good to use a constant line-wrap.

'M-x post-mode' will help with this.

> Signed-off-by: Peter Griffin 
> ---
>  drivers/remoteproc/Kconfig   |   8 +
>  drivers/remoteproc/Makefile  |   1 +
>  drivers/remoteproc/st_slim_rproc.c   | 364 
> +++
>  include/linux/remoteproc/st_slim_rproc.h |  53 +
>  4 files changed, 426 insertions(+)
>  create mode 100644 drivers/remoteproc/st_slim_rproc.c
>  create mode 100644 include/linux/remoteproc/st_slim_rproc.h
> 
> diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig
> index 1a8bf76a..06765e0 100644
> --- a/drivers/remoteproc/Kconfig
> +++ b/drivers/remoteproc/Kconfig
> @@ -100,4 +100,12 @@ config ST_REMOTEPROC
> processor framework.
> This can be either built-in or a loadable module.
>  
> +config ST_SLIM_REMOTEPROC
> + tristate "ST Slim remoteproc support"
> + select REMOTEPROC
> + help
> +   Say y here to support firmware loading on IP based around
> +   the Slim core.
> +   If unsure say N.
> +
>  endmenu
> diff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile
> index 92d3758..db1dae7 100644
> --- a/drivers/remoteproc/Makefile
> +++ b/drivers/remoteproc/Makefile
> @@ -14,3 +14,4 @@ obj-$(CONFIG_DA8XX_REMOTEPROC)  += 
> da8xx_remoteproc.o
>  obj-$(CONFIG_QCOM_MDT_LOADER)+= qcom_mdt_loader.o
>  obj-$(CONFIG_QCOM_Q6V5_PIL)  += qcom_q6v5_pil.o
>  obj-$(CONFIG_ST_REMOTEPROC)  += st_remoteproc.o
> +obj-$(CONFIG_ST_SLIM_REMOTEPROC) += st_slim_rproc.o
> diff --git a/drivers/remoteproc/st_slim_rproc.c 
> b/drivers/remoteproc/st_slim_rproc.c
> new file mode 100644
> index 000..f4bf2d7
> --- /dev/null
> +++ b/drivers/remoteproc/st_slim_rproc.c
> @@ -0,0 +1,364 @@
> +/*
> + * st_slim_rproc.c

These serve no purpose and have a habit of becoming out-of-date.
Please remove it and replace with a nice succinct description
instead.

> + * Copyright (C) 2016 STMicroelectronics

Nit: '\n' here.

> + * Author: Peter Griffin 

Nit: '\n' here.

> + * License terms:  GNU General Public License (GPL), version 2

Are you sure ST are okay with the shortened version of the GPL?

> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include "remoteproc_internal.h"
> +
> +/* slimcore registers */

What's it called? slimcore, slim core, ST Slim?

Please be consistent.  Use the name from the datasheet.

> +#define SLIM_ID_OFST 0x0
> +#define SLIM_VER_OFST0x4
> +
> +#define SLIM_EN_OFST 0x8
> +#define SLIM_EN_RUN  BIT(0)
> +
> +#define SLIM_CLK_GATE_OFST   0xC
> +#define SLIM_CLK_GATE_DISBIT(0)
> +#define SLIM_CLK_GATE_RESET  BIT(2)
> +
> +#define SLIM_SLIM_PC_OFST0x20
> +
> +/* dmem registers */
> +#define SLIM_REV_ID_OFST 0x0
> +#define SLIM_REV_ID_MIN_MASK GENMASK(15, 8)
> +#define SLIM_REV_ID_MIN(id)  ((id & SLIM_REV_ID_MIN_MASK) >> 8)
> +#define SLIM_REV_ID_MAJ_MASK GENMASK(23, 16)
> +#define SLIM_REV_ID_MAJ(id)  ((id & SLIM_REV_ID_MAJ_MASK) >> 16)
> +
> +
> +/* peripherals registers */
> +#define SLIM_STBUS_SYNC_OFST 0xF88
> +#define SLIM_STBUS_SYNC_DIS  BIT(0)
> +
> +#define SLIM_INT_SET_OFST0xFD4
> +#define SLIM_INT_CLR_OFST0xFD8
> +#define SLIM_INT_MASK_OFST   0xFDC
> +
> +#define SLIM_CMD_CLR_OFST0xFC8
> +#define SLIM_CMD_MASK_OFST   0xFCC
> +
> +static const char *mem_names[ST_SLIM_MEM_MAX] = {
> + [ST_SLIM_DMEM]  = "dmem",
> + [ST_SLIM_IMEM]  = "imem",
> +};
> +
> +static int slim_clk_get(struct st_slim_rproc *slim_rproc, struct device *dev)
> +{
> + int clk, err;
> +
> + for (clk = 0; clk < 

Re: [PATCH v8 02/18] MAINTAINERS: Add st slim core rproc driver to STi section.

2016-08-30 Thread Lee Jones
On Fri, 26 Aug 2016, Peter Griffin wrote:

> This patch adds the slim core rproc driver to the STi section
> of the MAINTAINERS file.
> 
> Signed-off-by: Peter Griffin 
> ---
>  MAINTAINERS | 2 ++
>  1 file changed, 2 insertions(+)

Acked-by: Lee Jones 
  
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 0bbe4b1..5dd3b24 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1749,6 +1749,7 @@ F:  drivers/phy/phy-stih407-usb.c
>  F:   drivers/phy/phy-stih41x-usb.c
>  F:   drivers/pinctrl/pinctrl-st.c
>  F:   drivers/remoteproc/st_remoteproc.c
> +F:   drivers/remoteproc/st_slim_rproc.c
>  F:   drivers/reset/sti/
>  F:   drivers/rtc/rtc-st-lpc.c
>  F:   drivers/tty/serial/st-asc.c
> @@ -1757,6 +1758,7 @@ F:  drivers/usb/host/ehci-st.c
>  F:   drivers/usb/host/ohci-st.c
>  F:   drivers/watchdog/st_lpc_wdt.c
>  F:   drivers/ata/ahci_st.c
> +F:   include/linux/remoteproc/st_slim_rproc.h
>  
>  ARM/STM32 ARCHITECTURE
>  M:   Maxime Coquelin 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v8 06/18] ARM: STi: DT: STiH407: Add FDMA driver dt nodes.

2016-08-30 Thread Lee Jones
On Fri, 26 Aug 2016, Peter Griffin wrote:

> These nodes are required to get the fdma driver working
> on STiH407 based silicon.
> 
> Signed-off-by: Peter Griffin 
> ---
>  arch/arm/boot/dts/stih407-family.dtsi | 52 
> +++
>  1 file changed, 52 insertions(+)

Acked-by: Lee Jones 
  
> diff --git a/arch/arm/boot/dts/stih407-family.dtsi 
> b/arch/arm/boot/dts/stih407-family.dtsi
> index d294e82..45cab30 100644
> --- a/arch/arm/boot/dts/stih407-family.dtsi
> +++ b/arch/arm/boot/dts/stih407-family.dtsi
> @@ -821,5 +821,57 @@
>   clock-frequency = <6>;
>   st,syscfg   = <_core 0x224>;
>   };
> +
> + /* fdma audio */
> + fdma0: dma-controller@8e2 {
> + compatible = "st,stih407-fdma-mpe31-11", 
> "st,slim-rproc";
> + reg = <0x8e2 0x8000>,
> +   <0x8e3 0x3000>,
> +   <0x8e37000 0x1000>,
> +   <0x8e38000 0x8000>;
> + reg-names = "slimcore", "dmem", "peripherals", "imem";
> + clocks = <_s_c0_flexgen CLK_FDMA>,
> +  <_s_c0_flexgen CLK_EXT2F_A9>,
> +  <_s_c0_flexgen CLK_EXT2F_A9>,
> +  <_s_c0_flexgen CLK_EXT2F_A9>;
> + interrupts = ;
> + dma-channels = <16>;
> + #dma-cells = <3>;
> + };
> +
> + /* fdma app */
> + fdma1: dma-controller@8e4 {
> + compatible = "st,stih407-fdma-mpe31-12", 
> "st,slim-rproc";
> + reg = <0x8e4 0x8000>,
> +   <0x8e5 0x3000>,
> +   <0x8e57000 0x1000>,
> +   <0x8e58000 0x8000>;
> + reg-names = "slimcore", "dmem", "peripherals", "imem";
> + clocks = <_s_c0_flexgen CLK_FDMA>,
> + <_s_c0_flexgen CLK_TX_ICN_DMU>,
> + <_s_c0_flexgen CLK_TX_ICN_DMU>,
> + <_s_c0_flexgen CLK_EXT2F_A9>;
> +
> + interrupts = ;
> + dma-channels = <16>;
> + #dma-cells = <3>;
> + };
> +
> + /* fdma free running */
> + fdma2: dma-controller@8e6 {
> + compatible = "st,stih407-fdma-mpe31-13", 
> "st,slim-rproc";
> + reg = <0x8e6 0x8000>,
> +   <0x8e7 0x3000>,
> +   <0x8e77000 0x1000>,
> +   <0x8e78000 0x8000>;
> + reg-names = "slimcore", "dmem", "peripherals", "imem";
> + interrupts = ;
> + dma-channels = <16>;
> + #dma-cells = <3>;
> + clocks = <_s_c0_flexgen CLK_FDMA>,
> + <_s_c0_flexgen CLK_EXT2F_A9>,
> + <_s_c0_flexgen CLK_TX_ICN_DISP_0>,
> + <_s_c0_flexgen CLK_EXT2F_A9>;
> + };
>   };
>  };

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v8 09/18] ARM: multi_v7_defconfig: Enable STi and simple-card drivers.

2016-08-30 Thread Lee Jones
Nit: Remove full-stop from $SUBJECT

On Fri, 26 Aug 2016, Peter Griffin wrote:
> This patch enables the STi ALSA drivers found on STi platforms
> as well as the simple-card driver which is a dependency to have
> working sound.
> 
> Signed-off-by: Peter Griffin 
> Cc: arnaud.pouliq...@st.com
> Cc: broo...@kernel.org
> ---
>  arch/arm/configs/multi_v7_defconfig | 3 +++
>  1 file changed, 3 insertions(+)

Acked-by: Lee Jones 
  
> diff --git a/arch/arm/configs/multi_v7_defconfig 
> b/arch/arm/configs/multi_v7_defconfig
> index 998578a..51a38b1 100644
> --- a/arch/arm/configs/multi_v7_defconfig
> +++ b/arch/arm/configs/multi_v7_defconfig
> @@ -644,6 +644,9 @@ CONFIG_SND_SOC_AK4642=m
>  CONFIG_SND_SOC_SGTL5000=m
>  CONFIG_SND_SOC_SPDIF=m
>  CONFIG_SND_SOC_WM8978=m
> +CONFIG_SND_SOC_STI=m
> +CONFIG_SND_SOC_STI_SAS=m
> +CONFIG_SND_SIMPLE_CARD=m
>  CONFIG_USB=y
>  CONFIG_USB_XHCI_HCD=y
>  CONFIG_USB_XHCI_MVEBU=y

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v8 10/18] ARM: DT: STiH407: Add i2s_out pinctrl configuration

2016-08-30 Thread Lee Jones
On Fri, 26 Aug 2016, Peter Griffin wrote:

> This patch adds the pinctrl config for the i2s_out pins
> used by the uniperif player IP.
> 
> Signed-off-by: Arnaud Pouliquen 
> Signed-off-by: Peter Griffin 
> ---
>  arch/arm/boot/dts/stih407-pinctrl.dtsi | 23 +++
>  1 file changed, 23 insertions(+)

Acked-by: Lee Jones 

> diff --git a/arch/arm/boot/dts/stih407-pinctrl.dtsi 
> b/arch/arm/boot/dts/stih407-pinctrl.dtsi
> index a538ae5..0fb5c8a 100644
> --- a/arch/arm/boot/dts/stih407-pinctrl.dtsi
> +++ b/arch/arm/boot/dts/stih407-pinctrl.dtsi
> @@ -1067,6 +1067,29 @@
>   };
>   };
>  
> + i2s_out {
> + pinctrl_i2s_8ch_out: i2s_8ch_out{
> + st,pins {
> + mclk = < 5 ALT1 OUT>;
> + lrclk = < 7 ALT1 OUT>;
> + sclk = < 6 ALT1 OUT>;
> + data0 = < 4 ALT1 OUT>;
> + data1 = < 0 ALT1 OUT>;
> + data2 = < 1 ALT1 OUT>;
> + data3 = < 2 ALT1 OUT>;
> + };
> + };
> +
> + pinctrl_i2s_2ch_out: i2s_2ch_out{
> + st,pins {
> + mclk = < 5 ALT1 OUT>;
> + lrclk = < 7 ALT1 OUT>;
> + sclk = < 6 ALT1 OUT>;
> + data0 = < 4 ALT1 OUT>;
> + };
> + };
> + };
> +
>   serial3 {
>   pinctrl_serial3: serial3-0 {
>   st,pins {

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v8 11/18] ARM: DT: STiH407: Add i2s_in pinctrl configuration

2016-08-30 Thread Lee Jones
On Fri, 26 Aug 2016, Peter Griffin wrote:

> This patch adds the pinctrl config for the i2s_in pins
> used by the uniperif reader IP.
> 
> Signed-off-by: Arnaud Pouliquen 
> Signed-off-by: Peter Griffin 
> ---
>  arch/arm/boot/dts/stih407-pinctrl.dtsi | 24 
>  1 file changed, 24 insertions(+)

Acked-by: Lee Jones 
  
> diff --git a/arch/arm/boot/dts/stih407-pinctrl.dtsi 
> b/arch/arm/boot/dts/stih407-pinctrl.dtsi
> index 0fb5c8a..537db7e 100644
> --- a/arch/arm/boot/dts/stih407-pinctrl.dtsi
> +++ b/arch/arm/boot/dts/stih407-pinctrl.dtsi
> @@ -1090,6 +1090,30 @@
>   };
>   };
>  
> + i2s_in {
> + pinctrl_i2s_8ch_in: i2s_8ch_in{
> + st,pins {
> + mclk = < 5 ALT1 IN>;
> + lrclk = < 7 ALT1 IN>;
> + sclk = < 6 ALT1 IN>;
> + data0 = < 4 ALT1 IN>;
> + data1 = < 0 ALT1 IN>;
> + data2 = < 1 ALT1 IN>;
> + data3 = < 2 ALT1 IN>;
> + data4 = < 3 ALT1 IN>;
> + };
> + };
> +
> + pinctrl_i2s_2ch_in: i2s_2ch_in{
> + st,pins {
> + mclk = < 5 ALT1 IN>;
> + lrclk = < 7 ALT1 IN>;
> + sclk = < 6 ALT1 IN>;
> + data0 = < 4 ALT1 IN>;
> + };
> + };
> + };
> +
>   serial3 {
>   pinctrl_serial3: serial3-0 {
>   st,pins {

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v8 12/18] ARM: DT: STiH407: Add spdif_out pinctrl config

2016-08-30 Thread Lee Jones
On Fri, 26 Aug 2016, Peter Griffin wrote:

> This patch adds the pinctrl config for the spidf out
> pins used by the sasg codec IP.
> 
> Signed-off-by: Arnaud Pouliquen 
> Signed-off-by: Peter Griffin 
> ---
>  arch/arm/boot/dts/stih407-pinctrl.dtsi | 8 
>  1 file changed, 8 insertions(+)

Acked-by: Lee Jones 

> diff --git a/arch/arm/boot/dts/stih407-pinctrl.dtsi 
> b/arch/arm/boot/dts/stih407-pinctrl.dtsi
> index 537db7e..598dbab 100644
> --- a/arch/arm/boot/dts/stih407-pinctrl.dtsi
> +++ b/arch/arm/boot/dts/stih407-pinctrl.dtsi
> @@ -1114,6 +1114,14 @@
>   };
>   };
>  
> + spdif_out {
> + pinctrl_spdif_out: spdif_out{
> + st,pins {
> + spdif_out = < 7 ALT1 OUT>;
> + };
> + };
> + };
> +
>   serial3 {
>   pinctrl_serial3: serial3-0 {
>   st,pins {

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v8 13/18] ARM: STi: DT: STiH407: Add sti-sasg-codec dt node

2016-08-30 Thread Lee Jones
On Fri, 26 Aug 2016, Peter Griffin wrote:

> This patch adds the dt node for the internal audio
> codec IP.
> 
> Signed-off-by: Arnaud Pouliquen 
> Signed-off-by: Peter Griffin 
> ---
>  arch/arm/boot/dts/stih407-family.dtsi | 7 +++
>  1 file changed, 7 insertions(+)

Acked-by: Lee Jones 
  
> diff --git a/arch/arm/boot/dts/stih407-family.dtsi 
> b/arch/arm/boot/dts/stih407-family.dtsi
> index 45cab30..d1258d5 100644
> --- a/arch/arm/boot/dts/stih407-family.dtsi
> +++ b/arch/arm/boot/dts/stih407-family.dtsi
> @@ -873,5 +873,12 @@
>   <_s_c0_flexgen CLK_TX_ICN_DISP_0>,
>   <_s_c0_flexgen CLK_EXT2F_A9>;
>   };
> +
> + sti_sasg_codec: sti-sasg-codec {
> + compatible = "st,stih407-sas-codec";
> + #sound-dai-cells = <1>;
> + status = "disabled";
> + st,syscfg = <_core>;
> + };
>   };
>  };

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v8 14/18] ARM: STi: DT: STiH407: Add uniperif player dt nodes

2016-08-30 Thread Lee Jones
On Tue, 30 Aug 2016, Lee Jones wrote:

> On Fri, 26 Aug 2016, Peter Griffin wrote:
> 
> > This patch adds the DT nodes for the uniperif player
> > IP blocks found on STiH407 family silicon.
> > 
> > Signed-off-by: Arnaud Pouliquen 
> > Signed-off-by: Peter Griffin 
> > ---
> >  arch/arm/boot/dts/stih407-family.dtsi | 76 
> > +++
> >  1 file changed, 76 insertions(+)
> 
> Same comments as in patch 14.

s/14/15/

> > diff --git a/arch/arm/boot/dts/stih407-family.dtsi 
> > b/arch/arm/boot/dts/stih407-family.dtsi
> > index d1258d5..d263c96 100644
> > --- a/arch/arm/boot/dts/stih407-family.dtsi
> > +++ b/arch/arm/boot/dts/stih407-family.dtsi
> > @@ -880,5 +880,81 @@
> > status = "disabled";
> > st,syscfg = <_core>;
> > };
> > +
> > +   sti_uni_player0: sti-uni-player@0 {
> > +   compatible = "st,sti-uni-player";
> > +   status = "disabled";
> > +   #sound-dai-cells = <0>;
> > +   st,syscfg = <_core>;
> > +   clocks = <_s_d0_flexgen CLK_PCM_0>;
> > +   assigned-clocks = <_s_d0_quadfs 0>, 
> > <_s_d0_flexgen CLK_PCM_0>;
> > +   assigned-clock-parents = <0>, <_s_d0_quadfs 0>;
> > +   assigned-clock-rates = <5000>;
> > +   reg = <0x8D8 0x158>;
> > +   interrupts = ;
> > +   dmas = < 2 0 1>;
> > +   dai-name = "Uni Player #0 (HDMI)";
> > +   dma-names = "tx";
> > +   st,uniperiph-id = <0>;
> > +   st,version = <5>;
> > +   st,mode = "HDMI";
> > +   };
> > +
> > +   sti_uni_player1: sti-uni-player@1 {
> > +   compatible = "st,sti-uni-player";
> > +   status = "disabled";
> > +   #sound-dai-cells = <0>;
> > +   st,syscfg = <_core>;
> > +   clocks = <_s_d0_flexgen CLK_PCM_1>;
> > +   assigned-clocks = <_s_d0_quadfs 1>, 
> > <_s_d0_flexgen CLK_PCM_1>;
> > +   assigned-clock-parents = <0>, <_s_d0_quadfs 1>;
> > +   assigned-clock-rates = <5000>;
> > +   reg = <0x8D81000 0x158>;
> > +   interrupts = ;
> > +   dmas = < 3 0 1>;
> > +   dai-name = "Uni Player #1 (PIO)";
> > +   dma-names = "tx";
> > +   st,uniperiph-id = <1>;
> > +   st,version = <5>;
> > +   st,mode = "PCM";
> > +   };
> > +
> > +   sti_uni_player2: sti-uni-player@2 {
> > +   compatible = "st,sti-uni-player";
> > +   status = "disabled";
> > +   #sound-dai-cells = <0>;
> > +   st,syscfg = <_core>;
> > +   clocks = <_s_d0_flexgen CLK_PCM_2>;
> > +   assigned-clocks = <_s_d0_quadfs 2>, 
> > <_s_d0_flexgen CLK_PCM_2>;
> > +   assigned-clock-parents = <0>, <_s_d0_quadfs 2>;
> > +   assigned-clock-rates = <5000>;
> > +   reg = <0x8D82000 0x158>;
> > +   interrupts = ;
> > +   dmas = < 4 0 1>;
> > +   dai-name = "Uni Player #1 (DAC)";
> > +   dma-names = "tx";
> > +   st,uniperiph-id = <2>;
> > +   st,version = <5>;
> > +   st,mode = "PCM";
> > +   };
> > +
> > +   sti_uni_player3: sti-uni-player@3 {
> > +   compatible = "st,sti-uni-player";
> > +   status = "disabled";
> > +   #sound-dai-cells = <0>;
> > +   st,syscfg = <_core>;
> > +   clocks = <_s_d0_flexgen CLK_SPDIFF>;
> > +   assigned-clocks = <_s_d0_quadfs 3>, 
> > <_s_d0_flexgen CLK_SPDIFF>;
> > +   assigned-clock-parents = <0>, <_s_d0_quadfs 3>;
> > +   assigned-clock-rates = <5000>;
> > +   reg = <0x8D85000 0x158>;
> > +   interrupts = ;
> > +   dmas = < 7 0 1>;
> > +   dma-names = "tx";
> > +   dai-name = "Uni Player #1 (PIO)";
> > +   st,uniperiph-id = <3>;
> > +   st,version = <5>;
> > +   st,mode = "SPDIF";
> > +   };
> > };
> >  };
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v8 14/18] ARM: STi: DT: STiH407: Add uniperif player dt nodes

2016-08-30 Thread Lee Jones
On Fri, 26 Aug 2016, Peter Griffin wrote:

> This patch adds the DT nodes for the uniperif player
> IP blocks found on STiH407 family silicon.
> 
> Signed-off-by: Arnaud Pouliquen 
> Signed-off-by: Peter Griffin 
> ---
>  arch/arm/boot/dts/stih407-family.dtsi | 76 
> +++
>  1 file changed, 76 insertions(+)

Same comments as in patch 14.

> diff --git a/arch/arm/boot/dts/stih407-family.dtsi 
> b/arch/arm/boot/dts/stih407-family.dtsi
> index d1258d5..d263c96 100644
> --- a/arch/arm/boot/dts/stih407-family.dtsi
> +++ b/arch/arm/boot/dts/stih407-family.dtsi
> @@ -880,5 +880,81 @@
>   status = "disabled";
>   st,syscfg = <_core>;
>   };
> +
> + sti_uni_player0: sti-uni-player@0 {
> + compatible = "st,sti-uni-player";
> + status = "disabled";
> + #sound-dai-cells = <0>;
> + st,syscfg = <_core>;
> + clocks = <_s_d0_flexgen CLK_PCM_0>;
> + assigned-clocks = <_s_d0_quadfs 0>, 
> <_s_d0_flexgen CLK_PCM_0>;
> + assigned-clock-parents = <0>, <_s_d0_quadfs 0>;
> + assigned-clock-rates = <5000>;
> + reg = <0x8D8 0x158>;
> + interrupts = ;
> + dmas = < 2 0 1>;
> + dai-name = "Uni Player #0 (HDMI)";
> + dma-names = "tx";
> + st,uniperiph-id = <0>;
> + st,version = <5>;
> + st,mode = "HDMI";
> + };
> +
> + sti_uni_player1: sti-uni-player@1 {
> + compatible = "st,sti-uni-player";
> + status = "disabled";
> + #sound-dai-cells = <0>;
> + st,syscfg = <_core>;
> + clocks = <_s_d0_flexgen CLK_PCM_1>;
> + assigned-clocks = <_s_d0_quadfs 1>, 
> <_s_d0_flexgen CLK_PCM_1>;
> + assigned-clock-parents = <0>, <_s_d0_quadfs 1>;
> + assigned-clock-rates = <5000>;
> + reg = <0x8D81000 0x158>;
> + interrupts = ;
> + dmas = < 3 0 1>;
> + dai-name = "Uni Player #1 (PIO)";
> + dma-names = "tx";
> + st,uniperiph-id = <1>;
> + st,version = <5>;
> + st,mode = "PCM";
> + };
> +
> + sti_uni_player2: sti-uni-player@2 {
> + compatible = "st,sti-uni-player";
> + status = "disabled";
> + #sound-dai-cells = <0>;
> + st,syscfg = <_core>;
> + clocks = <_s_d0_flexgen CLK_PCM_2>;
> + assigned-clocks = <_s_d0_quadfs 2>, 
> <_s_d0_flexgen CLK_PCM_2>;
> + assigned-clock-parents = <0>, <_s_d0_quadfs 2>;
> + assigned-clock-rates = <5000>;
> + reg = <0x8D82000 0x158>;
> + interrupts = ;
> + dmas = < 4 0 1>;
> + dai-name = "Uni Player #1 (DAC)";
> + dma-names = "tx";
> + st,uniperiph-id = <2>;
> + st,version = <5>;
> + st,mode = "PCM";
> + };
> +
> + sti_uni_player3: sti-uni-player@3 {
> + compatible = "st,sti-uni-player";
> + status = "disabled";
> + #sound-dai-cells = <0>;
> + st,syscfg = <_core>;
> + clocks = <_s_d0_flexgen CLK_SPDIFF>;
> + assigned-clocks = <_s_d0_quadfs 3>, 
> <_s_d0_flexgen CLK_SPDIFF>;
> + assigned-clock-parents = <0>, <_s_d0_quadfs 3>;
> + assigned-clock-rates = <5000>;
> + reg = <0x8D85000 0x158>;
> + interrupts = ;
> + dmas = < 7 0 1>;
> + dma-names = "tx";
> + dai-name = "Uni Player #1 (PIO)";
> + st,uniperiph-id = <3>;
> + st,version = <5>;
> + st,mode = "SPDIF";
> + };
>   };
>  };

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v8 15/18] ARM: STi: DT: STiH407: Add uniperif reader dt nodes

2016-08-30 Thread Lee Jones
On Fri, 26 Aug 2016, Peter Griffin wrote:

> This patch adds the DT node for the uniperif reader
> IP block found on STiH407 family silicon.
> 
> Signed-off-by: Arnaud Pouliquen 
> Signed-off-by: Peter Griffin 
> ---
>  arch/arm/boot/dts/stih407-family.dtsi | 26 ++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/stih407-family.dtsi 
> b/arch/arm/boot/dts/stih407-family.dtsi
> index d263c96..bdddf2c 100644
> --- a/arch/arm/boot/dts/stih407-family.dtsi
> +++ b/arch/arm/boot/dts/stih407-family.dtsi
> @@ -956,5 +956,31 @@
>   st,version = <5>;
>   st,mode = "SPDIF";
>   };
> +
> + sti_uni_reader0: sti-uni-reader@0 {
> + compatible = "st,sti-uni-reader";
> + status = "disabled";

I find it's normally nicer to place the status of the node at the
bottom, separated by a '\n'.  There isn't a functional difference
admittedly, but it would be my preference, since it's not describing
the device per se.

> + #sound-dai-cells = <0>;
> + st,syscfg = <_core>;
> + reg = <0x8D83000 0x158>;

We usually use lower-case for the address.

Since this has a 'reg' property, the '0' in the node name does not
look appropriate.

> + interrupts = ;
> + dmas = < 5 0 1>;
> + dma-names = "rx";
> + dai-name = "Uni Reader #0 (PCM IN)";

Oooo, not seen something like this before.

If it does not already have one, it would require a DT Ack.

> + st,version = <3>;

This will likely need a DT Ack too.  We usually encode this sort of
information in the compatible string.

> + };
> +
> + sti_uni_reader1: sti-uni-reader@1 {
> + compatible = "st,sti-uni-reader";
> + status = "disabled";
> + #sound-dai-cells = <0>;
> + st,syscfg = <_core>;
> + reg = <0x8D84000 0x158>;
> + interrupts = ;
> + dmas = < 6 0 1>;
> + dma-names = "rx";
> + dai-name = "Uni Reader #1 (HDMI RX)";
> + st,version = <3>;
> + };

All as above.

>   };
>  };

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v2 2/2] vfio: add virtio pci quirk

2016-08-30 Thread kbuild test robot
Hi Michael,

[auto build test ERROR on vfio/next]
[also build test ERROR on v4.8-rc4 next-20160825]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]
[Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for 
convenience) to record what (public, well-known) commit your patch series was 
built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:
https://github.com/0day-ci/linux/commits/Michael-S-Tsirkin/vfio-blacklist-legacy-virtio-devices/20160830-124010
base:   https://github.com/awilliam/linux-vfio.git next
config: x86_64-rhel (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> ERROR: "vfio_is_noiommu_group_dev" [drivers/vfio/pci/vfio-pci.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v8 18/18] drm/virtio: kconfig: Fixup white space.

2016-08-30 Thread Lee Jones
On Tue, 30 Aug 2016, Lee Jones wrote:

> On Fri, 26 Aug 2016, Peter Griffin wrote:
> 
> > Use tabs instead of spaces.
> > 
> > Signed-off-by: Peter Griffin 
> > ---
> >  drivers/gpu/drm/virtio/Kconfig | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> For my own reference:
>   Acked-by: Lee Jones 

Whoops!  Please ignore the "For my own reference" part.  I used the
wrong key-combo shortcut.

> > diff --git a/drivers/gpu/drm/virtio/Kconfig b/drivers/gpu/drm/virtio/Kconfig
> > index 90357d9..2d83932 100644
> > --- a/drivers/gpu/drm/virtio/Kconfig
> > +++ b/drivers/gpu/drm/virtio/Kconfig
> > @@ -2,10 +2,10 @@ config DRM_VIRTIO_GPU
> > tristate "Virtio GPU driver"
> > depends on DRM
> > select VIRTIO
> > -select DRM_KMS_HELPER
> > -select DRM_TTM
> > +   select DRM_KMS_HELPER
> > +   select DRM_TTM
> > help
> >This is the virtual GPU driver for virtio.  It can be used with
> > -   QEMU based VMMs (like KVM or Xen).
> > +  QEMU based VMMs (like KVM or Xen).
> >  
> >If unsure say M.
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v8 16/18] ARM: DT: STi: stihxxx-b2120: Add DT nodes for STi audio card

2016-08-30 Thread Lee Jones
On Fri, 26 Aug 2016, Peter Griffin wrote:

> This patch enables the uniperif players 2 & 3 for b2120 boards
> and also adds the "simple-audio-card" device node to interconnect
> the SoC sound device and the codec.
> 
> Signed-off-by: Arnaud Pouliquen 
> Signed-off-by: Peter Griffin 
> ---
>  arch/arm/boot/dts/stihxxx-b2120.dtsi | 45 
> 
>  1 file changed, 45 insertions(+)

Acked-by: Lee Jones 

> diff --git a/arch/arm/boot/dts/stihxxx-b2120.dtsi 
> b/arch/arm/boot/dts/stihxxx-b2120.dtsi
> index 722c63f..1f64bb6 100644
> --- a/arch/arm/boot/dts/stihxxx-b2120.dtsi
> +++ b/arch/arm/boot/dts/stihxxx-b2120.dtsi
> @@ -131,5 +131,50 @@
>   dvb-card= ;
>   };
>   };
> +
> + sti_uni_player2: sti-uni-player@2 {
> + status = "okay";
> + };
> +
> + sti_uni_player3: sti-uni-player@3 {
> + status = "okay";
> + };
> +
> + sti_sasg_codec: sti-sasg-codec {
> + status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <_spdif_out>;
> + };
> +
> + sound {
> + compatible = "simple-audio-card";
> + simple-audio-card,name = "sti audio card";
> + status = "okay";
> +
> + simple-audio-card,dai-link@0 {
> + /* DAC */
> + format = "i2s";
> + mclk-fs = <256>;
> + cpu {
> + sound-dai = <_uni_player2>;
> + };
> +
> + codec {
> + sound-dai = <_sasg_codec 1>;
> + };
> + };
> + simple-audio-card,dai-link@1 {
> + /* SPDIF */
> + format = "left_j";
> + mclk-fs = <128>;
> + cpu {
> + sound-dai = <_uni_player3>;
> + };
> +
> + codec {
> + sound-dai = <_sasg_codec 0>;
> + };
> + };
> + };
>   };
>  };

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v8 17/18] drm/virtio: kconfig: Fix recursive dependency.

2016-08-30 Thread Lee Jones
On Fri, 26 Aug 2016, Peter Griffin wrote:

> [..]
> drivers/video/fbdev/Kconfig:5:error: recursive dependency detected!
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/video/fbdev/Kconfig:5:symbol FB is selected by 
> DRM_KMS_FB_HELPER
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/gpu/drm/Kconfig:42:   symbol DRM_KMS_FB_HELPER depends on 
> DRM_KMS_HELPER
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/gpu/drm/Kconfig:36:   symbol DRM_KMS_HELPER is selected by 
> DRM_VIRTIO_GPU
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/gpu/drm/virtio/Kconfig:1: symbol DRM_VIRTIO_GPU depends on VIRTIO
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/virtio/Kconfig:1: symbol VIRTIO is selected by REMOTEPROC
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/remoteproc/Kconfig:4: symbol REMOTEPROC is selected by 
> ST_SLIM_REMOTEPROC
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/remoteproc/Kconfig:103:   symbol ST_SLIM_REMOTEPROC is selected 
> by ST_FDMA
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/dma/Kconfig:440:  symbol ST_FDMA depends on DMADEVICES
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/dma/Kconfig:5:symbol DMADEVICES is selected by SND_SOC_SH4_SIU
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> sound/soc/sh/Kconfig:29:  symbol SND_SOC_SH4_SIU is selected by 
> SND_SIU_MIGOR
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> sound/soc/sh/Kconfig:64:  symbol SND_SIU_MIGOR depends on I2C
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/i2c/Kconfig:7:symbol I2C is selected by FB_DDC
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/video/fbdev/Kconfig:63:   symbol FB_DDC is selected by 
> FB_CYBER2000_DDC
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/video/fbdev/Kconfig:378:  symbol FB_CYBER2000_DDC depends on 
> FB_CYBER2000
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/video/fbdev/Kconfig:366:  symbol FB_CYBER2000 depends on FB

An explanation of why this is happening and why your fix works is
usually helpful here.

> Signed-off-by: Peter Griffin 
> ---
>  drivers/gpu/drm/virtio/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/virtio/Kconfig b/drivers/gpu/drm/virtio/Kconfig
> index e1afc3d..90357d9 100644
> --- a/drivers/gpu/drm/virtio/Kconfig
> +++ b/drivers/gpu/drm/virtio/Kconfig
> @@ -1,6 +1,7 @@
>  config DRM_VIRTIO_GPU
>   tristate "Virtio GPU driver"
> - depends on DRM && VIRTIO
> + depends on DRM
> + select VIRTIO
>  select DRM_KMS_HELPER
>  select DRM_TTM
>   help

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v8 18/18] drm/virtio: kconfig: Fixup white space.

2016-08-30 Thread Lee Jones
On Fri, 26 Aug 2016, Peter Griffin wrote:

> Use tabs instead of spaces.
> 
> Signed-off-by: Peter Griffin 
> ---
>  drivers/gpu/drm/virtio/Kconfig | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

For my own reference:
  Acked-by: Lee Jones 

> diff --git a/drivers/gpu/drm/virtio/Kconfig b/drivers/gpu/drm/virtio/Kconfig
> index 90357d9..2d83932 100644
> --- a/drivers/gpu/drm/virtio/Kconfig
> +++ b/drivers/gpu/drm/virtio/Kconfig
> @@ -2,10 +2,10 @@ config DRM_VIRTIO_GPU
>   tristate "Virtio GPU driver"
>   depends on DRM
>   select VIRTIO
> -select DRM_KMS_HELPER
> -select DRM_TTM
> + select DRM_KMS_HELPER
> + select DRM_TTM
>   help
>  This is the virtual GPU driver for virtio.  It can be used with
> -   QEMU based VMMs (like KVM or Xen).
> +QEMU based VMMs (like KVM or Xen).
>  
>  If unsure say M.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization