[PATCH 4/4 v7] ASoC: dwc: Add irq parameter to DOCUMENTATION

2016-05-23 Thread Jose Abreu
A parameter description for the interruptions of the
I2S controller was added. This interrupt parameter
should only be set when I2S does not have DMA support.

Signed-off-by: Jose Abreu 
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
---

Changes v6 -> v7:
* interrupts is now optional property

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 | 4 
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/designware-i2s.txt 
b/Documentation/devicetree/bindings/sound/designware-i2s.txt
index 7bb5424..6a536d5 100644
--- a/Documentation/devicetree/bindings/sound/designware-i2s.txt
+++ b/Documentation/devicetree/bindings/sound/designware-i2s.txt
@@ -12,6 +12,10 @@ Required properties:
one for receive.
  - dma-names : "tx" for the transmit channel, "rx" for the receive channel.
 
+Optional properties:
+ - interrupts: The interrupt line number for the I2S controller. Add this
+   parameter if the I2S controller that you are using does not support DMA.
+
 For more details on the 'dma', 'dma-names', 'clock' and 'clock-names'
 properties please check:
* resource-names.txt
-- 
1.9.1



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


[PATCH 3/4 v7] ASoC: dwc: Add PIO PCM extension

2016-05-23 Thread Jose Abreu
A PCM extension was added to I2S driver so that audio
samples are transferred using PIO mode.

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

Although the mainline I2S driver uses ALSA DMA engine the
I2S controller can be built without DMA support, therefore
this is the reason why this extension was added.

The selection between the use of DMA engine or PIO mode
is detected by declaring or not the interrupt parameters
in the DT and using Kconfig.

Signed-off-by: Jose Abreu 
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
---

Changes v6 -> v7:
* Discard the use of memcpy
* Report IRQ_HANDLED only when there is an IRQ
* Use interrupts to check if PIO mode is in use
* Unmask interrupts only when in PIO mode
* Remove empty functions

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 |   5 +-
 sound/soc/dwc/designware_i2s.c | 148 ---
 sound/soc/dwc/designware_pcm.c | 220 +
 sound/soc/dwc/local.h  | 122 +++
 5 files changed, 415 insertions(+), 89 deletions(-)
 create mode 100644 sound/soc/dwc/designware_pcm.c
 create mode 100644 sound/soc/dwc/local.h

diff --git a/sound/soc/dwc/Kconfig b/sound/soc/dwc/Kconfig
index d50e085..c6fd95f 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
+   bool "PCM PIO extension for I2S driver"
+   depends on SND_DESIGNWARE_I2S
+   help
+Say Y or N if you want to add a custom ALSA extension that registers
+a PCM and uses PIO to transfer data.
+
+This functionality is specially suited for I2S devices that don't have
+DMA support.
 
diff --git a/sound/soc/dwc/Makefile b/sound/soc/dwc/Makefile
index 319371f..11ea966 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_I2S) += dwc_i2s.o
+dwc_i2s-y := designware_i2s.o
+dwc_i2s-$(CONFIG_SND_DESIGNWARE_PCM) += designware_pcm.o
diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c
index a97be8e..d4c3811 100644
--- a/sound/soc/dwc/designware_i2s.c
+++ b/sound/soc/dwc/designware_i2s.c
@@ -24,90 +24,7 @@
 #include 
 #include 
 #include 
