[PATCH 0/2 v6] Add I2S audio support for ARC AXS10x boards

2016-04-27 Thread Jose Abreu
ARC AXS10x platforms consist of a mainboard with several peripherals.
One of those peripherals is an HDMI output port controlled by the ADV7511
transmitter.

This patch set adds I2S audio for the AXS10x platform.

Changes v5 -> v6
* Use SNDRV_DMA_TYPE_CONTINUOUS

Changes v4 -> v5
* Resolve undefined references when compiling as module
* Dropped adv7511 audio patches
* Use DMA properties in I2S to check which mode to use: PIO or DMA (as 
suggested by Lars-Peter Clausen)

Changes v3 -> v4:
* Reintroduced custom PCM driver (see note below)
* Use DT boolean to switch between ALSA DMA engine PCM or custom PCM
* Use fifo depth to program I2S FCR
* Update I2S documentation

Changes v2 -> v3:
* Removed pll_config functions (as suggested by Alexey Brodkin)
* Removed HDMI start at adv7511_core (as suggested by Archit Taneja)
* Use NOP functions for adv7511_audio (as suggested by Archit Taneja)
* Added adv7511_audio_exit() function (as suggested by Archit Taneja)
* Moved adv7511 to its own folder (as suggested by Archit Taneja)
* Separated file rename of adv7511_core (as suggested by Emil Velikov)
* Compile adv7511 as module if ALSA SoC is compiled as module
* Load adv7511 audio only if declared in device tree (as suggested by Laurent 
Pinchart)
* Dropped custom platform driver, using now ALSA DMA engine
* Dropped IRQ handler for I2S

Changes v1 -> v2:
* DT bindings moved to separate patch (as suggested by Alexey Brodkin)
* Removed defconfigs entries (as suggested by Alexey Brodkin)


NOTE:
Although the mainline I2S driver uses ALSA DMA engine,
this controller can be built without DMA support so it
was necessary to add this custom platform driver so that
HDMI audio works in AXS boards.

Cc: Carlos Palminha 
Cc: Mark Brown 
Cc: Liam Girdwood 
Cc: Jaroslav Kysela 
Cc: Takashi Iwai 
Cc: Rob Herring 
Cc: Alexey Brodkin 
Cc: linux-snps-arc@lists.infradead.org
Cc: alsa-de...@alsa-project.org
Cc: devicet...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org

Jose Abreu (2):
  ASoC: dwc: Add custom PCM driver
  ASoC: dwc: Update DOCUMENTATION for I2S Driver

 .../devicetree/bindings/sound/designware-i2s.txt   |   9 +-
 sound/soc/dwc/Kconfig  |   9 +
 sound/soc/dwc/Makefile |   1 +
 sound/soc/dwc/designware.h |  71 +++
 sound/soc/dwc/designware_i2s.c |  94 ++---
 sound/soc/dwc/designware_pcm.c | 228 +
 6 files changed, 383 insertions(+), 29 deletions(-)
 create mode 100644 sound/soc/dwc/designware.h
 create mode 100644 sound/soc/dwc/designware_pcm.c

-- 
1.9.1



___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


[PATCH 2/2 v6] ASoC: dwc: Update DOCUMENTATION for I2S Driver

2016-04-27 Thread Jose Abreu
This patch updates documentation for the Designware I2S
driver.

Signed-off-by: Jose Abreu 
Acked-by: Rob Herring 
Cc: Rob Herring 
Cc: Carlos Palminha 
Cc: Alexey Brodkin 
Cc: devicet...@vger.kernel.org
Cc: linux-snps-arc@lists.infradead.org
Cc: alsa-de...@alsa-project.org
Cc: linux-ker...@vger.kernel.org
---

No changes v5 -> v6.

Changes v4 -> v5:
* interrupts is now required property
* Drop 'snps-use-dmaengine' property

This patch was only introduced in v4.

 Documentation/devicetree/bindings/sound/designware-i2s.txt | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/designware-i2s.txt 
