linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soundwire: cdns: Fix compilation error on arm64
@ 2019-04-04  8:12 Jan Kotas
  2019-04-04  8:52 ` Mukesh Ojha
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jan Kotas @ 2019-04-04  8:12 UTC (permalink / raw)
  To: vkoul, sanyog.r.kale, pierre-louis.bossart
  Cc: alsa-devel, linux-kernel, Jan Kotas

On arm64 the cadence_master.c file doesn't compile.

readl and writel are undefined.
This patch fixes that by including io.h.

Signed-off-by: Jan Kotas <jank@cadence.com>
---
 drivers/soundwire/cadence_master.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
index cb6a331f4..0b5bcc209 100644
--- a/drivers/soundwire/cadence_master.c
+++ b/drivers/soundwire/cadence_master.c
@@ -9,6 +9,7 @@
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/interrupt.h>
+#include <linux/io.h>
 #include <linux/module.h>
 #include <linux/mod_devicetable.h>
 #include <linux/soundwire/sdw_registers.h>
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] soundwire: cdns: Fix compilation error on arm64
  2019-04-04  8:12 [PATCH] soundwire: cdns: Fix compilation error on arm64 Jan Kotas
@ 2019-04-04  8:52 ` Mukesh Ojha
  2019-04-14  9:44 ` Vinod Koul
  2019-05-27  5:07 ` Vinod Koul
  2 siblings, 0 replies; 7+ messages in thread
From: Mukesh Ojha @ 2019-04-04  8:52 UTC (permalink / raw)
  To: Jan Kotas, vkoul, sanyog.r.kale, pierre-louis.bossart
  Cc: alsa-devel, linux-kernel


On 4/4/2019 1:42 PM, Jan Kotas wrote:
> On arm64 the cadence_master.c file doesn't compile.
>
> readl and writel are undefined.
> This patch fixes that by including io.h.
>
> Signed-off-by: Jan Kotas <jank@cadence.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

Cheers,
-Mukesh
> ---
>   drivers/soundwire/cadence_master.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
> index cb6a331f4..0b5bcc209 100644
> --- a/drivers/soundwire/cadence_master.c
> +++ b/drivers/soundwire/cadence_master.c
> @@ -9,6 +9,7 @@
>   #include <linux/delay.h>
>   #include <linux/device.h>
>   #include <linux/interrupt.h>
> +#include <linux/io.h>
>   #include <linux/module.h>
>   #include <linux/mod_devicetable.h>
>   #include <linux/soundwire/sdw_registers.h>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] soundwire: cdns: Fix compilation error on arm64
  2019-04-04  8:12 [PATCH] soundwire: cdns: Fix compilation error on arm64 Jan Kotas
  2019-04-04  8:52 ` Mukesh Ojha
@ 2019-04-14  9:44 ` Vinod Koul
  2019-04-15 12:41   ` [alsa-devel] " Pierre-Louis Bossart
  2019-05-27  5:07 ` Vinod Koul
  2 siblings, 1 reply; 7+ messages in thread
From: Vinod Koul @ 2019-04-14  9:44 UTC (permalink / raw)
  To: Jan Kotas; +Cc: sanyog.r.kale, pierre-louis.bossart, alsa-devel, linux-kernel

On 04-04-19, 09:12, Jan Kotas wrote:
> On arm64 the cadence_master.c file doesn't compile.
> 
> readl and writel are undefined.
> This patch fixes that by including io.h.

And I cant verify that without hacking kconfig to force compile the lib.

> 
> Signed-off-by: Jan Kotas <jank@cadence.com>
> ---
>  drivers/soundwire/cadence_master.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
> index cb6a331f4..0b5bcc209 100644
> --- a/drivers/soundwire/cadence_master.c
> +++ b/drivers/soundwire/cadence_master.c
> @@ -9,6 +9,7 @@
>  #include <linux/delay.h>
>  #include <linux/device.h>
>  #include <linux/interrupt.h>
> +#include <linux/io.h>

Why not add asm/io.h which is the header that actually defines
readl/writel?

>  #include <linux/module.h>
>  #include <linux/mod_devicetable.h>
>  #include <linux/soundwire/sdw_registers.h>
> -- 
> 2.15.0

