[PATCH] ASoC: rcar: dma: remove unnecessary "volatile"

2017-03-15 Thread Kuninori Morimoto

From: Kuninori Morimoto 

commit 2a3af642eb20("ASoC: rcar: clear DE bit only in PDMACHCR...")
added rsnd_dmapp_bset(), but it used copy-paste. Thus, it had
unnecessary "volatile", and had below warning on x86.
This patch fix it.

   sound/soc/sh/rcar/dma.c: In function 'rsnd_dmapp_bset':
>> sound/soc/sh/rcar/dma.c:463:21: warning: passing argument 1 of \
   'ioread32' discards 'volatile' qualifier from pointer target \
   type [-Wdiscarded-qualifiers]
 u32 val = ioread32(addr);
^~~~
   In file included from arch/x86/include/asm/io.h:203:0,
from arch/x86/include/asm/realmode.h:5,
from arch/x86/include/asm/acpi.h:33,
from arch/x86/include/asm/fixmap.h:19,
from arch/x86/include/asm/apic.h:10,
from arch/x86/include/asm/smp.h:12,
from include/linux/smp.h:59,
from include/linux/topology.h:33,
from include/linux/gfp.h:8,
from include/linux/idr.h:16,
from include/linux/kernfs.h:14,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/of.h:21,
from include/linux/of_dma.h:16,
from sound/soc/sh/rcar/dma.c:12:
   include/asm-generic/iomap.h:31:21: note: expected 'void *' \
   but argument is of type 'volatile void *'
extern unsigned int ioread32(void __iomem *);
^~~~
Signed-off-by: Kuninori Morimoto 
---
 sound/soc/sh/rcar/dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c
index c2e199b..241cb3b 100644
--- a/sound/soc/sh/rcar/dma.c
+++ b/sound/soc/sh/rcar/dma.c
@@ -459,7 +459,7 @@ static void rsnd_dmapp_bset(struct rsnd_dma *dma, u32 data, 
u32 mask, u32 reg)
struct rsnd_mod *mod = rsnd_mod_get(dma);
struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
struct rsnd_dma_ctrl *dmac = rsnd_priv_to_dmac(priv);
-   volatile void __iomem *addr = rsnd_dmapp_addr(dmac, dma, reg);
+   void __iomem *addr = rsnd_dmapp_addr(dmac, dma, reg);
u32 val = ioread32(addr);
 
val &= ~mask;
-- 
1.9.1



[PATCHv5 3/4] Staging: ks7010: ks_wlan_ioctl.h: Aligning parameters in function prototypes.

2017-03-15 Thread Matthew Giassa
Re-aligning function parameters in function prototypes by inserting
additional hard-tabs to resolve a checkpatch warning.

Signed-off-by: Matthew Giassa 
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 1b68402..1251d7e 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -60,7 +60,7 @@
 
 int ks_wlan_read_config_file(struct ks_wlan_private *priv);
 int ks_wlan_setup_parameter(struct ks_wlan_private *priv,
-unsigned int commit_flag);
+   unsigned int commit_flag);
 
 #endif /* __KERNEL__ */
 
-- 
2.7.4



[PATCHv5 1/4] Staging: ks7010: ks_wlan_ioctl.h: Removed mixed spaces/tabs

2017-03-15 Thread Matthew Giassa
Removing mixed spaces/hard-tabs used to create a "column alignment" of
macro names and macro values.

Signed-off-by: Matthew Giassa 
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 8e62b10..d811680 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -20,8 +20,8 @@
 /* SIOCIWFIRSTPRIV + 2 */
 #define KS_WLAN_GET_FIRM_VERSION   SIOCIWFIRSTPRIV + 3
 #ifdef WPS
-#define KS_WLAN_SET_WPS_ENABLE SIOCIWFIRSTPRIV + 4
-#define KS_WLAN_GET_WPS_ENABLE SIOCIWFIRSTPRIV + 5
+#define KS_WLAN_SET_WPS_ENABLE SIOCIWFIRSTPRIV + 4
+#define KS_WLAN_GET_WPS_ENABLE SIOCIWFIRSTPRIV + 5
 #define KS_WLAN_SET_WPS_PROBE_REQ  SIOCIWFIRSTPRIV + 6
 #endif
 #define KS_WLAN_GET_EEPROM_CKSUM   SIOCIWFIRSTPRIV + 7
-- 
2.7.4



[PATCHv5 4/4] Staging: ks7010: ks_wlan_ioctl.h: Wrap complex macros with parentheses

2017-03-15 Thread Matthew Giassa
Wrapping all complex macros with parentheses to resolve checkpatch
errors. This change, along with the preceding changes in this change
set, resolves all checkpatch warnings and errors for the file.

Signed-off-by: Matthew Giassa 
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 64 +-
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 1251d7e..adc935d 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -15,43 +15,43 @@
 #include 
 /* The low order bit identify a SET (0) or a GET (1) ioctl.  */
 
-/* SIOCIWFIRSTPRIV + 0 */
-/* former KS_WLAN_GET_DRIVER_VERSION   SIOCIWFIRSTPRIV + 1 */
-/* SIOCIWFIRSTPRIV + 2 */
-#define KS_WLAN_GET_FIRM_VERSION   SIOCIWFIRSTPRIV + 3
+/* (SIOCIWFIRSTPRIV + 0) */
+/* former KS_WLAN_GET_DRIVER_VERSION   (SIOCIWFIRSTPRIV + 1) */
+/* (SIOCIWFIRSTPRIV + 2) */
+#define KS_WLAN_GET_FIRM_VERSION   (SIOCIWFIRSTPRIV + 3)
 #ifdef WPS
-#define KS_WLAN_SET_WPS_ENABLE SIOCIWFIRSTPRIV + 4
-#define KS_WLAN_GET_WPS_ENABLE SIOCIWFIRSTPRIV + 5
-#define KS_WLAN_SET_WPS_PROBE_REQ  SIOCIWFIRSTPRIV + 6
+#define KS_WLAN_SET_WPS_ENABLE (SIOCIWFIRSTPRIV + 4)
+#define KS_WLAN_GET_WPS_ENABLE (SIOCIWFIRSTPRIV + 5)
+#define KS_WLAN_SET_WPS_PROBE_REQ  (SIOCIWFIRSTPRIV + 6)
 #endif
-#define KS_WLAN_GET_EEPROM_CKSUM   SIOCIWFIRSTPRIV + 7
-#define KS_WLAN_SET_PREAMBLE   SIOCIWFIRSTPRIV + 8
-#define KS_WLAN_GET_PREAMBLE   SIOCIWFIRSTPRIV + 9
-#define KS_WLAN_SET_POWER_SAVE SIOCIWFIRSTPRIV + 10
-#define KS_WLAN_GET_POWER_SAVE SIOCIWFIRSTPRIV + 11
-#define KS_WLAN_SET_SCAN_TYPE  SIOCIWFIRSTPRIV + 12
-#define KS_WLAN_GET_SCAN_TYPE  SIOCIWFIRSTPRIV + 13
-#define KS_WLAN_SET_RX_GAINSIOCIWFIRSTPRIV + 14
-#define KS_WLAN_GET_RX_GAINSIOCIWFIRSTPRIV + 15
-#define KS_WLAN_HOSTT  SIOCIWFIRSTPRIV + 16/* unused */
-//#define KS_WLAN_SET_REGIONSIOCIWFIRSTPRIV + 17
-#define KS_WLAN_SET_BEACON_LOSTSIOCIWFIRSTPRIV + 18
-#define KS_WLAN_GET_BEACON_LOSTSIOCIWFIRSTPRIV + 19
+#define KS_WLAN_GET_EEPROM_CKSUM   (SIOCIWFIRSTPRIV + 7)
+#define KS_WLAN_SET_PREAMBLE   (SIOCIWFIRSTPRIV + 8)
+#define KS_WLAN_GET_PREAMBLE   (SIOCIWFIRSTPRIV + 9)
+#define KS_WLAN_SET_POWER_SAVE (SIOCIWFIRSTPRIV + 10)
+#define KS_WLAN_GET_POWER_SAVE (SIOCIWFIRSTPRIV + 11)
+#define KS_WLAN_SET_SCAN_TYPE  (SIOCIWFIRSTPRIV + 12)
+#define KS_WLAN_GET_SCAN_TYPE  (SIOCIWFIRSTPRIV + 13)
+#define KS_WLAN_SET_RX_GAIN(SIOCIWFIRSTPRIV + 14)
+#define KS_WLAN_GET_RX_GAIN(SIOCIWFIRSTPRIV + 15)
+#define KS_WLAN_HOSTT  (SIOCIWFIRSTPRIV + 16) /* unused */
+//#define KS_WLAN_SET_REGION(SIOCIWFIRSTPRIV + 17)
+#define KS_WLAN_SET_BEACON_LOST(SIOCIWFIRSTPRIV + 18)
+#define KS_WLAN_GET_BEACON_LOST(SIOCIWFIRSTPRIV + 19)
 
-#define KS_WLAN_SET_TX_GAINSIOCIWFIRSTPRIV + 20
-#define KS_WLAN_GET_TX_GAINSIOCIWFIRSTPRIV + 21
+#define KS_WLAN_SET_TX_GAIN(SIOCIWFIRSTPRIV + 20)
+#define KS_WLAN_GET_TX_GAIN(SIOCIWFIRSTPRIV + 21)
 
 /* for KS7010 */
-#define KS_WLAN_SET_PHY_TYPE   SIOCIWFIRSTPRIV + 22
-#define KS_WLAN_GET_PHY_TYPE   SIOCIWFIRSTPRIV + 23
-#define KS_WLAN_SET_CTS_MODE   SIOCIWFIRSTPRIV + 24
-#define KS_WLAN_GET_CTS_MODE   SIOCIWFIRSTPRIV + 25
-/* SIOCIWFIRSTPRIV + 26 */
-/* SIOCIWFIRSTPRIV + 27 */
-#define KS_WLAN_SET_SLEEP_MODE SIOCIWFIRSTPRIV + 28/* sleep mode */
-#define KS_WLAN_GET_SLEEP_MODE SIOCIWFIRSTPRIV + 29/* sleep mode */
-/* SIOCIWFIRSTPRIV + 30 */
-/* SIOCIWFIRSTPRIV + 31 */
+#define KS_WLAN_SET_PHY_TYPE   (SIOCIWFIRSTPRIV + 22)
+#define KS_WLAN_GET_PHY_TYPE   (SIOCIWFIRSTPRIV + 23)
+#define KS_WLAN_SET_CTS_MODE   (SIOCIWFIRSTPRIV + 24)
+#define KS_WLAN_GET_CTS_MODE   (SIOCIWFIRSTPRIV + 25)
+/* (SIOCIWFIRSTPRIV + 26) */
+/* (SIOCIWFIRSTPRIV + 27) */
+#define KS_WLAN_SET_SLEEP_MODE (SIOCIWFIRSTPRIV + 28) /* sleep mode */
+#define KS_WLAN_GET_SLEEP_MODE (SIOCIWFIRSTPRIV + 29) /* sleep mode */
+/* (SIOCIWFIRSTPRIV + 30) */
+/* (SIOCIWFIRSTPRIV + 31) */
 
 #ifdef __KERNEL__
 
-- 
2.7.4



[PATCHv5 0/4] Staging: ks7010: ks_wlan_ioctl.h: checkpatch fixes

2017-03-15 Thread Matthew Giassa
The following patches address all outstanding checkpatch warnings/errors
present in drivers/staging/ks7010/ks_wlan_ioctl.h.

This change set has been rebased off of the current master
(69eea5a4ab9c705496e912b55a9d312325de19e6) as per an earlier request,
and the change log formatting has been slightly changed, as per Tobin's
advice.




[PATCHv5 2/4] Staging: ks7010: ks_wlan_ioctl.h: Remove trailing white space

2017-03-15 Thread Matthew Giassa
Removing trailing white space characters in comments to resolve
a checkpatch warning.

Signed-off-by: Matthew Giassa 
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index d811680..1b68402 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -1,6 +1,6 @@
 /*
  *   Driver for KeyStream 11b/g wireless LAN
- *   
+ *
  *   Copyright (c) 2005-2008 KeyStream Corp.
  *   Copyright (C) 2009 Renesas Technology Corp.
  *
-- 
2.7.4



Re: [PATCHv5 1/4] Staging: ks7010: ks_wlan_ioctl.h: Removed mixed spaces/tabs

2017-03-15 Thread Greg KH
On Tue, Mar 14, 2017 at 07:25:51PM -0700, Matthew Giassa wrote:
> Removing mixed spaces/hard-tabs used to create a "column alignment" of
> macro names and macro values.
> 
> Signed-off-by: Matthew Giassa 
> ---
>  drivers/staging/ks7010/ks_wlan_ioctl.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

This does not apply, please rebase your tree and resend.

thanks,

greg k-h


Re: [PATCHv5 4/4] Staging: ks7010: ks_wlan_ioctl.h: Wrap complex macros with parentheses

2017-03-15 Thread Matthew Giassa

* Tobin C. Harding  [2017-03-15 14:14:08 +1100]:


On Tue, Mar 14, 2017 at 07:25:54PM -0700, Matthew Giassa wrote:

Wrapping all complex macros with parentheses to resolve checkpatch
errors. This change, along with the preceding changes in this change
set, resolves all checkpatch warnings and errors for the file.

Signed-off-by: Matthew Giassa 
---
 drivers/staging/ks7010/ks_wlan_ioctl.h | 64 +-
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h 
b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 1251d7e..adc935d 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -15,43 +15,43 @@
 #include 
 /* The low order bit identify a SET (0) or a GET (1) ioctl.  */

-/* SIOCIWFIRSTPRIV + 0 */
-/* former KS_WLAN_GET_DRIVER_VERSION   SIOCIWFIRSTPRIV + 1 */
-/* SIOCIWFIRSTPRIV + 2 */
-#define KS_WLAN_GET_FIRM_VERSION   SIOCIWFIRSTPRIV + 3
+/* (SIOCIWFIRSTPRIV + 0) */
+/* former KS_WLAN_GET_DRIVER_VERSION   (SIOCIWFIRSTPRIV + 1) */
+/* (SIOCIWFIRSTPRIV + 2) */
+#define KS_WLAN_GET_FIRM_VERSION   (SIOCIWFIRSTPRIV + 3)
 #ifdef WPS
