Skip to contentSkip to conversation

Enable compile testing of TI MSGMGR/SPROXY driver

PATCH Applied Andrew Davis 2 participants 5 messages Oct 15, 2024 – Oct 25, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover Enable compile testing of TI MSGMGR/SPROXY driver

Hello all,

This driver can be compile tested on non-TI platforms. Enabling this also allows compile testing of drivers down the dependency tree, such as TI_SCI_PROTOCOL.

Thanks,
Andrew

Changes for v2:
- Add patch fixing compile test warning in ti_sci.c that is exposed by this series
- Add acks/review tags

Andrew Davis (3):
firmware: ti_sci: Remove use of of_match_ptr() helper
mailbox: ti-msgmgr: Remove use of of_match_ptr() helper
mailbox: ti-msgmgr: Allow building under COMPILE_TEST

 drivers/firmware/ti_sci.c   | 2 +-
 drivers/mailbox/Kconfig     | 2 +-
 drivers/mailbox/ti-msgmgr.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.39.2
#1 lore raw

PATCH v2 1/3 firmware: ti_sci: Remove use of of_match_ptr() helper

When OF support is disabled the of_device_id struct match table can be conditionally compiled out, this helper allows the assignment to also be turned into a NULL conditionally. When the of_device_id struct is not conditionally defined based on OF then the table will be unused causing a warning. The two options are to either set the table as _maybe_unused, or to just remove this helper since the table will always be defined. Do the latter here.

---
 drivers/firmware/ti_sci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/ti_sci.c +1 -1
index 160968301b1fb..6a6bf7a2d1349 100644
@@ -3421,7 +3421,7 @@ static struct platform_driver ti_sci_driver = {
 	.probe = ti_sci_probe,
 	.driver = {
 		   .name = "ti-sci",
-		   .of_match_table = of_match_ptr(ti_sci_of_match),
+		   .of_match_table = ti_sci_of_match,
 		   .suppress_bind_attrs = true,
 	},
 };
Signature · 1 line
2.39.2
#2 lore raw

PATCH v2 2/3 mailbox: ti-msgmgr: Remove use of of_match_ptr() helper

In reply to Andrew Davis

When OF support is disabled the of_device_id struct match table can be conditionally compiled out, this helper allows the assignment to also be turned into a NULL conditionally. When the of_device_id struct is not conditionally defined based on OF then the table will be unused causing a warning. The two options are to either set the table as _maybe_unused, or to just remove this helper since the table will always be defined. Do the latter here.

---
 drivers/mailbox/ti-msgmgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mailbox/ti-msgmgr.c +1 -1
index 9d2d4ff6cda40..8eb8df8d95a4c 100644
@@ -920,7 +920,7 @@ static struct platform_driver ti_msgmgr_driver = {
 	.probe = ti_msgmgr_probe,
 	.driver = {
 		   .name = "ti-msgmgr",
-		   .of_match_table = of_match_ptr(ti_msgmgr_of_match),
+		   .of_match_table = ti_msgmgr_of_match,
 		   .pm = &ti_msgmgr_pm_ops,
 	},
 };
Signature · 1 line
2.39.2
#3 lore raw

PATCH v2 3/3 mailbox: ti-msgmgr: Allow building under COMPILE_TEST

In reply to Andrew Davis

The TI message manager driver can be compiled without ARCH_KEYSTONE nor ARCH_K3 enabled. Allow it to be built under COMPILE_TEST.

---
 drivers/mailbox/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mailbox/Kconfig +1 -1
index 6fb995778636a..af721d769fdf2 100644
@@ -127,7 +127,7 @@ config STI_MBOX
 
 config TI_MESSAGE_MANAGER
 	tristate "Texas Instruments Message Manager Driver"
-	depends on ARCH_KEYSTONE || ARCH_K3
+	depends on ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
 	default ARCH_K3
 	help
 	  An implementation of Message Manager slave driver for Keystone
Signature · 1 line
2.39.2
maintainer Applied
#4 lore raw

Re: (subset) [PATCH v2 0/3] Enable compile testing of TI MSGMGR/SPROXY driver

In reply to Andrew Davis

Hi Andrew Davis,

Quoted 8 lines · Andrew Davis

This driver can be compile tested on non-TI platforms. Enabling this also allows compile testing of drivers down the dependency tree, such as TI_SCI_PROTOCOL.

Thanks,
Andrew

[...]

I have applied the following to branch ti-drivers-soc-next on [1]. Thank you!

[1/3] firmware: ti_sci: Remove use of of_match_ptr() helper

      commit: a4c14f509509a6a24f25edb7619f55f204a8433f

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D