Skip to contentSkip to conversation

bus: ti-sysc: Fix build warning for 64-bit build

PATCH Superseded Tony Lindgren 3 participants 8 messages Aug 4, 2023 – Aug 9, 2023 OMAP2+ support

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

PATCH 1/3 bus: ti-sysc: Fix build warning for 64-bit build

Fix "warning: cast from pointer to integer of different size" on 64-bit builds.

Note that this is a cosmetic fix at this point as the driver is not yet used for 64-bit systems.

Fixes feaa8baee82a ("bus: ti-sysc: Implement SoC revision handling")
---
 drivers/bus/ti-sysc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/ti-sysc.c +1 -1
@@ -3104,7 +3104,7 @@ static int sysc_init_static_data(struct sysc *ddata)
 
 	match = soc_device_match(sysc_soc_match);
 	if (match && match->data)
-		sysc_soc->soc = (int)match->data;
+		sysc_soc->soc = (unsigned long)match->data;
 
 	/*
 	 * Check and warn about possible old incomplete dtb. We now want to see
Signature · 1 line
2.41.0
author maintainer
#1 lore raw

PATCH 2/3 bus: ti-sysc: Build driver for TI K3 SoCs

Allow building ti-sysc also for K3 SoCs. This allows configuring the wkup domain devices for SYSCONFIG register wake-up events in a generic way.

---
 drivers/bus/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/bus/Kconfig +2 -1
@@ -210,7 +210,8 @@ config  TI_PWMSS
 
 config TI_SYSC
 	bool "TI sysc interconnect target module driver"
-	depends on ARCH_OMAP2PLUS
+	depends on ARCH_OMAP2PLUS || ARCH_K3
+	default y
 	help
 	  Generic driver for Texas Instruments interconnect target module
 	  found on many TI SoCs.
Signature · 1 line
2.41.0
Reviewed-by on v1 2/3
#2 lore raw

Re: [PATCH 2/3] bus: ti-sysc: Build driver for TI K3 SoCs

Quoted 2 lines · Tony Lindgren

Allow building ti-sysc also for K3 SoCs. This allows configuring the wkup domain devices for SYSCONFIG register wake-up events in a generic way.

If possible, can we add explanation also on why it now needs to be default y in the Kconfig?

Quoted 10 lines
---
 drivers/bus/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

drivers/bus/Kconfig config TI_PWMSS · line 214

Quoted 6 lines
drivers/bus/Kconfig +2 -1
@@ -210,7 +210,8 @@ config  TI_PWMSS
 
 config TI_SYSC
 	bool "TI sysc interconnect target module driver"
-	depends on ARCH_OMAP2PLUS
+	depends on ARCH_OMAP2PLUS || ARCH_K3
+	default y
Quoted 5 lines
drivers/bus/Kconfig +0 -0
 	help
 	  Generic driver for Texas Instruments interconnect target module
 	  found on many TI SoCs.
Signature · 1 line
2.41.0
Signature · 2 lines
Best regards,
Dhruva Gole <[email protected]>
author maintainer
#3 lore raw

Re: [PATCH 2/3] bus: ti-sysc: Build driver for TI K3 SoCs

Quoted 6 lines · Dhruva Gole
Quoted 2 lines · Tony Lindgren

Allow building ti-sysc also for K3 SoCs. This allows configuring the wkup domain devices for SYSCONFIG register wake-up events in a generic way.

If possible, can we add explanation also on why it now needs to be default y in the Kconfig?

Sure will add that for v2.

Thanks,

Tony

author maintainer
#4 lore raw

PATCH 3/3 bus: ti-sysc: Configure uart quirks for k3 SoC

In reply to Tony Lindgren

Enable the uart quirks similar to the earlier SoCs. Let's assume we are likely going to need a k3 specific quirk mask separate from the earlier SoCs, so let's not start changing the revision register mask at this point.

Note that SYSC_QUIRK_LEGACY_IDLE will be needed until we can remove the need for pm_runtime_irq_safe() from 8250_omap driver.

---
 drivers/bus/ti-sysc.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/bus/ti-sysc.c +2 -0
@@ -1525,6 +1525,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
 		   SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
 	SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x47422e03, 0xffffffff,
 		   SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
+	SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x47424e03, 0xffffffff,
+		   SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
 
 	/* Quirks that need to be set based on the module address */
 	SYSC_QUIRK("mcpdm", 0x40132000, 0, 0x10, -ENODEV, 0x50000800, 0xffffffff,
Signature · 1 line
2.41.0
Reviewed-by on v1 1/3
#5 lore raw
In reply to Tony Lindgren

Hi Tony,

Quoted 2 lines · Tony Lindgren

Fix "warning: cast from pointer to integer of different size" on 64-bit builds.

Thanks for enabling this on 64 bit, will help us in K3 SOCs.

Quoted 14 lines

Note that this is a cosmetic fix at this point as the driver is not yet used for 64-bit systems.

Fixes feaa8baee82a ("bus: ti-sysc: Implement SoC revision handling")
---
 drivers/bus/ti-sysc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

drivers/bus/ti-sysc.c static int sysc_init_static_data(struct sysc *ddata) · line 3107

Quoted 5 lines
drivers/bus/ti-sysc.c +1 -1
@@ -3104,7 +3104,7 @@ static int sysc_init_static_data(struct sysc *ddata)
 
 	match = soc_device_match(sysc_soc_match);
 	if (match && match->data)
-		sysc_soc->soc = (int)match->data;
+		sysc_soc->soc = (unsigned long)match->data;
Quoted 5 lines
drivers/bus/ti-sysc.c +0 -0
 	/*
 	 * Check and warn about possible old incomplete dtb. We now want to see
Signature · 1 line
2.41.0
Signature · 2 lines
Best regards,
Dhruva Gole <[email protected]>
#6 lore raw
Quoted 23 lines · Dhruva Gole

Hi Tony,

Quoted 2 lines · Tony Lindgren

Fix "warning: cast from pointer to integer of different size" on 64-bit builds.

Thanks for enabling this on 64 bit, will help us in K3 SOCs.

Quoted 15 lines

Note that this is a cosmetic fix at this point as the driver is not yet used for 64-bit systems.

Fixes feaa8baee82a ("bus: ti-sysc: Implement SoC revision handling")
---
 drivers/bus/ti-sysc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/ti-sysc.c +0 -0
@@ -3104,7 +3104,7 @@ static int sysc_init_static_data(struct sysc *ddata)
 
Quoted 6 lines

drivers/bus/ti-sysc.c static int sysc_init_static_data(struct sysc *ddata) · line 3107

Quoted 4 lines
drivers/bus/ti-sysc.c +1 -1
 	match = soc_device_match(sysc_soc_match);
 	if (match && match->data)
-		sysc_soc->soc = (int)match->data;
+		sysc_soc->soc = (unsigned long)match->data;

Dumb q: is'nt this an enum? Is it better to cast it as (enum sysc_soc)match->data ?

Quoted 10 lines
Quoted 6 lines
drivers/bus/ti-sysc.c +0 -0
 	/*
 	 * Check and warn about possible old incomplete dtb. We now want to see
Signature · 1 line
2.41.0
Signature · 2 lines
Best regards,
Dhruva Gole <[email protected]>
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
author maintainer
#7 lore raw
Quoted 11 lines · Nishanth Menon
Quoted 7 lines · Dhruva Gole

drivers/bus/ti-sysc.c static int sysc_init_static_data(struct sysc *ddata) · line 3107

Quoted 4 lines · Tony Lindgren
drivers/bus/ti-sysc.c +1 -1
 	match = soc_device_match(sysc_soc_match);
 	if (match && match->data)
-		sysc_soc->soc = (int)match->data;
+		sysc_soc->soc = (unsigned long)match->data;

Dumb q: is'nt this an enum? Is it better to cast it as (enum sysc_soc)match->data ?

Good idea, will update.

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel