mailbox, remoteproc: omap2+: fix compile testing
Subsystems (2)
PATCH 1/1 mailbox, remoteproc: omap2+: fix compile testing
From: Arnd Bergmann <[email protected]>
Selecting CONFIG_OMAP2PLUS_MBOX while compile testing causes a build failure:
WARNING: unmet direct dependencies detected for OMAP2PLUS_MBOX
Depends on [n]: MAILBOX [=y] && (ARCH_OMAP2PLUS || ARCH_K3) Selected by [m]:
- TI_K3_M4_REMOTEPROC [=m] && REMOTEPROC [=y] && (ARCH_K3 || COMPILE_TEST [=y])
Using 'select' to force-enable another subsystem is generally a mistake and causes problems such as this one, so change the three drivers that link against this driver to use 'depends on' instead, and ensure the driver itself can be compile tested regardless of the platform.
When compile-testing without CONFIG_TI_SCI_PROTOCOL=m, there is a chance for a link failure, so add a careful dependency on that.
arm-linux-gnueabi-ld: drivers/remoteproc/ti_k3_m4_remoteproc.o: in function `k3_m4_rproc_probe':
ti_k3_m4_remoteproc.c:(.text.k3_m4_rproc_probe+0x76): undefined reference to `devm_ti_sci_get_by_phandle'
--- drivers/mailbox/Kconfig | 2 +- drivers/mailbox/omap-mailbox.c | 2 +- drivers/remoteproc/Kconfig | 10 ++++------ 3 files changed, 6 insertions(+), 8 deletions(-)
drivers/mailbox/Kconfig +1 -1
@@ -73,7 +73,7 @@ config ARMADA_37XX_RWTM_MBOX config OMAP2PLUS_MBOX tristate "OMAP2+ Mailbox framework support" - depends on ARCH_OMAP2PLUS || ARCH_K3 + depends on ARCH_OMAP2PLUS || ARCH_K3 || COMPILE_TEST help Mailbox implementation for OMAP family chips with hardware for interprocessor communication involving DSP, IVA1.0 and IVA2 in
drivers/mailbox/omap-mailbox.c +1 -1
@@ -603,7 +603,7 @@ static struct platform_driver omap_mbox_driver = { .driver = { .name = "omap-mailbox", .pm = &omap_mbox_pm_ops, - .of_match_table = of_match_ptr(omap_mailbox_of_match), + .of_match_table = omap_mailbox_of_match, }, };module_platform_driver (omap_mbox_driver);
drivers/remoteproc/Kconfig +4 -6
@@ -330,8 +330,7 @@ config STM32_RPROC config TI_K3_DSP_REMOTEPROC tristate "TI K3 DSP remoteproc support" depends on ARCH_K3 - select MAILBOX - select OMAP2PLUS_MBOX + depends on OMAP2PLUS_MBOX help Say m here to support TI's C66x and C71x DSP remote processor subsystems on various TI K3 family of SoCs through the remote
@@ -343,8 +342,8 @@ config TI_K3_DSP_REMOTEPROC config TI_K3_M4_REMOTEPROC tristate "TI K3 M4 remoteproc support" depends on ARCH_K3 || COMPILE_TEST - select MAILBOX - select OMAP2PLUS_MBOX + depends on TI_SCI_PROTOCOL || (COMPILE_TEST && TI_SCI_PROTOCOL=n) + depends on OMAP2PLUS_MBOX help Say m here to support TI's M4 remote processor subsystems on various TI K3 family of SoCs through the remote processor
@@ -356,8 +355,7 @@ config TI_K3_M4_REMOTEPROC config TI_K3_R5_REMOTEPROC tristate "TI K3 R5 remoteproc support" depends on ARCH_K3 - select MAILBOX - select OMAP2PLUS_MBOX + depends on OMAP2PLUS_MBOX help Say m here to support TI's R5F remote processor subsystems on various TI K3 family of SoCs through the remote processor
Signature · 1 line
2.39.2
Quoted 23 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Selecting
CONFIG_OMAP2PLUS_MBOXwhile compile testing causes a build failure:WARNING: unmet direct dependencies detected for
OMAP2PLUS_MBOX
Depends on [n]: MAILBOX [=y] && (ARCH_OMAP2PLUS||ARCH_K3) Selected by [m]:
-TI_K3_M4_REMOTEPROC[=m] && REMOTEPROC [=y] && (ARCH_K3||COMPILE_TEST[=y])Using 'select' to force-enable another subsystem is generally a mistake and causes problems such as this one, so change the three drivers that link against this driver to use 'depends on' instead, and ensure the driver itself can be compile tested regardless of the platform.
When compile-testing without
CONFIG_TI_SCI_PROTOCOL=m, there is a chance for a link failure, so add a careful dependency on that.arm-linux-gnueabi-ld:
drivers/remoteproc/ti_k3_m4_remoteproc.o: in function `k3_m4_rproc_probe':
ti_k3_m4_remoteproc.c:(.text.k3_m4_rproc_probe+0x76): undefined reference to `devm_ti_sci_get_by_phandle'
Quoted 6 lines
Fixes ebcf9008a895 ("remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/mailbox/Kconfig | 2 +- drivers/mailbox/omap-mailbox.c | 2 +- drivers/remoteproc/Kconfig | 10 ++++------
For the remoteproc part:
Quoted 66 lines
3 files changed, 6 insertions(+), 8 deletions(-)drivers/mailbox/Kconfig +1
-1@@ -73,7 +73,7 @@ config ARMADA_37XX_RWTM_MBOX config OMAP2PLUS_MBOX tristate "OMAP2+ Mailbox framework support" - depends on ARCH_OMAP2PLUS || ARCH_K3 + depends on ARCH_OMAP2PLUS || ARCH_K3 || COMPILE_TEST help Mailbox implementation for OMAP family chips with hardware for interprocessor communication involving DSP, IVA1.0 and IVA2 indrivers/mailbox/omap-mailbox.c +1
-1@@ -603,7 +603,7 @@ static struct platform_driver omap_mbox_driver = { .driver = { .name = "omap-mailbox", .pm = &omap_mbox_pm_ops, - .of_match_table = of_match_ptr(omap_mailbox_of_match), + .of_match_table = omap_mailbox_of_match, }, };module_platform_driver (omap_mbox_driver);drivers/remoteproc/Kconfig +4
-6@@ -330,8 +330,7 @@ config STM32_RPROC config TI_K3_DSP_REMOTEPROC tristate "TI K3 DSP remoteproc support" depends on ARCH_K3 - select MAILBOX - select OMAP2PLUS_MBOX + depends on OMAP2PLUS_MBOX help Say m here to support TI's C66x and C71x DSP remote processor subsystems on various TI K3 family of SoCs through the remote@@ -343,8 +342,8 @@ config TI_K3_DSP_REMOTEPROC config TI_K3_M4_REMOTEPROC tristate "TI K3 M4 remoteproc support" depends on ARCH_K3 || COMPILE_TEST - select MAILBOX - select OMAP2PLUS_MBOX + depends on TI_SCI_PROTOCOL || (COMPILE_TEST && TI_SCI_PROTOCOL=n) + depends on OMAP2PLUS_MBOX help Say m here to support TI's M4 remote processor subsystems on various TI K3 family of SoCs through the remote processor@@ -356,8 +355,7 @@ config TI_K3_M4_REMOTEPROC config TI_K3_R5_REMOTEPROC tristate "TI K3 R5 remoteproc support" depends on ARCH_K3 - select MAILBOX - select OMAP2PLUS_MBOX + depends on OMAP2PLUS_MBOX help Say m here to support TI's R5F remote processor subsystems on various TI K3 family of SoCs through the remote processorSignature · 1 line
2.39.2
Quoted 49 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Selecting
CONFIG_OMAP2PLUS_MBOXwhile compile testing causes a build failure:WARNING: unmet direct dependencies detected for
OMAP2PLUS_MBOX
Depends on [n]: MAILBOX [=y] && (ARCH_OMAP2PLUS||ARCH_K3) Selected by [m]:
-TI_K3_M4_REMOTEPROC[=m] && REMOTEPROC [=y] && (ARCH_K3||COMPILE_TEST[=y])Using 'select' to force-enable another subsystem is generally a mistake and causes problems such as this one, so change the three drivers that link against this driver to use 'depends on' instead, and ensure the driver itself can be compile tested regardless of the platform.
When compile-testing without
CONFIG_TI_SCI_PROTOCOL=m, there is a chance for a link failure, so add a careful dependency on that.arm-linux-gnueabi-ld:
drivers/remoteproc/ti_k3_m4_remoteproc.o: in function `k3_m4_rproc_probe':
ti_k3_m4_remoteproc.c:(.text.k3_m4_rproc_probe+0x76): undefined reference to `devm_ti_sci_get_by_phandle'Fixes ebcf9008a895 ("remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/mailbox/Kconfig | 2 +- drivers/mailbox/omap-mailbox.c | 2 +- drivers/remoteproc/Kconfig | 10 ++++------ 3 files changed, 6 insertions(+), 8 deletions(-)drivers/mailbox/Kconfig +1
-1@@ -73,7 +73,7 @@ config ARMADA_37XX_RWTM_MBOX config OMAP2PLUS_MBOX tristate "OMAP2+ Mailbox framework support" - depends on ARCH_OMAP2PLUS || ARCH_K3 + depends on ARCH_OMAP2PLUS || ARCH_K3 || COMPILE_TEST help Mailbox implementation for OMAP family chips with hardware for interprocessor communication involving DSP, IVA1.0 and IVA2 indrivers/mailbox/omap-mailbox.c +0
-0
drivers/mailbox/omap-mailbox.c static struct platform_driver omap_mbox_driver = { · line 606
Quoted 5 lines
drivers/mailbox/omap-mailbox.c +1
-1@@ -603,7 +603,7 @@ static struct platform_driver omap_mbox_driver = { .driver = { .name = "omap-mailbox", .pm = &omap_mbox_pm_ops, - .of_match_table = of_match_ptr(omap_mailbox_of_match), + .of_match_table = omap_mailbox_of_match,
We could have done this in its own series. Someday we need to check everywhere for of_match being unconditionally defined but still using of_match_ptr(). Coccinelle might help here..
Anyway, LGTM
Quoted 38 lines
drivers/mailbox/omap-mailbox.c +0
-0}, };module_platform_driver (omap_mbox_driver);drivers/remoteproc/Kconfig +4
-6@@ -330,8 +330,7 @@ config STM32_RPROC config TI_K3_DSP_REMOTEPROC tristate "TI K3 DSP remoteproc support" depends on ARCH_K3 - select MAILBOX - select OMAP2PLUS_MBOX + depends on OMAP2PLUS_MBOX help Say m here to support TI's C66x and C71x DSP remote processor subsystems on various TI K3 family of SoCs through the remote@@ -343,8 +342,8 @@ config TI_K3_DSP_REMOTEPROC config TI_K3_M4_REMOTEPROC tristate "TI K3 M4 remoteproc support" depends on ARCH_K3 || COMPILE_TEST - select MAILBOX - select OMAP2PLUS_MBOX + depends on TI_SCI_PROTOCOL || (COMPILE_TEST && TI_SCI_PROTOCOL=n) + depends on OMAP2PLUS_MBOX help Say m here to support TI's M4 remote processor subsystems on various TI K3 family of SoCs through the remote processor@@ -356,8 +355,7 @@ config TI_K3_M4_REMOTEPROC config TI_K3_R5_REMOTEPROC tristate "TI K3 R5 remoteproc support" depends on ARCH_K3 - select MAILBOX - select OMAP2PLUS_MBOX + depends on OMAP2PLUS_MBOX help Say m here to support TI's R5F remote processor subsystems on various TI K3 family of SoCs through the remote processor
Quoted 26 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Selecting
CONFIG_OMAP2PLUS_MBOXwhile compile testing causes a build failure:WARNING: unmet direct dependencies detected for
OMAP2PLUS_MBOXDepends on [n]: MAILBOX [=y] && (ARCH_OMAP2PLUS||ARCH_K3) Selected by [m]:
-TI_K3_M4_REMOTEPROC[=m] && REMOTEPROC [=y] && (ARCH_K3||COMPILE_TEST[=y])Using 'select' to force-enable another subsystem is generally a mistake and causes problems such as this one, so change the three drivers that link against this driver to use 'depends on' instead, and ensure the driver itself can be compile tested regardless of the platform.
When compile-testing without
CONFIG_TI_SCI_PROTOCOL=m, there is a chance for a link failure, so add a careful dependency on that.arm-linux-gnueabi-ld:
drivers/remoteproc/ti_k3_m4_remoteproc.o: in function `k3_m4_rproc_probe':
ti_k3_m4_remoteproc.c:(.text.k3_m4_rproc_probe+0x76): undefined reference to `devm_ti_sci_get_by_phandle'
Quoted 9 lines
Fixes ebcf9008a895 ("remoteproc: k3-m4: Add a remoteproc driver forM4F subsystem")
Signed-off-by Arnd Bergmann <[email protected]>---
drivers/mailbox/Kconfig | 2 +-
drivers/mailbox/omap-mailbox.c | 2 +-
drivers/remoteproc/Kconfig | 10 ++++------3 files changed, 6 insertions(+), 8 deletions(-)
Looks good to me:
Quoted 71 lines
drivers/mailbox/Kconfig +0
-0@@ -73,7 +73,7 @@ config ARMADA_37XX_RWTM_MBOX
configOMAP2PLUS_MBOX
tristate "OMAP2+ Mailbox framework support"drivers/mailbox/Kconfig +1
-1- depends on ARCH_OMAP2PLUS || ARCH_K3 + depends on ARCH_OMAP2PLUS || ARCH_K3 || COMPILE_TESThelp
Mailbox implementation for OMAP family chips with hardware for
interprocessor communication involving DSP, IVA1.0 and IVA2 indrivers/mailbox/omap- renamed from drivers/mailbox/omap-mailbox.c +0
-0
mailbox.c
index7a87424657a1..6797770474a5100644drivers/mailbox/omap-mailbox.c +1
-1@@ -603,7 +603,7 @@ static struct platform_driver omap_mbox_driver = { .driver = { .name = "omap-mailbox", .pm = &omap_mbox_pm_ops, - .of_match_table =of_match_ptr (omap_mailbox_of_match), + .of_match_table = omap_mailbox_of_match, },};
module_platform_driver(omap_mbox_driver);drivers/remoteproc/Kconfig +0
-0@@ -330,8 +330,7 @@ config STM32_RPROCconfig
TI_K3_DSP_REMOTEPROC
tristate "TI K3 DSP remoteproc support"
depends onARCH_K3drivers/remoteproc/Kconfig +1
-2- select MAILBOX - select OMAP2PLUS_MBOX + depends on OMAP2PLUS_MBOXhelp
Say m here to support TI's C66x and C71x DSP remote processor
subsystems on various TI K3 family of SoCs through the remotedrivers/remoteproc/Kconfig +0
-0@@ -343,8 +342,8 @@ config TI_K3_DSP_REMOTEPROCconfig
TI_K3_M4_REMOTEPROC
tristate "TI K3 M4 remoteproc support"
depends onARCH_K3||COMPILE_TESTdrivers/remoteproc/Kconfig +1
-2- select MAILBOX - select OMAP2PLUS_MBOX + depends on TI_SCI_PROTOCOL || (COMPILE_TEST &&TI_SCI_PROTOCOL=n)
drivers/remoteproc/Kconfig +1
-0+ depends on OMAP2PLUS_MBOXhelp
Say m here to support TI's M4 remote processor subsystems on various TI K3 family of SoCs through the remote processordrivers/remoteproc/Kconfig +0
-0@@ -356,8 +355,7 @@ config TI_K3_M4_REMOTEPROCconfig
TI_K3_R5_REMOTEPROC
tristate "TI K3 R5 remoteproc support"
depends onARCH_K3drivers/remoteproc/Kconfig +1
-2- select MAILBOX - select OMAP2PLUS_MBOX + depends on OMAP2PLUS_MBOXhelp
Say m here to support TI's R5F remote processor subsystems on various TI K3 family of SoCs through the remote processor
Jassi Brar
maintainerQuoted 73 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Selecting
CONFIG_OMAP2PLUS_MBOXwhile compile testing causes a build failure:WARNING: unmet direct dependencies detected for
OMAP2PLUS_MBOX
Depends on [n]: MAILBOX [=y] && (ARCH_OMAP2PLUS||ARCH_K3) Selected by [m]:
-TI_K3_M4_REMOTEPROC[=m] && REMOTEPROC [=y] && (ARCH_K3||COMPILE_TEST[=y])Using 'select' to force-enable another subsystem is generally a mistake and causes problems such as this one, so change the three drivers that link against this driver to use 'depends on' instead, and ensure the driver itself can be compile tested regardless of the platform.
When compile-testing without
CONFIG_TI_SCI_PROTOCOL=m, there is a chance for a link failure, so add a careful dependency on that.arm-linux-gnueabi-ld:
drivers/remoteproc/ti_k3_m4_remoteproc.o: in function `k3_m4_rproc_probe':
ti_k3_m4_remoteproc.c:(.text.k3_m4_rproc_probe+0x76): undefined reference to `devm_ti_sci_get_by_phandle'Fixes ebcf9008a895 ("remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/mailbox/Kconfig | 2 +- drivers/mailbox/omap-mailbox.c | 2 +- drivers/remoteproc/Kconfig | 10 ++++------ 3 files changed, 6 insertions(+), 8 deletions(-)drivers/mailbox/Kconfig +1
-1@@ -73,7 +73,7 @@ config ARMADA_37XX_RWTM_MBOX config OMAP2PLUS_MBOX tristate "OMAP2+ Mailbox framework support" - depends on ARCH_OMAP2PLUS || ARCH_K3 + depends on ARCH_OMAP2PLUS || ARCH_K3 || COMPILE_TEST help Mailbox implementation for OMAP family chips with hardware for interprocessor communication involving DSP, IVA1.0 and IVA2 indrivers/mailbox/omap-mailbox.c +1
-1@@ -603,7 +603,7 @@ static struct platform_driver omap_mbox_driver = { .driver = { .name = "omap-mailbox", .pm = &omap_mbox_pm_ops, - .of_match_table = of_match_ptr(omap_mailbox_of_match), + .of_match_table = omap_mailbox_of_match, }, };module_platform_driver (omap_mbox_driver);drivers/remoteproc/Kconfig +1
-2@@ -330,8 +330,7 @@ config STM32_RPROC config TI_K3_DSP_REMOTEPROC tristate "TI K3 DSP remoteproc support" depends on ARCH_K3 - select MAILBOX - select OMAP2PLUS_MBOX + depends on OMAP2PLUS_MBOX help Say m here to support TI's C66x and C71x DSP remote processor subsystems on various TI K3 family of SoCs through the remote
drivers/remoteproc/Kconfig config TI_K3_DSP_REMOTEPROC · line 347
Quoted 8 lines
drivers/remoteproc/Kconfig +2
-2@@ -343,8 +342,8 @@ config TI_K3_DSP_REMOTEPROC config TI_K3_M4_REMOTEPROC tristate "TI K3 M4 remoteproc support" depends on ARCH_K3 || COMPILE_TEST - select MAILBOX - select OMAP2PLUS_MBOX + depends on TI_SCI_PROTOCOL || (COMPILE_TEST && TI_SCI_PROTOCOL=n) + depends on OMAP2PLUS_MBOX
TI_K3_M4_REMOTEPROC isn't in the mainline yet so this fragment doesn't apply on my tree.
I can drop just this and apply the rest of the patch, otherwise the patch may go via remoteproc.
Let me know.
Thanks
-Jassi