Skip to contentSkip to conversation

ASoC: atmel-soc: make it buildable on other architectures

PATCH Applied Joachim Eastwood 4 participants 5 messages Dec 8, 2012 – Dec 24, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: atmel-soc: make it buildable on other architectures

Not very useful on non AT91/AVR32 platforms but it provides more build coverage and prepares for ARM multiplatform.

Also fixes a couple of format type warnings.

---

Hi,

Build tested on RM9200 and x86_64.

ARCH_AT91 depend is pushed down to the machine drivers since they still relies on mach includes.

regards
Joachim Eastwood

 sound/soc/atmel/Kconfig         | 6 +++---
 sound/soc/atmel/atmel-pcm-pdc.c | 4 ++--
 sound/soc/atmel/atmel-pcm.c     | 2 +-
 sound/soc/atmel/atmel_ssc_dai.c | 2 --
 4 files changed, 6 insertions(+), 8 deletions(-)
sound/soc/atmel/Kconfig +3 -3
index d1b691b..3fdd87f 100644
@@ -1,6 +1,6 @@
 config SND_ATMEL_SOC
 	tristate "SoC Audio for the Atmel System-on-Chip"
-	depends on ARCH_AT91
+	depends on HAS_IOMEM
 	help
 	  Say Y or M if you want to add support for codecs attached to
 	  the ATMEL SSC interface. You will also need
@@ -24,7 +24,7 @@ config SND_ATMEL_SOC_SSC
 
 config SND_AT91_SOC_SAM9G20_WM8731
 	tristate "SoC Audio support for WM8731-based At91sam9g20 evaluation board"
-	depends on ATMEL_SSC && SND_ATMEL_SOC && AT91_PROGRAMMABLE_CLOCKS
+	depends on ARCH_AT91 && ATMEL_SSC && SND_ATMEL_SOC && AT91_PROGRAMMABLE_CLOCKS
 	select SND_ATMEL_SOC_PDC
 	select SND_ATMEL_SOC_SSC
 	select SND_SOC_WM8731
@@ -34,7 +34,7 @@ config SND_AT91_SOC_SAM9G20_WM8731
 
 config SND_AT91_SOC_AFEB9260
 	tristate "SoC Audio support for AFEB9260 board"
-	depends on ATMEL_SSC && ARCH_AT91 && MACH_AFEB9260 && SND_ATMEL_SOC
+	depends on ARCH_AT91 && ATMEL_SSC && ARCH_AT91 && MACH_AFEB9260 && SND_ATMEL_SOC
 	select SND_ATMEL_SOC_PDC
 	select SND_ATMEL_SOC_SSC
 	select SND_SOC_TLV320AIC23
sound/soc/atmel/atmel-pcm-pdc.c +2 -2
index 6a293c7..054ea4d 100644
@@ -159,7 +159,7 @@ static int atmel_pcm_hw_params(struct snd_pcm_substream *substream,
 
 	pr_debug("atmel-pcm: "
 		"hw_params: DMA for %s initialized "
-		"(dma_bytes=%u, period_size=%u)\n",
+		"(dma_bytes=%zu, period_size=%zu)\n",
 		prtd->params->name,
 		runtime->dma_bytes,
 		prtd->period_size);
@@ -201,7 +201,7 @@ static int atmel_pcm_trigger(struct snd_pcm_substream *substream,
 	int ret = 0;
 
 	pr_debug("atmel-pcm:buffer_size = %ld,"
-		"dma_area = %p, dma_bytes = %u\n",
+		"dma_area = %p, dma_bytes = %zu\n",
 		rtd->buffer_size, rtd->dma_area, rtd->dma_bytes);
 
 	switch (cmd) {
sound/soc/atmel/atmel-pcm.c +1 -1
index e99f181..3109db7 100644
@@ -49,7 +49,7 @@ static int atmel_pcm_preallocate_dma_buffer(struct snd_pcm *pcm,
 	buf->private_data = NULL;
 	buf->area = dma_alloc_coherent(pcm->card->dev, size,
 			&buf->addr, GFP_KERNEL);
-	pr_debug("atmel-pcm: alloc dma buffer: area=%p, addr=%p, size=%d\n",
+	pr_debug("atmel-pcm: alloc dma buffer: area=%p, addr=%p, size=%zu\n",
 			(void *)buf->area, (void *)buf->addr, size);
 
 	if (!buf->area)
sound/soc/atmel/atmel_ssc_dai.c +0 -2
index 1c76634..2755750 100644
@@ -42,8 +42,6 @@
 #include <sound/initval.h>
 #include <sound/soc.h>
 
-#include <mach/hardware.h>
-
 #include "atmel-pcm.h"
 #include "atmel_ssc_dai.h"
 
Signature · 1 line
1.8.0
#1 lore raw

Hi Joachim Eastwood,

Quoted 29 lines · Joachim Eastwood

Not very useful on non AT91/AVR32 platforms but it provides more build coverage and prepares for ARM multiplatform.

Also fixes a couple of format type warnings.

---

Hi,

Build tested on RM9200 and x86_64.

ARCH_AT91 depend is pushed down to the machine drivers since they still relies on mach includes.

regards
Joachim Eastwood

  sound/soc/atmel/Kconfig         | 6 +++---
  sound/soc/atmel/atmel-pcm-pdc.c | 4 ++--
  sound/soc/atmel/atmel-pcm.c     | 2 +-
  sound/soc/atmel/atmel_ssc_dai.c | 2 --
  4 files changed, 6 insertions(+), 8 deletions(-)
sound/soc/atmel/Kconfig +0 -0
index d1b691b..3fdd87f 100644

sound/soc/atmel/Kconfig line 3

Quoted 4 lines
sound/soc/atmel/Kconfig +1 -1
@@ -1,6 +1,6 @@
  config SND_ATMEL_SOC
  	tristate "SoC Audio for the Atmel System-on-Chip"
-	depends on ARCH_AT91
+	depends on HAS_IOMEM

I don't think this change needed. This is not a physical device.

Best Regards,
Bo Shen

Quoted 70 lines
sound/soc/atmel/Kconfig +2 -2
  	help
  	  Say Y or M if you want to add support for codecs attached to
  	  the ATMEL SSC interface. You will also need
@@ -24,7 +24,7 @@ config SND_ATMEL_SOC_SSC
 
  config SND_AT91_SOC_SAM9G20_WM8731
  	tristate "SoC Audio support for WM8731-based At91sam9g20 evaluation board"
-	depends on ATMEL_SSC && SND_ATMEL_SOC && AT91_PROGRAMMABLE_CLOCKS
+	depends on ARCH_AT91 && ATMEL_SSC && SND_ATMEL_SOC && AT91_PROGRAMMABLE_CLOCKS
  	select SND_ATMEL_SOC_PDC
  	select SND_ATMEL_SOC_SSC
  	select SND_SOC_WM8731
@@ -34,7 +34,7 @@ config SND_AT91_SOC_SAM9G20_WM8731
 
  config SND_AT91_SOC_AFEB9260
  	tristate "SoC Audio support for AFEB9260 board"
-	depends on ATMEL_SSC && ARCH_AT91 && MACH_AFEB9260 && SND_ATMEL_SOC
+	depends on ARCH_AT91 && ATMEL_SSC && ARCH_AT91 && MACH_AFEB9260 && SND_ATMEL_SOC
  	select SND_ATMEL_SOC_PDC
  	select SND_ATMEL_SOC_SSC
  	select SND_SOC_TLV320AIC23
sound/soc/atmel/atmel-pcm-pdc.c +2 -2
index 6a293c7..054ea4d 100644
@@ -159,7 +159,7 @@ static int atmel_pcm_hw_params(struct snd_pcm_substream *substream,
 
  	pr_debug("atmel-pcm: "
  		"hw_params: DMA for %s initialized "
-		"(dma_bytes=%u, period_size=%u)\n",
+		"(dma_bytes=%zu, period_size=%zu)\n",
  		prtd->params->name,
  		runtime->dma_bytes,
  		prtd->period_size);
@@ -201,7 +201,7 @@ static int atmel_pcm_trigger(struct snd_pcm_substream *substream,
  	int ret = 0;
 
  	pr_debug("atmel-pcm:buffer_size = %ld,"
-		"dma_area = %p, dma_bytes = %u\n",
+		"dma_area = %p, dma_bytes = %zu\n",
  		rtd->buffer_size, rtd->dma_area, rtd->dma_bytes);
 
  	switch (cmd) {
sound/soc/atmel/atmel-pcm.c +1 -1
index e99f181..3109db7 100644
@@ -49,7 +49,7 @@ static int atmel_pcm_preallocate_dma_buffer(struct snd_pcm *pcm,
  	buf->private_data = NULL;
  	buf->area = dma_alloc_coherent(pcm->card->dev, size,
  			&buf->addr, GFP_KERNEL);
-	pr_debug("atmel-pcm: alloc dma buffer: area=%p, addr=%p, size=%d\n",
+	pr_debug("atmel-pcm: alloc dma buffer: area=%p, addr=%p, size=%zu\n",
  			(void *)buf->area, (void *)buf->addr, size);
 
  	if (!buf->area)
sound/soc/atmel/atmel_ssc_dai.c +0 -2
index 1c76634..2755750 100644
@@ -42,8 +42,6 @@
  #include <sound/initval.h>
  #include <sound/soc.h>
 
-#include <mach/hardware.h>
-
  #include "atmel-pcm.h"
  #include "atmel_ssc_dai.h"
 
#2 lore raw

On 12/10/2012 10:54 AM, Bo Shen :

Quoted 27 lines

Hi Joachim Eastwood,

Quoted 24 lines · Joachim Eastwood

Not very useful on non AT91/AVR32 platforms but it provides more build coverage and prepares for ARM multiplatform.

Also fixes a couple of format type warnings.

---

Hi,

Build tested on RM9200 and x86_64.

ARCH_AT91 depend is pushed down to the machine drivers since they still relies on mach includes.

regards
Joachim Eastwood

  sound/soc/atmel/Kconfig         | 6 +++---
  sound/soc/atmel/atmel-pcm-pdc.c | 4 ++--
  sound/soc/atmel/atmel-pcm.c     | 2 +-
  sound/soc/atmel/atmel_ssc_dai.c | 2 --
  4 files changed, 6 insertions(+), 8 deletions(-)
Quoted 11 lines

sound/soc/atmel/Kconfig line 3

Quoted 9 lines
sound/soc/atmel/Kconfig +1 -1
index d1b691b..3fdd87f 100644
@@ -1,6 +1,6 @@
  config SND_ATMEL_SOC
      tristate "SoC Audio for the Atmel System-on-Chip"
-    depends on ARCH_AT91
+    depends on HAS_IOMEM

I don't think this change needed. This is not a physical device.

It is needed to prevent the restriction of this driver to AT91 only. This move is interesting for build coverage and ARM multiplatform as indicated by Joachim.

Bye,

Quoted 82 lines
Quoted 79 lines
sound/soc/atmel/Kconfig +0 -0
      help
        Say Y or M if you want to add support for codecs attached to
        the ATMEL SSC interface. You will also need
@@ -24,7 +24,7 @@ config SND_ATMEL_SOC_SSC
 
  config SND_AT91_SOC_SAM9G20_WM8731
      tristate "SoC Audio support for WM8731-based At91sam9g20

evaluation board"

sound/soc/atmel/Kconfig +1 -1
-    depends on ATMEL_SSC && SND_ATMEL_SOC && AT91_PROGRAMMABLE_CLOCKS
+    depends on ARCH_AT91 && ATMEL_SSC && SND_ATMEL_SOC &&

AT91_PROGRAMMABLE_CLOCKS

      select SND_ATMEL_SOC_PDC
      select SND_ATMEL_SOC_SSC
      select SND_SOC_WM8731
sound/soc/atmel/Kconfig +1 -1
@@ -34,7 +34,7 @@ config SND_AT91_SOC_SAM9G20_WM8731
 
  config SND_AT91_SOC_AFEB9260
      tristate "SoC Audio support for AFEB9260 board"
-    depends on ATMEL_SSC && ARCH_AT91 && MACH_AFEB9260 && SND_ATMEL_SOC
+    depends on ARCH_AT91 && ATMEL_SSC && ARCH_AT91 && MACH_AFEB9260

&& SND_ATMEL_SOC

      select SND_ATMEL_SOC_PDC
      select SND_ATMEL_SOC_SSC
      select SND_SOC_TLV320AIC23
sound/soc/atmel/atmel-pcm-pdc.c +1 -1
index 6a293c7..054ea4d 100644
@@ -159,7 +159,7 @@ static int atmel_pcm_hw_params(struct
 snd_pcm_substream *substream,
 
      pr_debug("atmel-pcm: "
          "hw_params: DMA for %s initialized "
-        "(dma_bytes=%u, period_size=%u)\n",
+        "(dma_bytes=%zu, period_size=%zu)\n",
          prtd->params->name,
          runtime->dma_bytes,
          prtd->period_size);
sound/soc/atmel/atmel-pcm-pdc.c +1 -1
@@ -201,7 +201,7 @@ static int atmel_pcm_trigger(struct
 snd_pcm_substream *substream,
      int ret = 0;
 
      pr_debug("atmel-pcm:buffer_size = %ld,"
-        "dma_area = %p, dma_bytes = %u\n",
+        "dma_area = %p, dma_bytes = %zu\n",
          rtd->buffer_size, rtd->dma_area, rtd->dma_bytes);
 
      switch (cmd) {
sound/soc/atmel/atmel-pcm.c +1 -1
index e99f181..3109db7 100644
@@ -49,7 +49,7 @@ static int atmel_pcm_preallocate_dma_buffer(struct
 snd_pcm *pcm,
      buf->private_data = NULL;
      buf->area = dma_alloc_coherent(pcm->card->dev, size,
              &buf->addr, GFP_KERNEL);
-    pr_debug("atmel-pcm: alloc dma buffer: area=%p, addr=%p, size=%d\n",
+    pr_debug("atmel-pcm: alloc dma buffer: area=%p, addr=%p,
 size=%zu\n",
              (void *)buf->area, (void *)buf->addr, size);
      if (!buf->area)
sound/soc/atmel/atmel_ssc_dai.c +0 -2
index 1c76634..2755750 100644
@@ -42,8 +42,6 @@
  #include <sound/initval.h>
  #include <sound/soc.h>
 
-#include <mach/hardware.h>
-
  #include "atmel-pcm.h"
  #include "atmel_ssc_dai.h"
 
Signature · 1 line
Nicolas Ferre
Acked-by on v1 1/1
#3 lore raw
In reply to Joachim Eastwood

On 12/08/2012 02:23 PM, Joachim Eastwood :

Quoted 6 lines

Not very useful on non AT91/AVR32 platforms but it provides more build coverage and prepares for ARM multiplatform.

Also fixes a couple of format type warnings.

seems ok:

Quoted 97 lines

---

Hi,

Build tested on RM9200 and x86_64.

ARCH_AT91 depend is pushed down to the machine drivers since they still relies on mach includes.

regards
Joachim Eastwood

 sound/soc/atmel/Kconfig         | 6 +++---
 sound/soc/atmel/atmel-pcm-pdc.c | 4 ++--
 sound/soc/atmel/atmel-pcm.c     | 2 +-
 sound/soc/atmel/atmel_ssc_dai.c | 2 --
 4 files changed, 6 insertions(+), 8 deletions(-)
sound/soc/atmel/Kconfig +3 -3
index d1b691b..3fdd87f 100644
@@ -1,6 +1,6 @@
 config SND_ATMEL_SOC
 	tristate "SoC Audio for the Atmel System-on-Chip"
-	depends on ARCH_AT91
+	depends on HAS_IOMEM
 	help
 	  Say Y or M if you want to add support for codecs attached to
 	  the ATMEL SSC interface. You will also need
@@ -24,7 +24,7 @@ config SND_ATMEL_SOC_SSC
 
 config SND_AT91_SOC_SAM9G20_WM8731
 	tristate "SoC Audio support for WM8731-based At91sam9g20 evaluation board"
-	depends on ATMEL_SSC && SND_ATMEL_SOC && AT91_PROGRAMMABLE_CLOCKS
+	depends on ARCH_AT91 && ATMEL_SSC && SND_ATMEL_SOC && AT91_PROGRAMMABLE_CLOCKS
 	select SND_ATMEL_SOC_PDC
 	select SND_ATMEL_SOC_SSC
 	select SND_SOC_WM8731
@@ -34,7 +34,7 @@ config SND_AT91_SOC_SAM9G20_WM8731
 
 config SND_AT91_SOC_AFEB9260
 	tristate "SoC Audio support for AFEB9260 board"
-	depends on ATMEL_SSC && ARCH_AT91 && MACH_AFEB9260 && SND_ATMEL_SOC
+	depends on ARCH_AT91 && ATMEL_SSC && ARCH_AT91 && MACH_AFEB9260 && SND_ATMEL_SOC
 	select SND_ATMEL_SOC_PDC
 	select SND_ATMEL_SOC_SSC
 	select SND_SOC_TLV320AIC23
sound/soc/atmel/atmel-pcm-pdc.c +2 -2
index 6a293c7..054ea4d 100644
@@ -159,7 +159,7 @@ static int atmel_pcm_hw_params(struct snd_pcm_substream *substream,
 
 	pr_debug("atmel-pcm: "
 		"hw_params: DMA for %s initialized "
-		"(dma_bytes=%u, period_size=%u)\n",
+		"(dma_bytes=%zu, period_size=%zu)\n",
 		prtd->params->name,
 		runtime->dma_bytes,
 		prtd->period_size);
@@ -201,7 +201,7 @@ static int atmel_pcm_trigger(struct snd_pcm_substream *substream,
 	int ret = 0;
 
 	pr_debug("atmel-pcm:buffer_size = %ld,"
-		"dma_area = %p, dma_bytes = %u\n",
+		"dma_area = %p, dma_bytes = %zu\n",
 		rtd->buffer_size, rtd->dma_area, rtd->dma_bytes);
 
 	switch (cmd) {
sound/soc/atmel/atmel-pcm.c +1 -1
index e99f181..3109db7 100644
@@ -49,7 +49,7 @@ static int atmel_pcm_preallocate_dma_buffer(struct snd_pcm *pcm,
 	buf->private_data = NULL;
 	buf->area = dma_alloc_coherent(pcm->card->dev, size,
 			&buf->addr, GFP_KERNEL);
-	pr_debug("atmel-pcm: alloc dma buffer: area=%p, addr=%p, size=%d\n",
+	pr_debug("atmel-pcm: alloc dma buffer: area=%p, addr=%p, size=%zu\n",
 			(void *)buf->area, (void *)buf->addr, size);
 
 	if (!buf->area)
sound/soc/atmel/atmel_ssc_dai.c +0 -2
index 1c76634..2755750 100644
@@ -42,8 +42,6 @@
 #include <sound/initval.h>
 #include <sound/soc.h>
 
-#include <mach/hardware.h>
-
 #include "atmel-pcm.h"
 #include "atmel_ssc_dai.h"
 
Signature · 1 line
Nicolas Ferre
Applied
#4 lore raw
In reply to Joachim Eastwood
Quoted 2 lines · Joachim Eastwood

Not very useful on non AT91/AVR32 platforms but it provides more build coverage and prepares for ARM multiplatform.

Applied, thanks. Would be nice if this had a different subject line to the previous commit...