b/Documentation/devicetree/bindings/sound/designware-i2s.txt
index 7bb5424..27a728f 100644
--- a/Documentation/devicetree/bindings/sound/designware-i2s.txt
+++ b/Documentation/devicetree/bindings/sound/designware-i2s.txt
@@ -3,14 +3,18 @@ DesignWare I2S controller
 Required properties:
  - compatible : Must be "snps,designware-i2s"
  - reg : Must contain the I2S core's registers location and length
+ - interrupts:  where IRQ is the interrupt number.
  - clocks : Pairs of phandle and specifier referencing the controller's
clocks. The controller expects one clock: the clock used as the sampling
rate reference clock sample.
  - clock-names : "i2sclk" for the sample rate reference clock.
+
+Optional properties:
  - dmas: Pairs of phandle and specifier for the DMA channels that are used by
the core. The core expects one or two dma channels: one for transmit and
-   one for receive.
- - dma-names : "tx" for the transmit channel, "rx" for the receive channel.
+   one for receive. Set this parameter if the I2S DMA block is enabled.
+ - dma-names : "tx" for the transmit channel, "rx" for the receive channel. Set
+   this parameter if the I2S DMA block is enabled.
 
 For more details on the 'dma', 'dma-names', 'clock' and 'clock-names'
 properties please check:
@@ -23,6 +27,7 @@ Example:
soc_i2s: i2s@7ff9 {
compatible = "snps,designware-i2s";
reg = <0x0 0x7ff9 0x0 0x1000>;
+   interrupts = <15>;
clocks = <&scpi_i2sclk 0>;
clock-names = "i2sclk";
#sound-dai-cells = <0>;
-- 
1.9.1



___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


[PATCH 1/2 v6] ASoC: dwc: Add custom PCM driver

2016-04-27 Thread Jose Abreu
HDMI audio support was added to the AXS board using an
I2S cpu driver and a custom platform driver.

The platform driver supports two channels @ 16 bits with
rates 32k, 44.1k and 48k.

Although the mainline I2S driver uses ALSA DMA engine,
this controller can be built without DMA support so it
was necessary to add this custom platform driver so that
HDMI audio works in AXS boards.

The selection between the use of DMA engine or PIO mode
is detected by declaring or not the DMA parameters in
the device tree.

Signed-off-by: Jose Abreu 
Cc: Carlos Palminha 
Cc: Mark Brown 
Cc: Liam Girdwood 
Cc: Jaroslav Kysela 
Cc: Takashi Iwai 
Cc: Alexey Brodkin 
Cc: linux-snps-arc@lists.infradead.org
Cc: alsa-de...@alsa-project.org
Cc: linux-ker...@vger.kernel.org
---

Changes v5 -> v6:
* Use SNDRV_DMA_TYPE_CONTINUOUS

Changes v4 -> v5:
* Resolve undefined references when compiling as module
* Use DMA properties in I2S to check which mode to use: PIO or DMA (as 
suggested by Lars-Peter Clausen)

Changes v3 -> v4:
* Reintroduced custom PCM driver
* Use DT boolean to switch between ALSA DMA engine PCM or custom PCM

Changes v2 -> v3:
* Removed pll_config functions (as suggested by Alexey Brodkin)
* Dropped custom platform driver, using now ALSA DMA engine
* Dropped IRQ handler for I2S

No changes v1 -> v2.

 sound/soc/dwc/Kconfig  |   9 ++
 sound/soc/dwc/Makefile |   1 +
 sound/soc/dwc/designware.h |  71 +
 sound/soc/dwc/designware_i2s.c |  94 -
 sound/soc/dwc/designware_pcm.c | 228 +
 5 files changed, 376 insertions(+), 27 deletions(-)
 create mode 100644 sound/soc/dwc/designware.h
 create mode 100644 sound/soc/dwc/designware_pcm.c

diff --git a/sound/soc/dwc/Kconfig b/sound/soc/dwc/Kconfig
index d50e085..2a21120 100644
--- a/sound/soc/dwc/Kconfig
+++ b/sound/soc/dwc/Kconfig
@@ -7,4 +7,13 @@ config SND_DESIGNWARE_I2S
 Synopsys desigwnware I2S device. The device supports upto
 maximum of 8 channels each for play and record.
 
+config SND_DESIGNWARE_PCM
+   tristate "Synopsys I2S PCM Driver"
+   help
+Say Y or M if you want to add support for ALSA ASoC platform driver
+using I2S.
+
+Select this option if you want to be able to create a sound interface
+using the I2S device driver as CPU driver. Instead of using ALSA
+DMA engine by selecting this driver a custom PCM driver will be used.
 
diff --git a/sound/soc/dwc/Makefile b/sound/soc/dwc/Makefile
index 319371f..1b48bccc 100644
--- a/sound/soc/dwc/Makefile
+++ b/sound/soc/dwc/Makefile
@@ -1,3 +1,4 @@
 # SYNOPSYS Platform Support
 obj-$(CONFIG_SND_DESIGNWARE_I2S) += designware_i2s.o
+obj-$(CONFIG_SND_DESIGNWARE_PCM) += designware_pcm.o
 
diff --git a/sound/soc/dwc/designware.h b/sound/soc/dwc/designware.h
new file mode 100644
index 000..09fafee
--- /dev/null
+++ b/sound/soc/dwc/designware.h
@@ -0,0 +1,71 @@
+/*
+ * ALSA SoC Synopsys Audio Layer
+ *
+ * sound/soc/dwc/designware.h
+ *
+ * Copyright (C) 2016 Synopsys
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __DESIGNWARE_H
+#define __DESIGNWARE_H
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+struct dw_pcm_binfo {
+   struct snd_pcm_substream *stream;
+   unsigned char *dma_base;
+   unsigned char *dma_pointer;
+   unsigned int period_size_frames;
+   unsigned int size;
+   snd_pcm_uframes_t period_pointer;
+   unsigned int total_periods;
+   unsigned int current_period;
+};
+
+union dw_i2s_snd_dma_data {
+   struct i2s_dma_data pd;
+   struct snd_dmaengine_dai_dma_data dt;
+};
+
+struct dw_i2s_dev {
+   void __iomem *i2s_base;
+   struct clk *clk;
+   int active;
+   unsigned int capability;
+   unsigned int quirks;
+   unsigned int i2s_reg_comp1;
+   unsigned int i2s_reg_comp2;
+   struct device *dev;
+   u32 ccr;
+   u32 xfer_resolution;
+   u32 fifo_th;
+
+   /* data related to DMA transfers b/w i2s and DMAC */
+   bool use_dmaengine;
+   union dw_i2s_snd_dma_data play_dma_data;
+   union dw_i2s_snd_dma_data capture_dma_data;
+   struct i2s_clk_config_data config;
+   int (*i2s_clk_cfg)(struct i2s_clk_config_data *config);
+   struct dw_pcm_binfo binfo;
+};
+
+#if IS_ENABLED(CONFIG_SND_DESIGNWARE_PCM)
+int dw_pcm_transfer(u32 *lsample, u32 *rsample, int bytes, int buf_size,
+   struct dw_pcm_binfo *bi);
+#else
+int dw_pcm_transfer(u32 *lsample, u32 *rsample, int bytes, int buf_size,
+   struct dw_pcm_binfo *bi)
+{
+   return 0;
+}
+#endif
+
+#endif
diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c
index 0db69b7..5ee0faf 100644
--- a/sound/soc/dwc/designware_i2s.c
+++ b/sound/soc/dwc/designware_i2s.c
@@ -24,6 +24,7 @@
 #include 
 #

[GIT PULL] ARC fixes for 4.6-rc4

2016-04-27 Thread Vineet Gupta
Hi Linus,

Please pull.

