linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MFD: Make VEXPRESS MFD controller depends on VEXPRESS systems
@ 2013-08-04  8:00 Manjunath Goudar
  2013-08-05  7:59 ` Lee Jones
  2013-08-06 10:36 ` Pawel Moll
  0 siblings, 2 replies; 4+ messages in thread
From: Manjunath Goudar @ 2013-08-04  8:00 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds a Kconfig dependency on an ARCH_VEXPRESS(it is for
both ARM and ARM64) or ARCH_VEXPRESS_CA9X being available before
VEXPRESS_CONFIG can be enabled. Without this patch,build system
can lead to issues. This was discovered during randconfig testing,
in which VEXPRESS_CONFIG was enabled w/o ARCH_VEXPRESS or VEXPRESS_CONFIG
being enabled,leading to the following error:

CC      drivers/mfd/vexpress-config.o
drivers/mfd/vexpress-config.c: In function ?__vexpress_config_func_get?:
drivers/mfd/vexpress-config.c:117:4: error: implicit declaration of function
?of_find_node_by_phandle? [-Werror=implicit-function-declaration]
    bridge_node = of_find_node_by_phandle(
    ^
drivers/mfd/vexpress-config.c:117:16: warning: assignment makes pointer from
integer without a cast [enabled by default]
    bridge_node = of_find_node_by_phandle(

Signed-off-by: Manjunath Goudar <manjunath.goudar@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Deepak Saxena <dsaxena@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 633ee43..c9202f6 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1174,7 +1174,7 @@ endmenu
 
 config VEXPRESS_CONFIG
 	bool "ARM Versatile Express platform infrastructure"
-	depends on ARM || ARM64
+	depends on ARCH_VEXPRESS || ARCH_VEXPRESS_CA9X4
 	help
 	  Platform configuration infrastructure for the ARM Ltd.
 	  Versatile Express.
-- 
1.7.9.5

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

* [PATCH] MFD: Make VEXPRESS MFD controller depends on VEXPRESS systems
  2013-08-04  8:00 [PATCH] MFD: Make VEXPRESS MFD controller depends on VEXPRESS systems Manjunath Goudar
@ 2013-08-05  7:59 ` Lee Jones
  2013-08-06 10:36 ` Pawel Moll
  1 sibling, 0 replies; 4+ messages in thread
From: Lee Jones @ 2013-08-05  7:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 04 Aug 2013, Manjunath Goudar wrote:

> This patch adds a Kconfig dependency on an ARCH_VEXPRESS(it is for
> both ARM and ARM64) or ARCH_VEXPRESS_CA9X being available before
> VEXPRESS_CONFIG can be enabled. Without this patch,build system
> can lead to issues. This was discovered during randconfig testing,
> in which VEXPRESS_CONFIG was enabled w/o ARCH_VEXPRESS or VEXPRESS_CONFIG
> being enabled,leading to the following error:
> 
> CC      drivers/mfd/vexpress-config.o
> drivers/mfd/vexpress-config.c: In function ?__vexpress_config_func_get?:
> drivers/mfd/vexpress-config.c:117:4: error: implicit declaration of function
> ?of_find_node_by_phandle? [-Werror=implicit-function-declaration]
>     bridge_node = of_find_node_by_phandle(
>     ^
> drivers/mfd/vexpress-config.c:117:16: warning: assignment makes pointer from
> integer without a cast [enabled by default]
>     bridge_node = of_find_node_by_phandle(
> 
> Signed-off-by: Manjunath Goudar <manjunath.goudar@linaro.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Deepak Saxena <dsaxena@linaro.org>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/mfd/Kconfig |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 633ee43..c9202f6 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -1174,7 +1174,7 @@ endmenu
>  
>  config VEXPRESS_CONFIG
>  	bool "ARM Versatile Express platform infrastructure"
> -	depends on ARM || ARM64
> +	depends on ARCH_VEXPRESS || ARCH_VEXPRESS_CA9X4
>  	help
>  	  Platform configuration infrastructure for the ARM Ltd.
>  	  Versatile Express.

Looks fine to me, but I'd really like Arnd's Ack on this one.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH] MFD: Make VEXPRESS MFD controller depends on VEXPRESS systems
  2013-08-04  8:00 [PATCH] MFD: Make VEXPRESS MFD controller depends on VEXPRESS systems Manjunath Goudar
  2013-08-05  7:59 ` Lee Jones
@ 2013-08-06 10:36 ` Pawel Moll
       [not found]   ` <CAJFYCKEhekp3VnL4XHF2JeMi4VbDJDdxYvVYPeQ0RzJ4oTrgDQ@mail.gmail.com>
  1 sibling, 1 reply; 4+ messages in thread
From: Pawel Moll @ 2013-08-06 10:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 2013-08-04 at 09:00 +0100, Manjunath Goudar wrote:
> This patch adds a Kconfig dependency on an ARCH_VEXPRESS(it is for
> both ARM and ARM64) or ARCH_VEXPRESS_CA9X being available before
> VEXPRESS_CONFIG can be enabled. Without this patch,build system
> can lead to issues. This was discovered during randconfig testing,
> in which VEXPRESS_CONFIG was enabled w/o ARCH_VEXPRESS or VEXPRESS_CONFIG
> being enabled,leading to the following error:
> 
> CC      drivers/mfd/vexpress-config.o
> drivers/mfd/vexpress-config.c: In function ?__vexpress_config_func_get?:
> drivers/mfd/vexpress-config.c:117:4: error: implicit declaration of function
> ?of_find_node_by_phandle? [-Werror=implicit-function-declaration]
>     bridge_node = of_find_node_by_phandle(
>     ^
> drivers/mfd/vexpress-config.c:117:16: warning: assignment makes pointer from
> integer without a cast [enabled by default]
>     bridge_node = of_find_node_by_phandle(

Thanks for reporting the problem...

> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 633ee43..c9202f6 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -1174,7 +1174,7 @@ endmenu
>  
>  config VEXPRESS_CONFIG
>  	bool "ARM Versatile Express platform infrastructure"
> -	depends on ARM || ARM64
> +	depends on ARCH_VEXPRESS || ARCH_VEXPRESS_CA9X4
>  	help
>  	  Platform configuration infrastructure for the ARM Ltd.
>  	  Versatile Express.

... but this is not the right way to fix it. In case of ARM64 there is
no (or maybe: there will be no) ARCH_VEXPRESS nor ARCH_ANYTHING if it
comes to it ;-)

What is really missing is a stub for of_find_node_by_phandle() in case
of CONFIG_OF != y. Care to send a patch adding it?

Thanks!

Pawel

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

* [PATCH] MFD: Make VEXPRESS MFD controller depends on VEXPRESS systems
       [not found]   ` <CAJFYCKEhekp3VnL4XHF2JeMi4VbDJDdxYvVYPeQ0RzJ4oTrgDQ@mail.gmail.com>
@ 2013-08-06 11:24     ` Pawel Moll
  0 siblings, 0 replies; 4+ messages in thread
From: Pawel Moll @ 2013-08-06 11:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 2013-08-06 at 12:18 +0100, Manjunath Goudar wrote:

> You are suggesting me to fix this issue using following code.
> 
> 
> #ifdef CONFIG_OF
>                         bridge_node = of_find_node_by_phandle(
>                                         be32_to_cpup(prop));
> #endif
>                 break;
>                 }
> #ifdef CONFIG_OF
>                 bridge_node = of_get_next_parent(bridge_node);
> #endif
> 
Em, this would be a possibility, but I think the right thing to do is to
add dummies to "include/linux/of.h". Search for "of_get_parent" and
"of_find_node_by_name" in this header - you will find declarations in
"#ifdef CONFIG_OF" block and dummy implementations (returning NULL) in
the equivalent #else part.

Pawe?

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

end of thread, other threads:[~2013-08-06 11:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-04  8:00 [PATCH] MFD: Make VEXPRESS MFD controller depends on VEXPRESS systems Manjunath Goudar
2013-08-05  7:59 ` Lee Jones
2013-08-06 10:36 ` Pawel Moll
     [not found]   ` <CAJFYCKEhekp3VnL4XHF2JeMi4VbDJDdxYvVYPeQ0RzJ4oTrgDQ@mail.gmail.com>
2013-08-06 11:24     ` Pawel Moll

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).