-- 
~Vinod

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [alsa-devel] [PATCH] soundwire: cdns: Fix compilation error on arm64
  2019-04-14  9:44 ` Vinod Koul
@ 2019-04-15 12:41   ` Pierre-Louis Bossart
  2019-04-16  8:43     ` Jan Kotas
  0 siblings, 1 reply; 7+ messages in thread
From: Pierre-Louis Bossart @ 2019-04-15 12:41 UTC (permalink / raw)
  To: Vinod Koul, Jan Kotas; +Cc: sanyog.r.kale, alsa-devel, linux-kernel


>> diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
>> index cb6a331f4..0b5bcc209 100644
>> --- a/drivers/soundwire/cadence_master.c
>> +++ b/drivers/soundwire/cadence_master.c
>> @@ -9,6 +9,7 @@
>>   #include <linux/delay.h>
>>   #include <linux/device.h>
>>   #include <linux/interrupt.h>
>> +#include <linux/io.h>
> 
> Why not add asm/io.h which is the header that actually defines
> readl/writel?

The vast majority of kernel code uses linux/io.h.
We use linux/io.h for SOF as well.

> 
>>   #include <linux/module.h>
>>   #include <linux/mod_devicetable.h>
>>   #include <linux/soundwire/sdw_registers.h>
>> -- 
>> 2.15.0
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [alsa-devel] [PATCH] soundwire: cdns: Fix compilation error on arm64
  2019-04-15 12:41   ` [alsa-devel] " Pierre-Louis Bossart
@ 2019-04-16  8:43     ` Jan Kotas
  2019-05-09  7:00       ` Jan Kotas
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kotas @ 2019-04-16  8:43 UTC (permalink / raw)
  To: Pierre-Louis Bossart, Vinod Koul
  Cc: Jan Kotas, sanyog.r.kale, alsa-devel, LKML

> On 14 Apr 2019, at 11:44, Vinod Koul <vkoul@kernel.org> wrote:
> 
> 
> On 04-04-19, 09:12, Jan Kotas wrote:
>> On arm64 the cadence_master.c file doesn't compile.
>> 
>> readl and writel are undefined.
>> This patch fixes that by including io.h.
> 
> And I cant verify that without hacking kconfig to force compile the lib.

I’m working on a new driver which uses the SOUNDWIRE_CADENCE:
Here’s a diff of the Kconfig, it’s a very early stage.

diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig
index 19c8efb9a..90d569e03 100644
--- a/drivers/soundwire/Kconfig
+++ b/drivers/soundwire/Kconfig
@@ -34,4 +34,10 @@ config SOUNDWIRE_INTEL
      enable this config option to get the SoundWire support for that
      device.

+config SOUNDWIRE_CADENCE_PLATFORM
+   tristate "SoundWire Cadence Platform driver"
+   select SOUNDWIRE_CADENCE
+   select SOUNDWIRE_BUS
+   help
+     SoundWire Cadence Platform drivers.
 endif

I haven’t modified any of the existing lines. 
SOUNDWIRE_CADENCE doesn’t depend on anything, except SOUNDWIRE,
so it should work, when selected.

> On 15 Apr 2019, at 14:41, Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> wrote:
> 
> 
>>> diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
>>> index cb6a331f4..0b5bcc209 100644
>>> --- a/drivers/soundwire/cadence_master.c
>>> +++ b/drivers/soundwire/cadence_master.c
>>> @@ -9,6 +9,7 @@
>>>  #include <linux/delay.h>
>>>  #include <linux/device.h>
>>>  #include <linux/interrupt.h>
>>> +#include <linux/io.h>
>> Why not add asm/io.h which is the header that actually defines
>> readl/writel?
> 
> The vast majority of kernel code uses linux/io.h.
> We use linux/io.h for SOF as well.

I use linux/io.h in my other drivers too.

> 
>>>  #include <linux/module.h>
>>>  #include <linux/mod_devicetable.h>
>>>  #include <linux/soundwire/sdw_registers.h>
>>> -- 
>>> 2.15.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [alsa-devel] [PATCH] soundwire: cdns: Fix compilation error on arm64
  2019-04-16  8:43     ` Jan Kotas
@ 2019-05-09  7:00       ` Jan Kotas
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Kotas @ 2019-05-09  7:00 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Pierre-Louis Bossart, sanyog.r.kale, alsa-devel, LKML, Jan Kotas

Hello,

Is there a reason for not accepting this patch?
Do you want me to change anything in v2?

Regards,
Jan

> On 16 Apr 2019, at 10:43, Jan Kotas <jank@cadence.com> wrote:
> 
>> On 14 Apr 2019, at 11:44, Vinod Koul <vkoul@kernel.org> wrote:
>> 
>> 
>> On 04-04-19, 09:12, Jan Kotas wrote:
>>> On arm64 the cadence_master.c file doesn't compile.
>>> 
>>> readl and writel are undefined.
>>> This patch fixes that by including io.h.
>> 
>> And I cant verify that without hacking kconfig to force compile the lib.
> 
> I’m working on a new driver which uses the SOUNDWIRE_CADENCE:
> Here’s a diff of the Kconfig, it’s a very early stage.
> 
> diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig
> index 19c8efb9a..90d569e03 100644
> --- a/drivers/soundwire/Kconfig
> +++ b/drivers/soundwire/Kconfig
> @@ -34,4 +34,10 @@ config SOUNDWIRE_INTEL
>      enable this config option to get the SoundWire support for that
>      device.
> 
> +config SOUNDWIRE_CADENCE_PLATFORM
> +   tristate "SoundWire Cadence Platform driver"
> +   select SOUNDWIRE_CADENCE
> +   select SOUNDWIRE_BUS
> +   help
> +     SoundWire Cadence Platform drivers.
> endif
> 
> I haven’t modified any of the existing lines. 
> SOUNDWIRE_CADENCE doesn’t depend on anything, except SOUNDWIRE,
> so it should work, when selected.
> 
>> On 15 Apr 2019, at 14:41, Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> wrote:
>> 
>> 
>>>> diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
>>>> index cb6a331f4..0b5bcc209 100644
>>>> --- a/drivers/soundwire/cadence_master.c
>>>> +++ b/drivers/soundwire/cadence_master.c
>>>> @@ -9,6 +9,7 @@
>>>> #include <linux/delay.h>
>>>> #include <linux/device.h>
>>>> #include <linux/interrupt.h>
>>>> +#include <linux/io.h>
>>> Why not add asm/io.h which is the header that actually defines
>>> readl/writel?
>> 
>> The vast majority of kernel code uses linux/io.h.
>> We use linux/io.h for SOF as well.
> 
> I use linux/io.h in my other drivers too.
> 
>> 
>>>> #include <linux/module.h>
>>>> #include <linux/mod_devicetable.h>
>>>> #include <linux/soundwire/sdw_registers.h>
>>>> -- 
>>>> 2.15.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] soundwire: cdns: Fix compilation error on arm64
  2019-04-04  8:12 [PATCH] soundwire: cdns: Fix compilation error on arm64 Jan Kotas
  2019-04-04  8:52 ` Mukesh Ojha
  2019-04-14  9:44 ` Vinod Koul
@ 2019-05-27  5:07 ` Vinod Koul
  2 siblings, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2019-05-27  5:07 UTC (permalink / raw)
  To: Jan Kotas; +Cc: sanyog.r.kale, pierre-louis.bossart, alsa-devel, linux-kernel

On 04-04-19, 09:12, Jan Kotas wrote:
> On arm64 the cadence_master.c file doesn't compile.
> 
> readl and writel are undefined.
> This patch fixes that by including io.h.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-27  5:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-04  8:12 [PATCH] soundwire: cdns: Fix compilation error on arm64 Jan Kotas
2019-04-04  8:52 ` Mukesh Ojha
2019-04-14  9:44 ` Vinod Koul
2019-04-15 12:41   ` [alsa-devel] " Pierre-Louis Bossart
2019-04-16  8:43     ` Jan Kotas
2019-05-09  7:00       ` Jan Kotas
2019-05-27  5:07 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).