Thx,
-Vineet
-->
The following changes since commit c3b46c73264b03000d1e18b22f5caf63332547c9:

  Linux 4.6-rc4 (2016-04-17 19:13:32 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git/ 
tags/arc-4.6-rc6-fixes

for you to fetch changes up to 1b10cb21d888c021bedbe678f7c26aee1bf04ffa:

  ARC: add support for reserved memory defined by device tree (2016-04-27 
17:06:56
+0530)


ARC fixes for 4.6-rc6

 - LOCKDEP now words for ARCv2 builds
 - Enabling DT reserved-memory binding to work (for forthcoming HDMI driver)


Alexey Brodkin (2):
  ARC: support generic per-device coherent dma mem
  ARC: add support for reserved memory defined by device tree

Eric Engestrom (1):
  Documentation: dt: arc: fix spelling mistakes

Evgeny Voevodin (1):
  ARCv2: Enable LOCKDEP

 .../devicetree/bindings/arc/archs-pct.txt  |  2 +-
 Documentation/devicetree/bindings/arc/pct.txt  |  2 +-
 arch/arc/Kconfig   |  2 ++
 arch/arc/include/asm/irqflags-arcv2.h  | 36 +-
 arch/arc/kernel/entry-arcv2.S  | 10 +-
 arch/arc/kernel/entry-compact.S|  3 ++
 arch/arc/mm/init.c |  4 +++
 7 files changed, 55 insertions(+), 4 deletions(-)

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


[PATCH 0/2] drm/arcpgu: Get use of dedicated memory area for frame buffer

2016-04-27 Thread Alexey Brodkin
This mini-series allows to allocate frame buffer memory in desired
location. Allocation of a frame buffer memory in a special memory region
allows bypassing of so-called IO Coherency aperture which is typically set
as a range 0x8z-0xAz.

I.e. all data traffic to PGU bypasses IO Coherency block
and saves its bandwidth for other peripherals.

Cc: Cc: Dave Airlie 
Cc: Daniel Vetter 
Cc: devicet...@vger.kernel.org

Alexey Brodkin (2):
  drm/arcpgu: use dedicated memory area for frame buffer
  ARC: [axs10x] Specify reserved memory for frame buffer

 arch/arc/boot/dts/axc001.dtsi | 20 +++-
 arch/arc/boot/dts/axc003.dtsi | 14 ++
 arch/arc/boot/dts/axc003_idu.dtsi | 14 ++
 arch/arc/boot/dts/axs10x_mb.dtsi  |  2 +-
 drivers/gpu/drm/arc/arcpgu_drv.c  |  6 ++
 5 files changed, 54 insertions(+), 2 deletions(-)

-- 
2.5.5


___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


[PATCH 1/2] drm/arcpgu: use dedicated memory area for frame buffer

2016-04-27 Thread Alexey Brodkin
Now when ARC supports reserved memory areas and
per-device coherent DMA allocations we may switch ARC PGU
to use of those dedicated areas.

One of the benefits we may move frame-buffer area out
from IO Coherency aperture and so significantly
reduce IOC utilization allowing less demanding
peripherals to use all perks of IOC.

Signed-off-by: Alexey Brodkin 
Cc: Dave Airlie 
Cc: Daniel Vetter 
---
 drivers/gpu/drm/arc/arcpgu_drv.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c
index 5b35e5db..76e187a 100644
--- a/drivers/gpu/drm/arc/arcpgu_drv.c
+++ b/drivers/gpu/drm/arc/arcpgu_drv.c
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "arcpgu.h"
 #include "arcpgu_regs.h"
@@ -135,6 +136,11 @@ static int arcpgu_load(struct drm_device *drm)
dev_info(drm->dev, "arc_pgu ID: 0x%x\n",
 arc_pgu_read(arcpgu, ARCPGU_REG_ID));
 
+   /* Get the optional framebuffer memory resource */
+   ret = of_reserved_mem_device_init(drm->dev);
+   if (ret && ret != -ENODEV)
+   return ret;
+
if (dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32)))
return -ENODEV;
 