-
-/* common register for all channel */
-#define IER0x000
-#define IRER   0x004
-#define ITER   0x008
-#define CER0x00C
-#define CCR0x010
-#define RXFFR  0x014
-#define TXFFR  0x018
-
-/* I2STxRxRegisters for all channels */
-#define LRBR_LTHR(x)   (0x40 * x + 0x020)
-#define RRBR_RTHR(x)   (0x40 * x + 0x024)
-#define RER(x) (0x40 * x + 0x028)
-#define TER(x) (0x40 * x + 0x02C)
-#define RCR(x) (0x40 * x + 0x030)
-#define TCR(x) (0x40 * x + 0x034)
-#define ISR(x) (0x40 * x + 0x038)
-#define IMR(x) (0x40 * x + 0x03C)
-#define ROR(x) (0x40 * x + 0x040)
-#define TOR(x) (0x40 * x + 0x044)
-#define RFCR(x)(0x40 * x + 0x048)
-#define TFCR(x)(0x40 * x + 0x04C)
-#define RFF(x) (0x40 * x + 0x050)
-#define TFF(x) (0x40 * x + 0x054)
-
-/* I2SCOMPRegisters */
-#define I2S_COMP_PARAM_2   0x01F0
-#define I2S_COMP_PARAM_1   0x01F4
-#define I2S_COMP_VERSION   0x01F8
-#define I2S_COMP_TYPE  0x01FC
-
-/*
- * Component parameter register fields - define the I2S block's
- * configuration.
- */
-#defineCOMP1_TX_WORDSIZE_3(r)  (((r) & GENMASK(27, 25)) >> 25)
-#defineCOMP1_TX_WORDSIZE_2(r)  (((r) & GENMASK(24, 22)) >> 22)
-#defineCOMP1_TX_WORDSIZE_1(r)  (((r) & GENMASK(21, 19)) >> 19)
-#defineCOMP1_TX_WORDSIZE_0(r)  (((r) & GENMASK(18, 16)) >> 16)
-#defineCOMP1_TX_CHANNELS(r)(((r) & GENMASK(10, 9)) >> 9)
-#defineCOMP1_RX_CHANNELS(r)(((r) & GENMASK(8, 7)) >> 7)
-#defineCOMP1_RX_ENABLED(r) (((r) & BIT(6)) >> 6)
-#defineCOMP1_TX_ENABLED(r) (((r) & BIT(5)) >

[PATCH 1/4 v7] ASoC: dwc: Add helper functions to disable/enable irqs

2016-05-23 Thread Jose Abreu
Helper functions to disable and enable the I2S interrupts were
added. Only the interrupts of the used channels are enabled.

Also, there is no need to enable irqs at dw_i2s_config(), they
are already enabled at startup.

Signed-off-by: Jose Abreu 
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
---

This patch was only introduced in v7.

 sound/soc/dwc/designware_i2s.c | 68 +-
 1 file changed, 41 insertions(+), 27 deletions(-)

diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c
index 0db69b7..4c4f0dc 100644
--- a/sound/soc/dwc/designware_i2s.c
+++ b/sound/soc/dwc/designware_i2s.c
@@ -145,26 +145,54 @@ static inline void i2s_clear_irqs(struct dw_i2s_dev *dev, 
u32 stream)
}
 }
 
-static void i2s_start(struct dw_i2s_dev *dev,
- struct snd_pcm_substream *substream)
+static inline void i2s_disable_irqs(struct dw_i2s_dev *dev, u32 stream,
+   int chan_nr)
 {
-   struct i2s_clk_config_data *config = &dev->config;
u32 i, irq;
-   i2s_write_reg(dev->i2s_base, IER, 1);
 
-   if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
-   for (i = 0; i < (config->chan_nr / 2); i++) {
+   if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
+   for (i = 0; i < (chan_nr / 2); i++) {
+   irq = i2s_read_reg(dev->i2s_base, IMR(i));
+   i2s_write_reg(dev->i2s_base, IMR(i), irq | 0x30);
+   }
+   } else {
+   for (i = 0; i < (chan_nr / 2); i++) {
+   irq = i2s_read_reg(dev->i2s_base, IMR(i));
+   i2s_write_reg(dev->i2s_base, IMR(i), irq | 0x03);
+   }
+   }
+}
+
+static inline void i2s_enable_irqs(struct dw_i2s_dev *dev, u32 stream,
+  int chan_nr)
+{
+   u32 i, irq;
+
+   if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
+   for (i = 0; i < (chan_nr / 2); i++) {
irq = i2s_read_reg(dev->i2s_base, IMR(i));
i2s_write_reg(dev->i2s_base, IMR(i), irq & ~0x30);
}
-   i2s_write_reg(dev->i2s_base, ITER, 1);
} else {
-   for (i = 0; i < (config->chan_nr / 2); i++) {
+   for (i = 0; i < (chan_nr / 2); i++) {
irq = i2s_read_reg(dev->i2s_base, IMR(i));
i2s_write_reg(dev->i2s_base, IMR(i), irq & ~0x03);
}
-   i2s_write_reg(dev->i2s_base, IRER, 1);
}
+}
+
+static void i2s_start(struct dw_i2s_dev *dev,
+ struct snd_pcm_substream *substream)
+{
+   struct i2s_clk_config_data *config = &dev->config;
+
+   i2s_write_reg(dev->i2s_base, IER, 1);
+   i2s_enable_irqs(dev, substream->stream, config->chan_nr);
+
+   if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+   i2s_write_reg(dev->i2s_base, ITER, 1);
+   else
+   i2s_write_reg(dev->i2s_base, IRER, 1);
 
i2s_write_reg(dev->i2s_base, CER, 1);
 }
