linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/3] bus: ti-sysc: Fix build warning for 64-bit build
@ 2023-08-09  9:27 Tony Lindgren
  2023-08-09  9:27 ` [PATCH v2 2/3] bus: ti-sysc: Build driver for TI K3 SoCs Tony Lindgren
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Tony Lindgren @ 2023-08-09  9:27 UTC (permalink / raw)
  To: linux-omap
  Cc: Dave Gerlach, Dhruva Gole, Faiz Abbas, Greg Kroah-Hartman,
	Keerthy, Kevin Hilman, Nishanth Menon, linux-kernel,
	linux-arm-kernel

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")
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/bus/ti-sysc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -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 = (enum sysc_soc)match->data;
 
 	/*
 	 * Check and warn about possible old incomplete dtb. We now want to see
-- 
2.41.0

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 2/3] bus: ti-sysc: Build driver for TI K3 SoCs
  2023-08-09  9:27 [PATCH v2 1/3] bus: ti-sysc: Fix build warning for 64-bit build Tony Lindgren
@ 2023-08-09  9:27 ` Tony Lindgren
  2023-08-09 11:59   ` Nishanth Menon
  2023-08-09  9:27 ` [PATCH v2 3/3] bus: ti-sysc: Configure uart quirks for k3 SoC Tony Lindgren
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2023-08-09  9:27 UTC (permalink / raw)
  To: linux-omap
  Cc: Dave Gerlach, Dhruva Gole, Faiz Abbas, Greg Kroah-Hartman,
	Keerthy, Kevin Hilman, Nishanth Menon, linux-kernel,
	linux-arm-kernel

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.

As this is an interconnect level driver, default to built-in on K3 SoCs
to probe the devices connected to the wkup domain like gpio, uart and
timers.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/bus/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -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.
-- 
2.41.0

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 3/3] bus: ti-sysc: Configure uart quirks for k3 SoC
  2023-08-09  9:27 [PATCH v2 1/3] bus: ti-sysc: Fix build warning for 64-bit build Tony Lindgren
  2023-08-09  9:27 ` [PATCH v2 2/3] bus: ti-sysc: Build driver for TI K3 SoCs Tony Lindgren
@ 2023-08-09  9:27 ` Tony Lindgren
  2023-08-09 12:00   ` Nishanth Menon
  2023-08-09  9:40 ` [PATCH v2 1/3] bus: ti-sysc: Fix build warning for 64-bit build Dhruva Gole
  2023-08-09 11:59 ` Nishanth Menon
  3 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2023-08-09  9:27 UTC (permalink / raw)
  To: linux-omap
  Cc: Dave Gerlach, Dhruva Gole, Faiz Abbas, Greg Kroah-Hartman,
	Keerthy, Kevin Hilman, Nishanth Menon, linux-kernel,
	linux-arm-kernel

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.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/bus/ti-sysc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -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,
-- 
2.41.0

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/3] bus: ti-sysc: Fix build warning for 64-bit build
  2023-08-09  9:27 [PATCH v2 1/3] bus: ti-sysc: Fix build warning for 64-bit build Tony Lindgren
  2023-08-09  9:27 ` [PATCH v2 2/3] bus: ti-sysc: Build driver for TI K3 SoCs Tony Lindgren
  2023-08-09  9:27 ` [PATCH v2 3/3] bus: ti-sysc: Configure uart quirks for k3 SoC Tony Lindgren
@ 2023-08-09  9:40 ` Dhruva Gole
  2023-08-09  9:55   ` Tony Lindgren
  2023-08-09 11:59 ` Nishanth Menon
  3 siblings, 1 reply; 8+ messages in thread
From: Dhruva Gole @ 2023-08-09  9:40 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-omap, Dave Gerlach, Faiz Abbas, Greg Kroah-Hartman, Keerthy,
	Kevin Hilman, Nishanth Menon, linux-kernel, linux-arm-kernel

On Aug 09, 2023 at 12:27:20 +0300, Tony Lindgren wrote:
> 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")
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  drivers/bus/ti-sysc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
> --- a/drivers/bus/ti-sysc.c
> +++ b/drivers/bus/ti-sysc.c
> @@ -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 = (enum sysc_soc)match->data;

Thanks for the suggestion Nishanth,

Reviewed-by: Dhruva Gole <d-gole@ti.com>

Maybe something unrelated to this patch, but the driver has some minor
warning when built with W=1:

make W=1 ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- drivers/bus/ti-sysc.o

drivers/bus/ti-sysc.c:156: warning: Function parameter or member 'sysconfig' not described in 'sysc'

>  
>  	/*
>  	 * Check and warn about possible old incomplete dtb. We now want to see
> -- 
> 2.41.0

-- 
Best regards,
Dhruva Gole <d-gole@ti.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/3] bus: ti-sysc: Fix build warning for 64-bit build
  2023-08-09  9:40 ` [PATCH v2 1/3] bus: ti-sysc: Fix build warning for 64-bit build Dhruva Gole
@ 2023-08-09  9:55   ` Tony Lindgren
  0 siblings, 0 replies; 8+ messages in thread
From: Tony Lindgren @ 2023-08-09  9:55 UTC (permalink / raw)
  To: Dhruva Gole
  Cc: linux-omap, Dave Gerlach, Faiz Abbas, Greg Kroah-Hartman, Keerthy,
	Kevin Hilman, Nishanth Menon, linux-kernel, linux-arm-kernel

* Dhruva Gole <d-gole@ti.com> [230809 09:41]:
> Maybe something unrelated to this patch, but the driver has some minor
> warning when built with W=1:
> 
> make W=1 ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- drivers/bus/ti-sysc.o
> 
> drivers/bus/ti-sysc.c:156: warning: Function parameter or member 'sysconfig' not described in 'sysc'

Thanks yes it's unrelated, looks like sysconfig is not documented. I'll
send a patch for that separately.

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/3] bus: ti-sysc: Fix build warning for 64-bit build
  2023-08-09  9:27 [PATCH v2 1/3] bus: ti-sysc: Fix build warning for 64-bit build Tony Lindgren
                   ` (2 preceding siblings ...)
  2023-08-09  9:40 ` [PATCH v2 1/3] bus: ti-sysc: Fix build warning for 64-bit build Dhruva Gole
@ 2023-08-09 11:59 ` Nishanth Menon
  3 siblings, 0 replies; 8+ messages in thread
From: Nishanth Menon @ 2023-08-09 11:59 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-omap, Dave Gerlach, Dhruva Gole, Faiz Abbas,
	Greg Kroah-Hartman, Keerthy, Kevin Hilman, linux-kernel,
	linux-arm-kernel

On 12:27-20230809, Tony Lindgren wrote:
> 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")
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  drivers/bus/ti-sysc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
> --- a/drivers/bus/ti-sysc.c
> +++ b/drivers/bus/ti-sysc.c
> @@ -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 = (enum sysc_soc)match->data;
>  
>  	/*
>  	 * Check and warn about possible old incomplete dtb. We now want to see
> -- 
> 2.41.0

Reviewed-by: Nishanth Menon <nm@ti.com>

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 2/3] bus: ti-sysc: Build driver for TI K3 SoCs
  2023-08-09  9:27 ` [PATCH v2 2/3] bus: ti-sysc: Build driver for TI K3 SoCs Tony Lindgren
@ 2023-08-09 11:59   ` Nishanth Menon
  0 siblings, 0 replies; 8+ messages in thread
From: Nishanth Menon @ 2023-08-09 11:59 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-omap, Dave Gerlach, Dhruva Gole, Faiz Abbas,
	Greg Kroah-Hartman, Keerthy, Kevin Hilman, linux-kernel,
	linux-arm-kernel

On 12:27-20230809, Tony Lindgren wrote:
> 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.
> 
> As this is an interconnect level driver, default to built-in on K3 SoCs
> to probe the devices connected to the wkup domain like gpio, uart and
> timers.
> 
> Reviewed-by: Dhruva Gole <d-gole@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  drivers/bus/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
> --- a/drivers/bus/Kconfig
> +++ b/drivers/bus/Kconfig
> @@ -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.
> -- 
> 2.41.0

Reviewed-by: Nishanth Menon <nm@ti.com>

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 3/3] bus: ti-sysc: Configure uart quirks for k3 SoC
  2023-08-09  9:27 ` [PATCH v2 3/3] bus: ti-sysc: Configure uart quirks for k3 SoC Tony Lindgren
@ 2023-08-09 12:00   ` Nishanth Menon
  0 siblings, 0 replies; 8+ messages in thread
From: Nishanth Menon @ 2023-08-09 12:00 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-omap, Dave Gerlach, Dhruva Gole, Faiz Abbas,
	Greg Kroah-Hartman, Keerthy, Kevin Hilman, linux-kernel,
	linux-arm-kernel

On 12:27-20230809, Tony Lindgren wrote:
> 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.
> 
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  drivers/bus/ti-sysc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
> --- a/drivers/bus/ti-sysc.c
> +++ b/drivers/bus/ti-sysc.c
> @@ -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,
> -- 
> 2.41.0

Reviewed-by: Nishanth Menon <nm@ti.com>

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-08-09 12:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-09  9:27 [PATCH v2 1/3] bus: ti-sysc: Fix build warning for 64-bit build Tony Lindgren
2023-08-09  9:27 ` [PATCH v2 2/3] bus: ti-sysc: Build driver for TI K3 SoCs Tony Lindgren
2023-08-09 11:59   ` Nishanth Menon
2023-08-09  9:27 ` [PATCH v2 3/3] bus: ti-sysc: Configure uart quirks for k3 SoC Tony Lindgren
2023-08-09 12:00   ` Nishanth Menon
2023-08-09  9:40 ` [PATCH v2 1/3] bus: ti-sysc: Fix build warning for 64-bit build Dhruva Gole
2023-08-09  9:55   ` Tony Lindgren
2023-08-09 11:59 ` Nishanth Menon

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