-#define KS_WLAN_SET_WPS_ENABLE SIOCIWFIRSTPRIV + 4
-#define KS_WLAN_GET_WPS_ENABLE SIOCIWFIRSTPRIV + 5
-#define KS_WLAN_SET_WPS_PROBE_REQ  SIOCIWFIRSTPRIV + 6
+#define KS_WLAN_SET_WPS_ENABLE (SIOCIWFIRSTPRIV + 4)
+#define KS_WLAN_GET_WPS_ENABLE (SIOCIWFIRSTPRIV + 5)
+#define KS_WLAN_SET_WPS_PROBE_REQ  (SIOCIWFIRSTPRIV + 6)
 #endif
-#define KS_WLAN_GET_EEPROM_CKSUM   SIOCIWFIRSTPRIV + 7
-#define KS_WLAN_SET_PREAMBLE   SIOCIWFIRSTPRIV + 8
-#define KS_WLAN_GET_PREAMBLE   SIOCIWFIRSTPRIV + 9
-#define KS_WLAN_SET_POWER_SAVE SIOCIWFIRSTPRIV + 10
-#define KS_WLAN_GET_POWER_SAVE SIOCIWFIRSTPRIV + 11
-#define KS_WLAN_SET_SCAN_TYPE  SIOCIWFIRSTPRIV + 12
-#define KS_WLAN_GET_SCAN_TYPE  SIOCIWFIRSTPRIV + 13
-#define KS_WLAN_SET_RX_GAINSIOCIWFIRSTPRIV + 14
-#define KS_WLAN_GET_RX_GAINSIOCIWFIRSTPRIV + 15
-#define KS_WLAN_HOSTT  SIOCIWFIRSTPRIV + 16/* unused */
-//#define KS_WLAN_SET_REGIONSIOCIWFIRSTPRIV + 17
-#define KS_WLAN_SET_BEACON_LOSTSIOCIWFIRSTPRIV + 18
-#define KS_WLAN_GET_BEACON_LOSTSIOCIWFIRSTPRIV + 19
+#define KS_WLAN_GET_EEPROM_CKSUM   (SIOCIWFIRSTPRIV + 7)
+#define KS_WLAN_SET_PREAMBLE   (SIOCIWFIRSTPRIV + 8)
+#define KS_WLAN_GET_PREAMBLE   (SIOCIWFIRSTPRIV + 9)
+#define KS_WLAN_SET_POWER_SAVE (SIOCIWFIRSTPRIV + 10)
+#define KS_WLAN_GET_POWER_SAVE (SIOCIWFIRSTPRIV + 11)
+#define KS_WLAN_SET_SCAN_TYPE  (SIOCIWFIRSTPRIV + 12)
+#define KS_WLAN_GET_SCAN_TYPE  (SIOCIWFIRSTPRIV + 13)
+#define KS_WLAN_SET_RX_GAIN(SIOCIWFIRSTPRIV + 14)
+#define KS_WLAN_GET_RX_GAIN(SIOCIWFIRSTPRIV + 15)
+#define KS_WLAN_HOSTT  (SIOCIWFIRSTPRIV + 16) /* unused */
+//#define KS_WLAN_SET_REGION(SIOCIWFIRSTPRIV + 17)
+#define KS_WLAN_SET_BEACON_LOST(SIOCIWFIRSTPRIV + 18)
+#define KS_WLAN_GET_BEACON_LOST(SIOCIWFIRSTPRIV + 19)

-#define KS_WLAN_SET_TX_GAINSIOCIWFIRSTPRIV + 20
-#define KS_WLAN_GET_TX_GAINSIOCIWFIRSTPRIV + 21
+#define KS_WLAN_SET_TX_GAIN(SIOCIWFIRSTPRIV + 20)
+#define KS_WLAN_GET_TX_GAIN(SIOCIWFIRSTPRIV + 21)

 /* for KS7010 */
-#define KS_WLAN_SET_PHY_TYPE   SIOCIWFIRSTPRIV + 22
-#define KS_WLAN_GET_PHY_TYPE   SIOCIWFIRSTPRIV + 23
-#define KS_WLAN_SET_CTS_MODE   SIOCIWFIRSTPRIV + 24
-#define KS_WLAN_GET_CTS_MODE   SIOCIWFIRSTPRIV + 25
-/* SIOCIWFIRSTPRIV + 26 */
-/* SIOCIWFIRSTPRIV + 27 */
-#define KS_WLAN_SET_SLEEP_MODE SIOCIWFIRSTPRIV + 28/* sleep mode */
-#define KS_WLAN_GET_SLEEP_MODE SIOCIWFIRSTPRIV + 29/* sleep mode */
-/* SIOCIWFIRSTPRIV + 30 */
-/* SIOCIWFIRSTPRIV + 31 */
+#define KS_WLAN_SET_PHY_TYPE   (SIOCIWFIRSTPRIV + 22)
+#define KS_WLAN_GET_PHY_TYPE   (SIOCIWFIRSTPRIV + 23)
+#define KS_WLAN_SET_CTS_MODE   (SIOCIWFIRSTPRIV + 24)
+#define KS_WLAN_GET_CTS_MODE   (SIOCIWFIRSTPRIV + 25)
+/* (SIOCIWFIRSTPRIV + 26) */
+/* (SIOCIWFIRSTPRIV + 27) */
+#define KS_WLAN_SET_SLEEP_MODE (SIOCIWFIRSTPRIV + 28) /* sleep mode */
+#define KS_WLAN_GET_SLEEP_MODE (SIOCIWFIRSTPRIV + 29) /* sleep mode */
+/* (SIOCIWFIRSTPRIV + 30) */
+/* (SIOCIWFIRSTPRIV + 31) */

 

Applied "ASoC: rcar: clear DE bit only in PDMACHCR when it stops" to the asoc tree

2017-03-15 Thread Mark Brown
The patch

   ASoC: rcar: clear DE bit only in PDMACHCR when it stops

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 62a10498afb27370ec6018e9d802b74850fd8d9a Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto 
Date: Tue, 14 Mar 2017 09:34:49 +0900
Subject: [PATCH] ASoC: rcar: clear DE bit only in PDMACHCR when it stops

R-Car datasheet indicates "Clear DE in PDMACHCR" for transfer stop,
but current code clears all bits in PDMACHCR.
Because of this, DE bit might never been cleared,
and it causes CMD overflow. This patch fixes this issue.

Signed-off-by: Kuninori Morimoto 
Tested-by: Hiroyuki Yokoyama 
Signed-off-by: Mark Brown 
---
 sound/soc/sh/rcar/dma.c | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c
index 1f405c833867..c2e199b4fcf4 100644
--- a/sound/soc/sh/rcar/dma.c
+++ b/sound/soc/sh/rcar/dma.c
@@ -454,6 +454,20 @@ static u32 rsnd_dmapp_read(struct rsnd_dma *dma, u32 reg)
return ioread32(rsnd_dmapp_addr(dmac, dma, reg));
 }
 
+static void rsnd_dmapp_bset(struct rsnd_dma *dma, u32 data, u32 mask, u32 reg)
+{
+   struct rsnd_mod *mod = rsnd_mod_get(dma);
+   struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
+   struct rsnd_dma_ctrl *dmac = rsnd_priv_to_dmac(priv);
+   volatile void __iomem *addr = rsnd_dmapp_addr(dmac, dma, reg);
+   u32 val = ioread32(addr);
+
+   val &= ~mask;
+   val |= (data & mask);
+
+   iowrite32(val, addr);
+}
+
 static int rsnd_dmapp_stop(struct rsnd_mod *mod,
   struct rsnd_dai_stream *io,
   struct rsnd_priv *priv)
@@ -461,10 +475,10 @@ static int rsnd_dmapp_stop(struct rsnd_mod *mod,
struct rsnd_dma *dma = rsnd_mod_to_dma(mod);
int i;
 
-   rsnd_dmapp_write(dma, 0, PDMACHCR);
+   rsnd_dmapp_bset(dma, 0,  PDMACHCR_DE, PDMACHCR);
 
for (i = 0; i < 1024; i++) {
-   if (0 == rsnd_dmapp_read(dma, PDMACHCR))
+   if (0 == (rsnd_dmapp_read(dma, PDMACHCR) & PDMACHCR_DE))
return 0;
udelay(1);
}
-- 
2.11.0



Re: [PATCH v2] dt-bindings: drm: rcar-du: Document optional reset properties

2017-03-15 Thread Rob Herring
On Mon, Mar 06, 2017 at 05:25:56PM +0100, Geert Uytterhoeven wrote:
> Document the optional properties for describing module resets, to
> support resetting display channels and LVDS encoders on R-Car Gen2 and
> Gen3.
> 
> Signed-off-by: Geert Uytterhoeven 
> ---
> See "[v2,1/4] dt-bindings: clock: renesas: cpg-mssr: Document reset control
> support" (https://patchwork.kernel.org/patch/9536627/) for the format of
> a reset specifier in the Renesas CPG/MSSR case.
> 
> E.g. "resets = < 310>;"
> 
> v2:
>   - s/phandles/phandle/.
> ---
>  Documentation/devicetree/bindings/display/renesas,du.txt | 10 ++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/renesas,du.txt 
> b/Documentation/devicetree/bindings/display/renesas,du.txt
> index 1a02f099a0ff0a3a..3db418c827193e82 100644
> --- a/Documentation/devicetree/bindings/display/renesas,du.txt
> +++ b/Documentation/devicetree/bindings/display/renesas,du.txt
> @@ -36,6 +36,16 @@ Required Properties:
>When supplied they must be named "dclkin.x" with "x" being the input
>clock numerical index.
>  
> +Optional properties:
> +  - resets: A list of phandle + reset-specifier pairs, one for each entry in
> +the reset-names property.
> +  - reset-names: Names of the resets. This property is model-dependent.
> +- R8A779[0123456] use one reset for a group of one or more successive
> +  channels, and one reset per LVDS encoder (if available). The resets
> +  must be named "du.x" with "x" being the numerical index of the lowest
> +  channel in the group. The LVDS resets must be named "lvds.x" with "x"
> +  being the LVDS encoder numerical index.

LVDS is not a separate block?

> +
>  Required nodes:
>  
>  The connections to the DU output video ports are modeled using the OF graph
> -- 
> 2.7.4
> 


Re: [PATCH v3] i2c-tools: add new tool 'i2ctransfer'

2017-03-15 Thread Wolfram Sang
On Mon, Mar 13, 2017 at 12:41:35PM +0100, Wolfram Sang wrote:
> From: Wolfram Sang 
> 
> This tool allows to construct and concat multiple I2C messages into one
> single transfer. Its aim is to test I2C master controllers, and so there
> is no SMBus fallback.
> 
> I've been missing such a tool a number of times now, so I finally got
> around to writing it myself. As with all I2C tools, it can be dangerous,
> but it can also be very useful when developing.
> 
> It has been tested with various Renesas I2C IP cores as well as Tegra,
> i.MX and AT91.
> 
> Signed-off-by: Wolfram Sang 
> Cc: Jean Delvare 
> Cc: Uwe Kleine-König 
> Cc: Ezequiel Garcia 
> Cc: Geert Uytterhoeven 

I think we can do further changes incrementally now. So, I fixed two
more typos and an ugly linebreak and committed this tool to i2c-tools
master branch. This should increase the visibility of the tool and
encourage further testing. I'd still appreciate a review by Jean, yet I
think it has a bit more time until the next release of the tools.
Although, unsurprisingly, I'd like to see this happen more soonish as
well ;)