@@ -172,24 +200,14 @@ static void i2s_start(struct dw_i2s_dev *dev,
 static void i2s_stop(struct dw_i2s_dev *dev,
struct snd_pcm_substream *substream)
 {
-   u32 i = 0, irq;
 
i2s_clear_irqs(dev, substream->stream);
-   if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+   if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
i2s_write_reg(dev->i2s_base, ITER, 0);
-
-   for (i = 0; i < 4; i++) {
-   irq = i2s_read_reg(dev->i2s_base, IMR(i));
-   i2s_write_reg(dev->i2s_base, IMR(i), irq | 0x30);
-   }
-   } else {
+   else
i2s_write_reg(dev->i2s_base, IRER, 0);
 
-   for (i = 0; i < 4; i++) {
-   irq = i2s_read_reg(dev->i2s_base, IMR(i));
-   i2s_write_reg(dev->i2s_base, IMR(i), irq | 0x03);
-   }
-   }
+   i2s_disable_irqs(dev, substream->stream, 8);
 
if (!dev->active) {
i2s_write_reg(dev->i2s_base, CER, 0);
@@ -223,7 +241,7 @@ static int dw_i2s_startup(struct snd_pcm_substream 
*substream,
 
 static void dw_i2s_config(struct dw_i2s_dev *dev, int stream)
 {
-   u32 ch_reg, irq;
+   u32 ch_reg;
struct i2s_clk_config_data *config = &dev->config;
 
 
@@ -235,16 +253,12 @@ static void dw_i2s_config(struct dw_i2s_dev *dev, int 
stream)
  dev->xfer_resolution);
i2s_write_reg(dev->i2s_base, TFCR(ch_reg),
  dev->fifo_th - 1);
-   irq = i2s_read_reg(dev->i2s_base, IMR(ch_reg));
-

[PATCH 2/4 v7] ASoC: dwc: Do not use devm_clk_get() if using platform data

2016-05-23 Thread Jose Abreu
When using platform data the devm_clk_get() function is
called causing a probe failure if the clock is not
declared. As we can pass the clock handler by platform
data call only devm_clk_get() when platform data is not
used.

Signed-off-by: Jose Abreu 
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
---

This patch was only introduced in v7.

 sound/soc/dwc/designware_i2s.c | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c
index 4c4f0dc..a97be8e 100644
--- a/sound/soc/dwc/designware_i2s.c
+++ b/sound/soc/dwc/designware_i2s.c
@@ -690,15 +690,16 @@ static int dw_i2s_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "no clock configure 
method\n");
return -ENODEV;
}
-   }
-   dev->clk = devm_clk_get(&pdev->dev, clk_id);
+   } else {
+   dev->clk = devm_clk_get(&pdev->dev, clk_id);
 
-   if (IS_ERR(dev->clk))
-   return PTR_ERR(dev->clk);
+   if (IS_ERR(dev->clk))
+   return PTR_ERR(dev->clk);
 
-   ret = clk_prepare_enable(dev->clk);
-   if (ret < 0)
-   return ret;
+   ret = clk_prepare_enable(dev->clk);
+   if (ret < 0)
+   return ret;
+   }
}
 
dev_set_drvdata(&pdev->dev, dev);
-- 
1.9.1



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


[PATCH 0/4 v7] Add I2S audio support for ARC AXS10x boards

2016-05-23 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.

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.

Changes v6 -> v7:
* Discard the use of memcpy
* Report IRQ_HANDLED only when there is an IRQ
* Use interrupts to check if PIO mode is in use
* Unmask interrupts only when in PIO mode
* Remove empty functions

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)


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 (4):
  ASoC: dwc: Add helper functions to disable/enable irqs
  ASoC: dwc: Do not use devm_clk_get() if using platform data
  ASoC: dwc: Add PIO PCM extension
  ASoC: dwc: Add irq parameter to DOCUMENTATION

 .../devicetree/bindings/sound/designware-i2s.txt   |   4 +
 sound/soc/dwc/Kconfig  |   9 +
 sound/soc/dwc/Makefile |   5 +-
 sound/soc/dwc/designware_i2s.c | 229 ++---
 sound/soc/dwc/designware_pcm.c | 220 
 sound/soc/dwc/local.h  | 122 +++
 6 files changed, 467 insertions(+), 122 deletions(-)
 create mode 100644 sound/soc/dwc/designware_pcm.c
 create mode 100644 sound/soc/dwc/local.h

-- 
1.9.1



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


Re: [GIT PULL] drm/arcpgu: use dedicated memory area for frame buffer

2016-05-23 Thread Alexey Brodkin
Hi Dave,

On Mon, 2016-05-16 at 08:22 +, Alexey Brodkin wrote:
> Hi Dave,
> 
> On Tue, 2016-05-10 at 09:51 +, Alexey Brodkin wrote:
> > 
> > Hi Dave,
> > 
> > On Fri, 2016-04-29 at 11:36 +, Alexey Brodkin wrote:
> > > 
> > > 
> > > Hi Dave,
> > > 
> > > Please pull this mini-series that allows ARC PGU to use
> > > dedicated memory location as framebuffer backing storage.
> > > 
> > > v2 of that series was reviewed here
> > > https://lists.freedesktop.org/archives/dri-devel/2016-April/106279.html
> > > 
> > > It is based on top of today's drm-next branch.
> > > 
> > > Best regards,
> > > Alexey
> > > 
> > > The following changes since commit 
> > > b89359bdf0f1e95a4c5f92300594ba9dde323fc4:
> > > 
> > >   Merge branch 'for-next' of http://git.agner.ch/git/linux-drm-fsl-dcu 
> > > into drm-next (2016-04-29 14:57:51 +1000)
> > > 
> > > are available in the git repository at:
> > > 
> > >   https://github.com/foss-for-synopsys-dwc-arc-processors/linux.git 
> > > topic-arcpgu-updates
> > > 
> > > for you to fetch changes up to cb2ad5e5339c5122166265cea579cc6a356d46de:
> > > 
> > >   ARC: [axs10x] Specify reserved memory for frame buffer (2016-04-29 
> > > 14:34:13 +0300)
> > > 
> > > 
> > > 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 | 22 --
> > >  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, 55 insertions(+), 3 deletions(-)
> > Could you please take a look at this pull request?
> Another polite reminder.

Could you please pull this one?
Indeed it was created quite some time ago so if required I may
rebase it on top of whatever current you'd like.