-- 
2.5.5


___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


[PATCH 2/2] ARC: [axs10x] Specify reserved memory for frame buffer

2016-04-27 Thread Alexey Brodkin
Allocation of a frame buffer memory in a special memory region
allows bypassing of so-called IO Coherency aperture
which is typically set as a range 0x8z-0xAz.

I.e. all data traffic to PGU bypasses IO Coherency block
and saves its bandwidth for other peripherals.

Even though for AXS101 (which sorts ARC770 CPU) IOC is not
an option for a sake of keeping one DT description for the
base-board (axs10x_mb.dtsi) we're still defining reserved
memory location in the very end of DDR.

Signed-off-by: Alexey Brodkin 
Cc: devicet...@vger.kernel.org
---
 arch/arc/boot/dts/axc001.dtsi | 20 +++-
 arch/arc/boot/dts/axc003.dtsi | 14 ++
 arch/arc/boot/dts/axc003_idu.dtsi | 14 ++
 arch/arc/boot/dts/axs10x_mb.dtsi  |  2 +-
 4 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/arch/arc/boot/dts/axc001.dtsi b/arch/arc/boot/dts/axc001.dtsi
index 420dcfd..ae6162d 100644
--- a/arch/arc/boot/dts/axc001.dtsi
+++ b/arch/arc/boot/dts/axc001.dtsi
@@ -95,6 +95,24 @@
#size-cells = <1>;
ranges = <0x 0x8000 0x4000>;
device_type = "memory";
-   reg = <0x8000 0x2000>;  /* 512MiB */
+   reg = <0x8000 0x1f00>;  /* 512 - 16 MiB */
+   };
+
+   reserved-memory {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges;
+   /*
+* We just move frame buffer area to the very end of
+* available DDR. And even though in case of ARC770 there's
+* no strict requirement for a frame-buffer to be in any
+* particular location it allows us to use the same
+* base board's DT node for ARC PGU as for ARc HS38.
+*/
+   frame_buffer: frame_buffer@9f00 {
+   compatible = "shared-dma-pool";
+   reg = <0x9f00 0x100>;
+   no-map;
+   };
};
 };
diff --git a/arch/arc/boot/dts/axc003.dtsi b/arch/arc/boot/dts/axc003.dtsi
index f90fadf..c7a95c2 100644
--- a/arch/arc/boot/dts/axc003.dtsi
+++ b/arch/arc/boot/dts/axc003.dtsi
@@ -100,4 +100,18 @@
device_type = "memory";
reg = <0x8000 0x2000>;  /* 512MiB */
};
+
+   reserved-memory {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges;
+   /*
+* Move frame buffer out of IOC aperture (0x8z-0xAz).
+*/
+   frame_buffer: frame_buffer@a000 {
+   compatible = "shared-dma-pool";
+   reg = <0xa000 0x100>;
+   no-map;
+   };
+   };
 };
diff --git a/arch/arc/boot/dts/axc003_idu.dtsi 
b/arch/arc/boot/dts/axc003_idu.dtsi
index 06a9f29..929ec8c 100644
--- a/arch/arc/boot/dts/axc003_idu.dtsi
+++ b/arch/arc/boot/dts/axc003_idu.dtsi
@@ -123,4 +123,18 @@
device_type = "memory";
reg = <0x8000 0x2000>;  /* 512MiB */
};
+
+   reserved-memory {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges;
+   /*
+* Move frame buffer out of IOC aperture (0x8z-0xAz).
+*/
+   frame_buffer: frame_buffer@a000 {
+   compatible = "shared-dma-pool";
+   reg = <0xa000 0x100>;
+   no-map;
+   };
+   };
 };
diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi
index 823f15c..64b063d 100644
--- a/arch/arc/boot/dts/axs10x_mb.dtsi
+++ b/arch/arc/boot/dts/axs10x_mb.dtsi
@@ -283,7 +283,7 @@
encoder-slave = <&adv7511>;
clocks = <&pguclk>;
clock-names = "pxlclk";
-
+   memory-region = <&frame_buffer>;
port {
pgu_output: endpoint {
remote-endpoint = <&adv7511_input>;
-- 
2.5.5


___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: Misleading hint to select CONFIG_PERF_EVENTS if driver sets PERF_PMU_CAP_NO_INTERRUPT

2016-04-27 Thread Lada Trimasova
On Tue, 2016-04-26 at 12:42 +, Vineet Gupta wrote:

On Friday 22 April 2016 06:56 PM, Lada Trimasova wrote:
I think what we have now is sufficient - but u seem to want a prettier failure 
output.

Anyhow, this print is coming from util/evsel.c: perf_evsel__open_strerror()
At the very least you want another entry in switch case for ENOTSUPP and then
check if event was sampling one (
evsel->attr.sample_period) - use that as a hint for saying sampling events not
supported.




ENOTSUPP is not visible for user programs. So it's impossible to add this entry

to mentioned switch.

I think that there is no good way to make error message more understandable

without breaking existing api.


But this will print the same even if CONFIG_PERF_EVENTS=n. To really fix this 
you
would want to change the error code returned by SYSCALL_DEFINE5(perf_event_open
for PERF_PMU_CAP_NO_INTERRUPT to say -EOPNOTSUPP and use the sample_period to 
say
this was for samplign events! However this is an ABI change and might not be
acceptable as some existing scripts etc might break.



/bin/dmesg may provide additional information.
No CONFIG_PERF_EVENTS=y kernel support configured?
->8---

As you can see the root cause of this error message is not obvious.
CONFIG_PERF_EVENTS is selected but still there's a problem while
existing suggestion barely makes any sense.
So probably there could be a way to determine if CONFIG_PERF_EVENTS was
selected or not.

I am not sure about the correct way of solving this problem. Maybe I
should add some checks of syscalls return values and give user
a warning when not PMU interrupts are available.
Any suggestions are appreciated.

Regards,
Lada Trimasova.
___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc





Regards,

Lada.
___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: [PATCH 0/2 v6] Add I2S audio support for ARC AXS10x boards

2016-04-27 Thread Mark Brown
On Wed, Apr 27, 2016 at 11:05:18AM +0100, Jose Abreu wrote:
> ARC AXS10x platforms consist of a mainboard with several peripherals.
> One of those peripherals is an HDMI output port controlled by the ADV7511
> transmitter.
> 
> This patch set adds I2S audio for the AXS10x platform.

I don't seem to have the second patch here.


signature.asc
Description: PGP signature
___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH 2/2 v6] ASoC: dwc: Update DOCUMENTATION for I2S Driver

2016-04-27 Thread Jose Abreu
Hi Mark,

Sorry. Follows bellow.

On 27-04-2016 11:05, Jose Abreu wrote:
> This patch updates documentation for the Designware I2S
> driver.
>
> Signed-off-by: Jose Abreu 
> Acked-by: Rob Herring 
> Cc: Rob Herring 
> Cc: Carlos Palminha 
> Cc: Alexey Brodkin 
> Cc: devicet...@vger.kernel.org
> Cc: linux-snps-arc@lists.infradead.org
> Cc: alsa-de...@alsa-project.org
> Cc: linux-ker...@vger.kernel.org
> ---
>
> No changes v5 -> v6.
>
> Changes v4 -> v5:
> * interrupts is now required property
> * Drop 'snps-use-dmaengine' property
>
> This patch was only introduced in v4.
>
>  Documentation/devicetree/bindings/sound/designware-i2s.txt | 9 +++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/sound/designware-i2s.txt 
> b/Documentation/devicetree/bindings/sound/designware-i2s.txt
> index 7bb5424..27a728f 100644
> --- a/Documentation/devicetree/bindings/sound/designware-i2s.txt
> +++ b/Documentation/devicetree/bindings/sound/designware-i2s.txt
> @@ -3,14 +3,18 @@ DesignWare I2S controller
>  Required properties:
>   - compatible : Must be "snps,designware-i2s"
>   - reg : Must contain the I2S core's registers location and length
> + - interrupts:  where IRQ is the interrupt number.
>   - clocks : Pairs of phandle and specifier referencing the controller's
> clocks. The controller expects one clock: the clock used as the sampling
> rate reference clock sample.
>   - clock-names : "i2sclk" for the sample rate reference clock.
> +
> +Optional properties:
>   - dmas: Pairs of phandle and specifier for the DMA channels that are used by
> the core. The core expects one or two dma channels: one for transmit and
> -   one for receive.
> - - dma-names : "tx" for the transmit channel, "rx" for the receive channel.
> +   one for receive. Set this parameter if the I2S DMA block is enabled.
> + - dma-names : "tx" for the transmit channel, "rx" for the receive channel. 
> Set
> +   this parameter if the I2S DMA block is enabled.
>  
>  For more details on the 'dma', 'dma-names', 'clock' and 'clock-names'
>  properties please check:
> @@ -23,6 +27,7 @@ Example:
>   soc_i2s: i2s@7ff9 {
>   compatible = "snps,designware-i2s";
>   reg = <0x0 0x7ff9 0x0 0x1000>;
> + interrupts = <15>;
>   clocks = <&scpi_i2sclk 0>;
>   clock-names = "i2sclk";
>   #sound-dai-cells = <0>;


___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: [PATCH 2/2 v6] ASoC: dwc: Update DOCUMENTATION for I2S Driver

2016-04-27 Thread Mark Brown
On Wed, Apr 27, 2016 at 06:32:42PM +0100, Jose Abreu wrote:
> Hi Mark,
> 
> Sorry. Follows bellow.
> 
> On 27-04-2016 11:05, Jose Abreu wrote:

I can't apply a quote of a patch, please resend.


signature.asc
Description: PGP signature
___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH 2/2] ARC: [axs10x] Specify reserved memory for frame buffer

2016-04-27 Thread Vineet Gupta
On Wednesday 27 April 2016 08:05 PM, Alexey Brodkin wrote:
> Allocation of a frame buffer memory in a special memory region
> allows bypassing of so-called IO Coherency aperture
> which is typically set as a range 0x8z-0xAz.
> 
> I.e. all data traffic to PGU bypasses IO Coherency block
> and saves its bandwidth for other peripherals.
> 
> Even though for AXS101 (which sorts ARC770 CPU) IOC is not
> an option for a sake of keeping one DT description for the
> base-board (axs10x_mb.dtsi) we're still defining reserved
> memory location in the very end of DDR.
> 
> Signed-off-by: Alexey Brodkin 
> Cc: devicet...@vger.kernel.org
> ---
>  arch/arc/boot/dts/axc001.dtsi | 20 +++-
>  arch/arc/boot/dts/axc003.dtsi | 14 ++
>  arch/arc/boot/dts/axc003_idu.dtsi | 14 ++
>  arch/arc/boot/dts/axs10x_mb.dtsi  |  2 +-
>  4 files changed, 48 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arc/boot/dts/axc001.dtsi b/arch/arc/boot/dts/axc001.dtsi
> index 420dcfd..ae6162d 100644
> --- a/arch/arc/boot/dts/axc001.dtsi
> +++ b/arch/arc/boot/dts/axc001.dtsi
> @@ -95,6 +95,24 @@
>   #size-cells = <1>;
>   ranges = <0x 0x8000 0x4000>;
>   device_type = "memory";
> - reg = <0x8000 0x2000>;  /* 512MiB */
> + reg = <0x8000 0x1f00>;  /* 512 - 16 MiB */

Is 16MB fixed size or is this a function of display resolution / density etc.

> + };
> +
> + reserved-memory {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> + /*
> +  * We just move frame buffer area to the very end of
> +  * available DDR. And even though in case of ARC770 there's
> +  * no strict requirement for a frame-buffer to be in any
> +  * particular location it allows us to use the same
> +  * base board's DT node for ARC PGU as for ARc HS38.
> +  */
> + frame_buffer: frame_buffer@9f00 {
> + compatible = "shared-dma-pool";
> + reg = <0x9f00 0x100>;
> + no-map;
> + };
>   };
>  };
> diff --git a/arch/arc/boot/dts/axc003.dtsi b/arch/arc/boot/dts/axc003.dtsi
> index f90fadf..c7a95c2 100644
> --- a/arch/arc/boot/dts/axc003.dtsi
> +++ b/arch/arc/boot/dts/axc003.dtsi
> @@ -100,4 +100,18 @@
>   device_type = "memory";
>   reg = <0x8000 0x2000>;  /* 512MiB */
>   };
> +
> + reserved-memory {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> + /*
> +  * Move frame buffer out of IOC aperture (0x8z-0xAz).
> +  */
> + frame_buffer: frame_buffer@a000 {
> + compatible = "shared-dma-pool";
> + reg = <0xa000 0x100>;

Can this be made a bit more future safe. AXS103 has 1 GB of DDR while kernel
currently only uses 512M. Once we increase that, this will need fixing too. 
Better
to make this as far possible. Note that the IOC start alignment needs to follow
max(4k, size). What will be maximum size of frame buffer - 16M always !

Same for the idu DT below !

> + no-map;
> + };
> + };
>  };
> diff --git a/arch/arc/boot/dts/axc003_idu.dtsi 
> b/arch/arc/boot/dts/axc003_idu.dtsi
> index 06a9f29..929ec8c 100644
> --- a/arch/arc/boot/dts/axc003_idu.dtsi
> +++ b/arch/arc/boot/dts/axc003_idu.dtsi
> @@ -123,4 +123,18 @@
>   device_type = "memory";
>   reg = <0x8000 0x2000>;  /* 512MiB */
>   };
> +
> + reserved-memory {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> + /*
> +  * Move frame buffer out of IOC aperture (0x8z-0xAz).
> +  */
> + frame_buffer: frame_buffer@a000 {
> + compatible = "shared-dma-pool";
> + reg = <0xa000 0x100>;
> + no-map;
> + };
> + };
>  };
> diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi 
> b/arch/arc/boot/dts/axs10x_mb.dtsi
> index 823f15c..64b063d 100644
> --- a/arch/arc/boot/dts/axs10x_mb.dtsi
> +++ b/arch/arc/boot/dts/axs10x_mb.dtsi
> @@ -283,7 +283,7 @@
>   encoder-slave = <&adv7511>;
>   clocks = <&pguclk>;
>   clock-names = "pxlclk";
> -
> + memory-region = <&frame_buffer>;
>   port {
>   pgu_output: endpoint {
>   remote-endpoint = <&adv7511_input>;
> 


___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: Misleading hint to select CONFIG_PERF_EVENTS if driver sets PERF_PMU_CAP_NO_INTERRUPT

2016-04-27 Thread Vineet Gupta
On Wednesday 27 April 2016 08:43 PM, Lada Trimasova wrote:
> On Tue, 2016-04-26 at 12:42 +, Vineet Gupta wrote:
> 
> On Friday 22 April 2016 06:56 PM, Lada Trimasova wrote:
> I think what we have now is sufficient - but u seem to want a prettier 
> failure output.
> 
> Anyhow, this print is coming from util/evsel.c: perf_evsel__open_strerror()
> At the very least you want another entry in switch case for ENOTSUPP and then
> check if event was sampling one (
> evsel->attr.sample_period) - use that as a hint for saying sampling events not
> supported.
> 
> 
> 
> 
> ENOTSUPP is not visible for user programs. So it's impossible to add this 
> entry
> 
> to mentioned switch.
> 
> I think that there is no good way to make error message more understandable
> 
> without breaking existing api.

I meant EOPNOTSUPP. Any errno value has to be visible to user programs otherwise
there is no point defining it.

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc