Re: [1/2] bcma: fix building without OF_IRQ

2016-03-24 Thread Arnd Bergmann
On Thursday 24 March 2016 15:53:14 Kalle Valo wrote:
> Arnd Bergmann  writes:
> 
> > On Wednesday 23 March 2016 15:52:43 Kalle Valo wrote:
> >> > The bcma driver core can be built with or without DT support, but
> >> > it fails to build when CONFIG_OF=y and CONFIG_OF_IRQ=n, which
> >> > can happen on platforms that do not support IRQ domains.
> >> > 
> >> > ERROR: "irq_create_of_mapping" [drivers/bcma/bcma.ko] undefined!
> >> > ERROR: "of_irq_parse_raw" [drivers/bcma/bcma.ko] undefined!
> >> > ERROR: "of_irq_parse_one" [drivers/bcma/bcma.ko] undefined!
> >> > 
> >> > This adds another compile-time check for OF_IRQ, but also
> >> > gets rid of now unneeded #ifdef checks: Using the simpler
> >> > IS_ENABLED() check for OF_IRQ also covers the case of not
> >> > having CONFIG_OF enabled. The check for CONFIG_OF_ADDRESS
> >> > was added to allow building on architectures without
> >> > OF_ADDRESS, but that has been addressed already in
> >> > b1d06b60e90c ("of: Provide static inline function for
> >> > of_translate_address if needed").
> >> > 
> >> > Signed-off-by: Arnd Bergmann 
> >> 
> >> Thanks, applied to wireless-drivers.git.
> >> 
> >
> > Thanks! I see you have applied patch 1/2 but not patch 2/2.
> >
> > As mentioned in the comment for patch 2, it should be tested
> > better, but I want to make sure that someone still has it
> > on their radar.
> 
> Just to avoid any confusions I assume you are talking about this patch:
> 
> [v2] bcma: use of_dma_configure() to set initial dma mask
> https://patchwork.kernel.org/patch/8608751/

Correct.

> It's on my patchwork queue and I'm planning to apply it to
> wireless-drivers-next once it opens again.

Ok, sounds good.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [1/2] bcma: fix building without OF_IRQ

2016-03-24 Thread Kalle Valo
Arnd Bergmann  writes:

> On Wednesday 23 March 2016 15:52:43 Kalle Valo wrote:
>> > The bcma driver core can be built with or without DT support, but
>> > it fails to build when CONFIG_OF=y and CONFIG_OF_IRQ=n, which
>> > can happen on platforms that do not support IRQ domains.
>> > 
>> > ERROR: "irq_create_of_mapping" [drivers/bcma/bcma.ko] undefined!
>> > ERROR: "of_irq_parse_raw" [drivers/bcma/bcma.ko] undefined!
>> > ERROR: "of_irq_parse_one" [drivers/bcma/bcma.ko] undefined!
>> > 
>> > This adds another compile-time check for OF_IRQ, but also
>> > gets rid of now unneeded #ifdef checks: Using the simpler
>> > IS_ENABLED() check for OF_IRQ also covers the case of not
>> > having CONFIG_OF enabled. The check for CONFIG_OF_ADDRESS
>> > was added to allow building on architectures without
>> > OF_ADDRESS, but that has been addressed already in
>> > b1d06b60e90c ("of: Provide static inline function for
>> > of_translate_address if needed").
>> > 
>> > Signed-off-by: Arnd Bergmann 
>> 
>> Thanks, applied to wireless-drivers.git.
>> 
>
> Thanks! I see you have applied patch 1/2 but not patch 2/2.
>
> As mentioned in the comment for patch 2, it should be tested
> better, but I want to make sure that someone still has it
> on their radar.

Just to avoid any confusions I assume you are talking about this patch:

[v2] bcma: use of_dma_configure() to set initial dma mask
https://patchwork.kernel.org/patch/8608751/

It's on my patchwork queue and I'm planning to apply it to
wireless-drivers-next once it opens again. But I'm not able to test the
patch myself, I hope someone else could do it.

-- 
Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [1/2] bcma: fix building without OF_IRQ

2016-03-24 Thread Arnd Bergmann
On Wednesday 23 March 2016 15:52:43 Kalle Valo wrote:
> > The bcma driver core can be built with or without DT support, but
> > it fails to build when CONFIG_OF=y and CONFIG_OF_IRQ=n, which
> > can happen on platforms that do not support IRQ domains.
> > 
> > ERROR: "irq_create_of_mapping" [drivers/bcma/bcma.ko] undefined!
> > ERROR: "of_irq_parse_raw" [drivers/bcma/bcma.ko] undefined!
> > ERROR: "of_irq_parse_one" [drivers/bcma/bcma.ko] undefined!
> > 
> > This adds another compile-time check for OF_IRQ, but also
> > gets rid of now unneeded #ifdef checks: Using the simpler
> > IS_ENABLED() check for OF_IRQ also covers the case of not
> > having CONFIG_OF enabled. The check for CONFIG_OF_ADDRESS
> > was added to allow building on architectures without
> > OF_ADDRESS, but that has been addressed already in
> > b1d06b60e90c ("of: Provide static inline function for
> > of_translate_address if needed").
> > 
> > Signed-off-by: Arnd Bergmann 
> 
> Thanks, applied to wireless-drivers.git.
> 

Thanks! I see you have applied patch 1/2 but not patch 2/2.

As mentioned in the comment for patch 2, it should be tested
better, but I want to make sure that someone still has it
on their radar.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [1/2] bcma: fix building without OF_IRQ

2016-03-23 Thread Kalle Valo

> The bcma driver core can be built with or without DT support, but
> it fails to build when CONFIG_OF=y and CONFIG_OF_IRQ=n, which
> can happen on platforms that do not support IRQ domains.
> 
> ERROR: "irq_create_of_mapping" [drivers/bcma/bcma.ko] undefined!
> ERROR: "of_irq_parse_raw" [drivers/bcma/bcma.ko] undefined!
> ERROR: "of_irq_parse_one" [drivers/bcma/bcma.ko] undefined!
> 
> This adds another compile-time check for OF_IRQ, but also
> gets rid of now unneeded #ifdef checks: Using the simpler
> IS_ENABLED() check for OF_IRQ also covers the case of not
> having CONFIG_OF enabled. The check for CONFIG_OF_ADDRESS
> was added to allow building on architectures without
> OF_ADDRESS, but that has been addressed already in
> b1d06b60e90c ("of: Provide static inline function for
> of_translate_address if needed").
> 
> Signed-off-by: Arnd Bergmann 

Thanks, applied to wireless-drivers.git.

Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] bcma: fix building without OF_IRQ

2016-03-19 Thread Arnd Bergmann
The bcma driver core can be built with or without DT support, but
it fails to build when CONFIG_OF=y and CONFIG_OF_IRQ=n, which
can happen on platforms that do not support IRQ domains.

ERROR: "irq_create_of_mapping" [drivers/bcma/bcma.ko] undefined!
ERROR: "of_irq_parse_raw" [drivers/bcma/bcma.ko] undefined!
ERROR: "of_irq_parse_one" [drivers/bcma/bcma.ko] undefined!

This adds another compile-time check for OF_IRQ, but also
gets rid of now unneeded #ifdef checks: Using the simpler
IS_ENABLED() check for OF_IRQ also covers the case of not
having CONFIG_OF enabled. The check for CONFIG_OF_ADDRESS
was added to allow building on architectures without
OF_ADDRESS, but that has been addressed already in
b1d06b60e90c ("of: Provide static inline function for
of_translate_address if needed").

Signed-off-by: Arnd Bergmann 
---
 drivers/bcma/main.c | 17 -
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 786be8fed39e..1f635471f318 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -136,7 +136,6 @@ static bool bcma_is_core_needed_early(u16 core_id)
return false;
 }
 
-#if defined(CONFIG_OF) && defined(CONFIG_OF_ADDRESS)
 static struct device_node *bcma_of_find_child_device(struct platform_device 
*parent,
 struct bcma_device *core)
 {
@@ -184,7 +183,7 @@ static unsigned int bcma_of_get_irq(struct platform_device 
*parent,
struct of_phandle_args out_irq;
int ret;
 
-   if (!parent || !parent->dev.of_node)
+   if (!IS_ENABLED(CONFIG_OF_IRQ) || !parent || !parent->dev.of_node)
return 0;
 
ret = bcma_of_irq_parse(parent, core, _irq, num);
@@ -202,23 +201,15 @@ static void bcma_of_fill_device(struct platform_device 
*parent,
 {
struct device_node *node;
 
+   if (!IS_ENABLED(CONFIG_OF_IRQ))
+   return;
+
node = bcma_of_find_child_device(parent, core);
if (node)
core->dev.of_node = node;
 
core->irq = bcma_of_get_irq(parent, core, 0);
 }
-#else
-static void bcma_of_fill_device(struct platform_device *parent,
-   struct bcma_device *core)
-{
-}
-static inline unsigned int bcma_of_get_irq(struct platform_device *parent,
-  struct bcma_device *core, int num)
-{
-   return 0;
-}
-#endif /* CONFIG_OF */
 
 unsigned int bcma_core_irq(struct bcma_device *core, int num)
 {
-- 
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html