Alternatively you may just apply the first patch from the series
(could be found here 
https://lists.freedesktop.org/archives/dri-devel/2016-April/106280.html)
and the second patch will be picked up by ARC maintainer (Vineet Gupta).

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

[PATCH] ldso: Force disable -mlong-calls when compiling ldso for ARC

2016-05-23 Thread Alexey Brodkin
Even though by default for ARC uClibc gets compiled with
disabled long-calls user may provide UCLIBC_EXTRA_CFLAGS
with "-mlong-calls". With this option uClibc will be
successfully compiled but later it will fail in runtime
because dynamic loader cannot deal with relocations
at least very early on its start.

In particular it will be seen as call to non-relocated
symbol _dl_parse_dynamic_info() which ends-up as a segfault
like this:
>8
potentially unexpected fatal signal 11.
Path: /bin/test
CPU: 0 PID: 63 Comm: test Not tainted 4.5.2 #7
task: 9f13f180 ti: 9f166000 task.ti: 9f166000

[ECR   ]: 0x0004 => Insn could not be fetched
[EFA   ]: 0x283c
[BLINK ]: 0x2000407c
[ERET  ]: 0x283c
@No matching VMA found
[STAT32]: 0x8008009e : IE U
BTA: 0x283c  SP: 0x5fef5ccc  FP: 0x
LPS: 0x20004080 LPE: 0x20004064 LPC: 0x
r00: 0x20006684 r01: 0x5fef5db0 r02: 0x
r03: 0x2000 r04: 0x80808080 r05: 0x2f2f2f2f
r06: 0x41464d00 r07: 0x0080 r08: 0x00dd
r09: 0x r10: 0x0073 r11: 0x80808080
r12: 0x2000407c r13: 0x2000 r14: 0x5fef5e74
r15: 0x000ceb3c r16: 0x5fef5e7c r17: 0x5fef5d44
r18: 0x000ceb0c r19: 0x r20: 0x000ceb1c
r21: 0x r22: 0x r23: 0x000d08a5
r24: 0x r25: 0x80808080

Segmentation fault
>8

Solution to this issue is simple we make sure dynamic
loader never gets compiled with "-mlong-calls" by forcing
"-mno-long-calls" on it.

Signed-off-by: Alexey Brodkin 
Cc: Vineet Gupta 
Cc: Anton Kolesov 
Cc: linux-snps-arc@lists.infradead.org
---
 ldso/ldso/Makefile.in | 4 
 1 file changed, 4 insertions(+)

diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in
index d85646a..dde6a53 100644
--- a/ldso/ldso/Makefile.in
+++ b/ldso/ldso/Makefile.in
@@ -34,6 +34,10 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g
 
 CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
 
+ifeq ($(TARGET_ARCH),arc)
+CFLAGS-ldso.c += -mno-long-calls
+endif
+
 LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-$(UCLIBC_LDSO_NAME).so := -Wl,--dsbt-index=1
 ifneq ($(SUPPORT_LD_DEBUG),y)
 LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS)
-- 
2.5.5


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


Re: [PATCH 2/4 v7] ASoC: dwc: Do not use devm_clk_get() if using platform data

2016-05-23 Thread Mark Brown
On Mon, May 23, 2016 at 11:02:23AM +0100, Jose Abreu wrote:

> When using platform data the devm_clk_get() function is
> called causing a probe failure if the clock is not
> declared. As we can pass the clock handler by platform
> data call only devm_clk_get() when platform data is not
> used.

No, this is broken - if the device needs a clock the device needs a
clock and clock names should be static rather than passed in via
platform data (indeed NULL is a perfectly valid clock name).  The system
integation should map in a clock as needed, if it's just a fixed crystal
or something then just register a fixed clock and connect it up.


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

Applied "ASoC: dwc: Add helper functions to disable/enable irqs" to the asoc tree

2016-05-23 Thread Mark Brown
The patch

   ASoC: dwc: Add helper functions to disable/enable irqs

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From df4e7be1832a1ca9fccfb2ed8771a17da6f7fa57 Mon Sep 17 00:00:00 2001
From: Jose Abreu 
Date: Mon, 23 May 2016 11:02:22 +0100
Subject: [PATCH] ASoC: dwc: Add helper functions to disable/enable irqs

Helper functions to disable and enable the I2S interrupts were
added. Only the interrupts of the used channels are enabled.

Also, there is no need to enable irqs at dw_i2s_config(), they
are already enabled at startup.

Signed-off-by: Jose Abreu 
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
Signed-off-by: Mark Brown 
---
 sound/soc/dwc/designware_i2s.c | 68 +-
 1 file changed, 41 insertions(+), 27 deletions(-)

diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c
index 0db69b7e9617..4c4f0dc24f10 100644
--- a/sound/soc/dwc/designware_i2s.c
+++ b/sound/soc/dwc/designware_i2s.c
@@ -145,26 +145,54 @@ static inline void i2s_clear_irqs(struct dw_i2s_dev *dev, 
u32 stream)
}
 }
 
-static void i2s_start(struct dw_i2s_dev *dev,
- struct snd_pcm_substream *substream)
+static inline void i2s_disable_irqs(struct dw_i2s_dev *dev, u32 stream,
+   int chan_nr)
 {
-   struct i2s_clk_config_data *config = &dev->config;
u32 i, irq;
-   i2s_write_reg(dev->i2s_base, IER, 1);
 
-   if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
-   for (i = 0; i < (config->chan_nr / 2); i++) {
+   if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
+   for (i = 0; i < (chan_nr / 2); i++) {
+   irq = i2s_read_reg(dev->i2s_base, IMR(i));
+   i2s_write_reg(dev->i2s_base, IMR(i), irq | 0x30);
+   }
+   } else {
+   for (i = 0; i < (chan_nr / 2); i++) {
+   irq = i2s_read_reg(dev->i2s_base, IMR(i));
+   i2s_write_reg(dev->i2s_base, IMR(i), irq | 0x03);
+   }
+   }
+}
+
+static inline void i2s_enable_irqs(struct dw_i2s_dev *dev, u32 stream,
+  int chan_nr)
+{
+   u32 i, irq;
+
+   if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
+   for (i = 0; i < (chan_nr / 2); i++) {
irq = i2s_read_reg(dev->i2s_base, IMR(i));
i2s_write_reg(dev->i2s_base, IMR(i), irq & ~0x30);
}
-   i2s_write_reg(dev->i2s_base, ITER, 1);
} else {
-   for (i = 0; i < (config->chan_nr / 2); i++) {
+   for (i = 0; i < (chan_nr / 2); i++) {
irq = i2s_read_reg(dev->i2s_base, IMR(i));
i2s_write_reg(dev->i2s_base, IMR(i), irq & ~0x03);
}
-   i2s_write_reg(dev->i2s_base, IRER, 1);
}
+}
+
+static void i2s_start(struct dw_i2s_dev *dev,
+ struct snd_pcm_substream *substream)
+{
+   struct i2s_clk_config_data *config = &dev->config;
+
+   i2s_write_reg(dev->i2s_base, IER, 1);
+   i2s_enable_irqs(dev, substream->stream, config->chan_nr);
+
+   if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+   i2s_write_reg(dev->i2s_base, ITER, 1);
+   else
+   i2s_write_reg(dev->i2s_base, IRER, 1);
 
i2s_write_reg(dev->i2s_base, CER, 1);
 }