Thanks for all the encouragement,

   Wolfram



signature.asc
Description: PGP signature


Re: [RESEND PATCH v3 2/2] phy: Group vendor specific phy drivers

2017-03-15 Thread Vivek Gautam
On Wed, Mar 15, 2017 at 1:38 PM, Heiko Stübner  wrote:
> Am Dienstag, 14. März 2017, 11:52:50 CET schrieb Vivek Gautam:
>> Adding vendor specific directories in phy to group
>> phy drivers under their respective vendor umbrella.
>>
>> Also updated the MAINTAINERS file to reflect the correct
>> directory structure for phy drivers.
>>
>> Signed-off-by: Vivek Gautam 
>> Acked-by: Heiko Stuebner 
>> Acked-by: Viresh Kumar 
>> Cc: Kishon Vijay Abraham I 
>> Cc: David S. Miller 
>> Cc: Geert Uytterhoeven 
>> Cc: Yoshihiro Shimoda 
>> Cc: Guenter Roeck 
>> Cc: Heiko Stuebner 
>> Cc: Viresh Kumar 
>> Cc: Maxime Ripard 
>> Cc: Chen-Yu Tsai 
>> Cc: Sylwester Nawrocki 
>> Cc: Krzysztof Kozlowski 
>> Cc: Jaehoon Chung 
>> Cc: linux-arm-ker...@lists.infradead.org
>> Cc: linux-arm-...@vger.kernel.org
>> Cc: linux-ker...@vger.kernel.org
>> Cc: linux-o...@vger.kernel.org
>> Cc: linux-renesas-soc@vger.kernel.org
>> Cc: linux-rockc...@lists.infradead.org
>> Cc: linux-samsung-...@vger.kernel.org
>> Cc: linux-...@vger.kernel.org
>> ---
>>
>> Corrected Krzysztof's email-id. Added linux-arm-msm.
>>
>> Hi Heiko, Viresh,
>> It's been a year since the last version of this patch was posted.
>> Kishon has agreed to pull this change now. I am carrying forward
>> your Acks since there are no functional changes.
>> I have taken care of the drivers that were added/removed since
>> the last version.
>> Please feel free to jump in if you have any concerns.
>
> still looks all good and I gave that a try on 4.11-rc2 yesterday as well.

Thanks Heiko for testing this patch.

Best Regards
Vivek
>
>
> Heiko
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project


Re: [PATCH 0/2] pinctrl: sh-pfc: r8a7795: Misc fixes and cleanups

2017-03-15 Thread Geert Uytterhoeven
Hi Linus,

On Wed, Mar 15, 2017 at 11:26 AM, Linus Walleij
 wrote:
> On Mon, Mar 13, 2017 at 5:41 PM, Geert Uytterhoeven
>  wrote:
>
>> I plan to queue these up in sh-pfc-for-v4.12.
>
> Thanks, looking forward to pull request.

Thanks!

> I realized I needed a maintainer collecting Samsung patches
> as well this week, so we may get more people maintaining
> subdirs in pinctrl...

Good. I'll refrain from making updates to drivers/pinctrl/samsung/ myself ;-)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [PATCH 0/2] pinctrl: sh-pfc: r8a7795: Misc fixes and cleanups

2017-03-15 Thread Linus Walleij
On Mon, Mar 13, 2017 at 5:41 PM, Geert Uytterhoeven
 wrote:

> I plan to queue these up in sh-pfc-for-v4.12.

Thanks, looking forward to pull request.

I realized I needed a maintainer collecting Samsung patches
as well this week, so we may get more people maintaining
subdirs in pinctrl...

Yours,
Linus Walleij


Re: [PATCH v3 06/27] rcar-vin: move max width and height information to chip information

2017-03-15 Thread Sergei Shtylyov

On 3/14/2017 10:02 PM, Niklas Söderlund wrote:


On Gen3 the max supported width and height will be different from Gen2.
Move the limits to the struct chip_info to prepare for Gen3 support.


   Maybe rvin_info?


Signed-off-by: Niklas Söderlund 
---
 drivers/media/platform/rcar-vin/rcar-core.c | 6 ++
 drivers/media/platform/rcar-vin/rcar-v4l2.c | 6 ++
 drivers/media/platform/rcar-vin/rcar-vin.h  | 6 ++
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/rcar-vin/rcar-core.c 
b/drivers/media/platform/rcar-vin/rcar-core.c
index ec1eb723d401fda2..998617711f1ad045 100644
--- a/drivers/media/platform/rcar-vin/rcar-core.c
+++ b/drivers/media/platform/rcar-vin/rcar-core.c
@@ -257,14 +257,20 @@ static int rvin_digital_graph_init(struct rvin_dev *vin)

 static const struct rvin_info rcar_info_h1 = {
.chip = RCAR_H1,
+   .max_width = 2048,
+   .max_height = 2048,
 };

 static const struct rvin_info rcar_info_m1 = {
.chip = RCAR_M1,
+   .max_width = 2048,
+   .max_height = 2048,
 };

 static const struct rvin_info rcar_info_gen2 = {
.chip = RCAR_GEN2,
+   .max_width = 2048,
+   .max_height = 2048,
 };

 static const struct of_device_id rvin_of_id_table[] = {

[...]

MBR, Sergei



Re: [PATCH 03/16] rcar-vin: fix how pads are handled for v4l2 subdevice operations

2017-03-15 Thread Niklas Söderlund
Hi Sergei,

Thanks for your feedback.

On 2017-03-15 12:12:21 +0300, Sergei Shtylyov wrote:
> Hello!
> 
> On 3/14/2017 9:59 PM, Niklas Söderlund wrote:
> 
> > The rcar-vin driver only uses one pad, pad number 0.
> > 
> > - All v4l2 operations that did not check that the requested operation
> >   was for pad 0 have been updated with a check to enforce this.
> > 
> > - All v4l2 operations that stored (and later restore) the requested pad
> 
>Restored?

Will update for v2.

> 
> >   before substituting it for the subdevice pad number have been updated
> >   to not store the incoming pad and simply restore it to 0 after the
> >   subdevice operation is complete.
> > 
> > Signed-off-by: Niklas Söderlund 
> > ---
> >  drivers/media/platform/rcar-vin/rcar-v4l2.c | 26 ++
> >  1 file changed, 14 insertions(+), 12 deletions(-)
> > 
> > diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c 
> > b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> > index 7ca27599b9982ffc..610f59e2a9142622 100644
> > --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
> > +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> > @@ -550,14 +550,16 @@ static int rvin_enum_dv_timings(struct file *file, 
> > void *priv_fh,
> >  {
> > struct rvin_dev *vin = video_drvdata(file);
> > struct v4l2_subdev *sd = vin_to_source(vin);
> > -   int pad, ret;
> > +   int ret;
> > +
> > +   if (timings->pad)
> > +   return -EINVAL;
> > 
> > -   pad = timings->pad;
> > timings->pad = vin->sink_pad_idx;
> > 
> > ret = v4l2_subdev_call(sd, pad, enum_dv_timings, timings);
> 
>Does this still compile after you removed 'pad'?

Yes, the pad in v4l2_subdev_call() do not refer to the pad variable but 
the pad operations of the subdevice ops struct, the macro is defined as:

#define v4l2_subdev_call(sd, o, f, args...) \
(!(sd) ? -ENODEV : (((sd)->ops->o && (sd)->ops->o->f) ? \
(sd)->ops->o->f((sd), ##args) : -ENOIOCTLCMD))

So if you expand the macro it looks like:

sd->ops->pad->enum_dv_timings(timings);

I agree it's confusing and I had the same thought the first times I 
looked at it too :-)

> 
> > 
> > -   timings->pad = pad;
> > +   timings->pad = 0;
> > 
> > return ret;
> >  }
> > @@ -600,14 +602,16 @@ static int rvin_dv_timings_cap(struct file *file, 
> > void *priv_fh,
> >  {
> > struct rvin_dev *vin = video_drvdata(file);
> > struct v4l2_subdev *sd = vin_to_source(vin);
> > -   int pad, ret;
> > +   int ret;
> > +
> > +   if (cap->pad)
> > +   return -EINVAL;
> > 
> > -   pad = cap->pad;
> > cap->pad = vin->sink_pad_idx;
> > 
> > ret = v4l2_subdev_call(sd, pad, dv_timings_cap, cap);
> 
>And this?
> 
> > 
> > -   cap->pad = pad;
> > +   cap->pad = 0;
> > 
> > return ret;
> >  }
> [...]
> 
> MBR, Sergei
> 

-- 
Regards,
Niklas Söderlund


Re: [PATCH 03/16] rcar-vin: fix how pads are handled for v4l2 subdevice operations

2017-03-15 Thread Sergei Shtylyov

Hello!

On 3/14/2017 9:59 PM, Niklas Söderlund wrote:


The rcar-vin driver only uses one pad, pad number 0.

- All v4l2 operations that did not check that the requested operation
  was for pad 0 have been updated with a check to enforce this.

- All v4l2 operations that stored (and later restore) the requested pad


   Restored?


  before substituting it for the subdevice pad number have been updated
  to not store the incoming pad and simply restore it to 0 after the
  subdevice operation is complete.

Signed-off-by: Niklas Söderlund 
---
 drivers/media/platform/rcar-vin/rcar-v4l2.c | 26 ++
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c 
b/drivers/media/platform/rcar-vin/rcar-v4l2.c
index 7ca27599b9982ffc..610f59e2a9142622 100644
--- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
+++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
@@ -550,14 +550,16 @@ static int rvin_enum_dv_timings(struct file *file, void 
*priv_fh,
 {
struct rvin_dev *vin = video_drvdata(file);
struct v4l2_subdev *sd = vin_to_source(vin);
-   int pad, ret;
+   int ret;
+
+   if (timings->pad)
+   return -EINVAL;

-   pad = timings->pad;
timings->pad = vin->sink_pad_idx;

ret = v4l2_subdev_call(sd, pad, enum_dv_timings, timings);


   Does this still compile after you removed 'pad'?



-   timings->pad = pad;
+   timings->pad = 0;

return ret;
 }
@@ -600,14 +602,16 @@ static int rvin_dv_timings_cap(struct file *file, void 
*priv_fh,
 {
struct rvin_dev *vin = video_drvdata(file);
struct v4l2_subdev *sd = vin_to_source(vin);
-   int pad, ret;
+   int ret;
+
+   if (cap->pad)
+   return -EINVAL;

-   pad = cap->pad;
cap->pad = vin->sink_pad_idx;

ret = v4l2_subdev_call(sd, pad, dv_timings_cap, cap);


   And this?



-   cap->pad = pad;
+   cap->pad = 0;

return ret;
 }

[...]

MBR, Sergei



Re: [PATCH 01/16] rcar-vin: reset bytesperline and sizeimage when resetting format

2017-03-15 Thread Sergei Shtylyov

Hello!

On 3/14/2017 9:59 PM, Niklas Söderlund wrote:


These two where forgotten when refactoring the format reset code. If


   s/where/were/?


they are not also reset at the same time as width and height the format
returned from G_FMT will not match reality.

Signed-off-by: Niklas Söderlund 

[...]

MBR, Sergei



Re: [RESEND PATCH v3 2/2] phy: Group vendor specific phy drivers

2017-03-15 Thread Heiko Stübner
Am Dienstag, 14. März 2017, 11:52:50 CET schrieb Vivek Gautam:
> Adding vendor specific directories in phy to group
> phy drivers under their respective vendor umbrella.
> 
> Also updated the MAINTAINERS file to reflect the correct
> directory structure for phy drivers.
> 
> Signed-off-by: Vivek Gautam 
> Acked-by: Heiko Stuebner 
> Acked-by: Viresh Kumar 
> Cc: Kishon Vijay Abraham I 
> Cc: David S. Miller 
> Cc: Geert Uytterhoeven 
> Cc: Yoshihiro Shimoda 
> Cc: Guenter Roeck 
> Cc: Heiko Stuebner 
> Cc: Viresh Kumar 
> Cc: Maxime Ripard 
> Cc: Chen-Yu Tsai 
> Cc: Sylwester Nawrocki 
> Cc: Krzysztof Kozlowski 
> Cc: Jaehoon Chung 
> Cc: linux-arm-ker...@lists.infradead.org
> Cc: linux-arm-...@vger.kernel.org
> Cc: linux-ker...@vger.kernel.org
> Cc: linux-o...@vger.kernel.org
> Cc: linux-renesas-soc@vger.kernel.org
> Cc: linux-rockc...@lists.infradead.org
> Cc: linux-samsung-...@vger.kernel.org
> Cc: linux-...@vger.kernel.org
> ---
> 
> Corrected Krzysztof's email-id. Added linux-arm-msm.
> 
> Hi Heiko, Viresh,
> It's been a year since the last version of this patch was posted.
> Kishon has agreed to pull this change now. I am carrying forward
> your Acks since there are no functional changes.
> I have taken care of the drivers that were added/removed since
> the last version.
> Please feel free to jump in if you have any concerns.

still looks all good and I gave that a try on 4.11-rc2 yesterday as well.


Heiko