MFD: Make VEXPRESS MFD controller depends on VEXPRESS systems
PATCH 1/1 MFD: Make VEXPRESS MFD controller depends on VEXPRESS systems
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.odrivers/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(--- drivers/mfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/Kconfig +1 -1
@@ -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.
Signature · 1 line
1.7.9.5
PATCH 1/1 MFD: Make VEXPRESS MFD controller depends on VEXPRESS systems
Quoted 31 lines · Manjunath Goudar
This patch adds a
Kconfigdependency on anARCH_VEXPRESS(it is for both ARM and ARM64)orARCH_VEXPRESS_CA9Xbeing available beforeVEXPRESS_CONFIGcan be enabled. Without this patch,build system can lead to issues. This was discovered during randconfig testing, in whichVEXPRESS_CONFIGwas enabled w/oARCH_VEXPRESSorVEXPRESS_CONFIGbeing enabled,leading to the following error:CC
drivers/mfd/vexpress-config.odrivers/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 <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Deepak Saxena <[email protected]>Cc Samuel Ortiz <[email protected]>Cc Lee Jones <[email protected]>--- drivers/mfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mfd/Kconfig +0
-0
drivers/mfd/Kconfig endmenu · line 1180
Quoted 8 lines
drivers/mfd/Kconfig +1
-1@@ -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.
Signature · 4 lines
Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 1/1 MFD: Make VEXPRESS MFD controller depends on VEXPRESS systems
In reply to Manjunath GoudarQuoted 11 lines · Manjunath Goudar
This patch adds a
Kconfigdependency on anARCH_VEXPRESS(it is for both ARM and ARM64)orARCH_VEXPRESS_CA9Xbeing available beforeVEXPRESS_CONFIGcan be enabled. Without this patch,build system can lead to issues. This was discovered during randconfig testing, in whichVEXPRESS_CONFIGwas enabled w/oARCH_VEXPRESSorVEXPRESS_CONFIGbeing enabled,leading to the following error:CC
drivers/mfd/vexpress-config.odrivers/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]
Quoted 5 lines
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...
drivers/mfd/Kconfig endmenu · line 1180
Quoted 13 lines
drivers/mfd/Kconfig +1
-1@@ -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
A message that is not in the archive (sent off-list or not yet received): CAJFYCKEhekp3VnL4XHF2JeMi4VbDJDdxYvVYPeQ0RzJ4oTrgDQ@mail.gmail.com
PATCH 1/1 MFD: Make VEXPRESS MFD controller depends on VEXPRESS systems
Quoted 11 lines · Manjunath Goudar
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);
Quoted 2 lines
#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?