@@ -172,24 +200,14 @@ static void i2s_start(struct dw_i2s_dev *dev,
 static void i2s_stop(struct dw_i2s_dev *dev,
struct snd_pcm_substream *substream)
 {
-   u32 i = 0, irq;
 
i2s_clear_irqs(dev, substream->stream);
-   if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+   if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
i2s_write_reg(dev->i2s_base, ITER, 0);
-
-   for (i = 0; i < 4; i++) {
-   irq = i2s_read_reg(dev->i2s_base, IMR(i));
-

Re: [GIT PULL] drm/arcpgu: use dedicated memory area for frame buffer

2016-05-23 Thread David Airlie



- Original Message -
> From: "Alexey Brodkin" 
> To: airl...@redhat.com, dan...@ffwll.ch, "Vineet Gupta" 
> , airl...@linux.ie
> Cc: dri-de...@lists.freedesktop.org, linux-ker...@vger.kernel.org, 
> linux-snps-arc@lists.infradead.org
> Sent: Monday, 23 May, 2016 8:31:41 PM
> Subject: Re: [GIT PULL] drm/arcpgu: use dedicated memory area for frame buffer
> 
> Hi Dave,
> 
> On Mon, 2016-05-16 at 08:22 +, Alexey Brodkin wrote:
> > Hi Dave,
> > 
> > On Tue, 2016-05-10 at 09:51 +, Alexey Brodkin wrote:
> > > 
> > > Hi Dave,
> > > 
> > > On Fri, 2016-04-29 at 11:36 +, Alexey Brodkin wrote:
> > > > 
> > > > 
> > > > Hi Dave,
> > > > 
> > > > Please pull this mini-series that allows ARC PGU to use
> > > > dedicated memory location as framebuffer backing storage.
> > > > 
> > > > v2 of that series was reviewed here
> > > > https://lists.freedesktop.org/archives/dri-devel/2016-April/106279.html
> > > > 
> > > > It is based on top of today's drm-next branch.
> > > > 
> > > > Best regards,
> > > > Alexey
> > > > 
> > > > The following changes since commit
> > > > b89359bdf0f1e95a4c5f92300594ba9dde323fc4:
> > > > 
> > > >   Merge branch 'for-next' of http://git.agner.ch/git/linux-drm-fsl-dcu
> > > >   into drm-next (2016-04-29 14:57:51 +1000)
> > > > 
> > > > are available in the git repository at:
> > > > 
> > > >   https://github.com/foss-for-synopsys-dwc-arc-processors/linux.git
> > > >   topic-arcpgu-updates
> > > > 
> > > > for you to fetch changes up to
> > > > cb2ad5e5339c5122166265cea579cc6a356d46de:
> > > > 
> > > >   ARC: [axs10x] Specify reserved memory for frame buffer (2016-04-29
> > > >   14:34:13 +0300)
> > > > 
> > > > 
> > > > 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 | 22 --
> > > >  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, 55 insertions(+), 3 deletions(-)
> > > Could you please take a look at this pull request?
> > Another polite reminder.
> 
> Could you please pull this one?
> Indeed it was created quite some time ago so if required I may
> rebase it on top of whatever current you'd like.
> 
> Alternatively you may just apply the first patch from the series
> (could be found here
>  https://lists.freedesktop.org/archives/dri-devel/2016-April/106280.html)
> and the second patch will be picked up by ARC maintainer (Vineet Gupta).

I thought I did pull this, please check drm-next.


Dave.

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

Re: [GIT PULL] drm/arcpgu: use dedicated memory area for frame buffer

2016-05-23 Thread Alexey Brodkin
Hi David,

On Mon, 2016-05-23 at 15:23 -0400, David Airlie wrote:
> 
> 
> - Original Message -
> > 
> > From: "Alexey Brodkin" 
> > To: airl...@redhat.com, dan...@ffwll.ch, "Vineet Gupta" 
> > , airl...@linux.ie
> > Cc: dri-de...@lists.freedesktop.org, linux-ker...@vger.kernel.org, 
> > linux-snps-arc@lists.infradead.org
> > Sent: Monday, 23 May, 2016 8:31:41 PM
> > Subject: Re: [GIT PULL] drm/arcpgu: use dedicated memory area for frame 
> > buffer
> > 
> > Alternatively you may just apply the first patch from the series
> > (could be found here
> >  https://lists.freedesktop.org/archives/dri-devel/2016-April/106280.html)
> > and the second patch will be picked up by ARC maintainer (Vineet Gupta).
> I thought I did pull this, please check drm-next.

Oops. Indeed it's in linux-next.
Sorry for that noise. Will double-check linux-next next time before bugging 
people.

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

Re: [PATCH 4/4 v7] ASoC: dwc: Add irq parameter to DOCUMENTATION

2016-05-23 Thread Rob Herring
On Mon, May 23, 2016 at 11:02:25AM +0100, Jose Abreu wrote:
> A parameter description for the interruptions of the
> I2S controller was added. This interrupt parameter
> should only be set when I2S does not have DMA support.
> 
> Signed-off-by: Jose Abreu 
> 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
> ---
> 
> Changes v6 -> v7:
> * interrupts is now optional property
> 
> 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 | 4 
>  1 file changed, 4 insertions(+)

Acked-by: Rob Herring 

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