linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] gpio: davinci: Add support for TI K3 AM6 platform
@ 2019-06-05  8:02 Keerthy
  2019-06-05  8:02 ` [PATCH v2 1/3] gpio: davinci: Fix the compiler warning with ARM64 config enabled Keerthy
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Keerthy @ 2019-06-05  8:02 UTC (permalink / raw)
  To: linus.walleij, bgolaszewski
  Cc: lokeshvutla, linux-gpio, t-kristo, j-keerthy, linux-kernel

K3 AM6 platform has 2 instances of gpio banks on main domain
and 1 instance on wakeup domin. All are capable of generating
banked interrupts.

Changes in v2:

  * Introduced a separate compatible for am654. 

Documentation patch link: https://patchwork.kernel.org/patch/10976445/

Keerthy (3):
  gpio: davinci: Fix the compiler warning with ARM64 config enabled
  gpio: davinci: Add new compatible for K3 AM654 SoCs
  gpio: Davinci: Add K3 dependencies

 drivers/gpio/Kconfig        | 2 +-
 drivers/gpio/gpio-davinci.c | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

-- 
2.17.1


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

* [PATCH v2 1/3] gpio: davinci: Fix the compiler warning with ARM64 config enabled
  2019-06-05  8:02 [PATCH v2 0/3] gpio: davinci: Add support for TI K3 AM6 platform Keerthy
@ 2019-06-05  8:02 ` Keerthy
  2019-06-07 22:34   ` Linus Walleij
  2019-06-05  8:02 ` [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs Keerthy
  2019-06-05  8:02 ` [PATCH v2 3/3] gpio: Davinci: Add K3 dependencies Keerthy
  2 siblings, 1 reply; 11+ messages in thread
From: Keerthy @ 2019-06-05  8:02 UTC (permalink / raw)
  To: linus.walleij, bgolaszewski
  Cc: lokeshvutla, linux-gpio, t-kristo, j-keerthy, linux-kernel

Fix the compiler warning with ARM64 config enabled
as the current mask assumes 32 bit by default.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---
 drivers/gpio/gpio-davinci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 3bbf5804bd11..0977590eb996 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -297,7 +297,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
 static void gpio_irq_disable(struct irq_data *d)
 {
 	struct davinci_gpio_regs __iomem *g = irq2regs(d);
-	u32 mask = (u32) irq_data_get_irq_handler_data(d);
+	uintptr_t mask = (uintptr_t)irq_data_get_irq_handler_data(d);
 
 	writel_relaxed(mask, &g->clr_falling);
 	writel_relaxed(mask, &g->clr_rising);
@@ -306,7 +306,7 @@ static void gpio_irq_disable(struct irq_data *d)
 static void gpio_irq_enable(struct irq_data *d)
 {
 	struct davinci_gpio_regs __iomem *g = irq2regs(d);
-	u32 mask = (u32) irq_data_get_irq_handler_data(d);
+	uintptr_t mask = (uintptr_t)irq_data_get_irq_handler_data(d);
 	unsigned status = irqd_get_trigger_type(d);
 
 	status &= IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING;
@@ -447,7 +447,7 @@ davinci_gpio_irq_map(struct irq_domain *d, unsigned int irq,
 				"davinci_gpio");
 	irq_set_irq_type(irq, IRQ_TYPE_NONE);
 	irq_set_chip_data(irq, (__force void *)g);
-	irq_set_handler_data(irq, (void *)__gpio_mask(hw));
+	irq_set_handler_data(irq, (void *)(uintptr_t)__gpio_mask(hw));
 
 	return 0;
 }
-- 
2.17.1


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

* [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs
  2019-06-05  8:02 [PATCH v2 0/3] gpio: davinci: Add support for TI K3 AM6 platform Keerthy
  2019-06-05  8:02 ` [PATCH v2 1/3] gpio: davinci: Fix the compiler warning with ARM64 config enabled Keerthy
@ 2019-06-05  8:02 ` Keerthy
  2019-06-05 14:26   ` Bartosz Golaszewski
  2019-06-07 22:36   ` Linus Walleij
  2019-06-05  8:02 ` [PATCH v2 3/3] gpio: Davinci: Add K3 dependencies Keerthy
  2 siblings, 2 replies; 11+ messages in thread
From: Keerthy @ 2019-06-05  8:02 UTC (permalink / raw)
  To: linus.walleij, bgolaszewski
  Cc: lokeshvutla, linux-gpio, t-kristo, j-keerthy, linux-kernel

Add new compatible for K3 AM654 SoCs.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---
 drivers/gpio/gpio-davinci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 0977590eb996..fc494a84a29d 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -632,6 +632,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
 
 static const struct of_device_id davinci_gpio_ids[] = {
 	{ .compatible = "ti,keystone-gpio", keystone_gpio_get_irq_chip},
+	{ .compatible = "ti,am654-gpio", keystone_gpio_get_irq_chip},
 	{ .compatible = "ti,dm6441-gpio", davinci_gpio_get_irq_chip},
 	{ /* sentinel */ },
 };
-- 
2.17.1


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

* [PATCH v2 3/3] gpio: Davinci: Add K3 dependencies
  2019-06-05  8:02 [PATCH v2 0/3] gpio: davinci: Add support for TI K3 AM6 platform Keerthy
  2019-06-05  8:02 ` [PATCH v2 1/3] gpio: davinci: Fix the compiler warning with ARM64 config enabled Keerthy
  2019-06-05  8:02 ` [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs Keerthy
@ 2019-06-05  8:02 ` Keerthy
  2019-06-07 22:36   ` Linus Walleij
  2 siblings, 1 reply; 11+ messages in thread
From: Keerthy @ 2019-06-05  8:02 UTC (permalink / raw)
  To: linus.walleij, bgolaszewski
  Cc: lokeshvutla, linux-gpio, t-kristo, j-keerthy, linux-kernel

Add K3 dependencies to enable the driver on K3 platforms.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---
 drivers/gpio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 62f3fe06cd2f..28dba62e2219 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -174,7 +174,7 @@ config GPIO_CLPS711X
 config GPIO_DAVINCI
 	bool "TI Davinci/Keystone GPIO support"
 	default y if ARCH_DAVINCI
-	depends on ARM && (ARCH_DAVINCI || ARCH_KEYSTONE)
+	depends on (ARM || ARM64) && (ARCH_DAVINCI || ARCH_KEYSTONE || ARCH_K3)
 	help
 	  Say yes here to enable GPIO support for TI Davinci/Keystone SoCs.
 
-- 
2.17.1


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

* Re: [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs
  2019-06-05  8:02 ` [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs Keerthy
@ 2019-06-05 14:26   ` Bartosz Golaszewski
  2019-06-05 15:13     ` Keerthy
  2019-06-07 22:36   ` Linus Walleij
  1 sibling, 1 reply; 11+ messages in thread
From: Bartosz Golaszewski @ 2019-06-05 14:26 UTC (permalink / raw)
  To: Keerthy; +Cc: Linus Walleij, lokeshvutla, linux-gpio, Tero Kristo, LKML

śr., 5 cze 2019 o 10:02 Keerthy <j-keerthy@ti.com> napisał(a):
>
> Add new compatible for K3 AM654 SoCs.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
>  drivers/gpio/gpio-davinci.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
> index 0977590eb996..fc494a84a29d 100644
> --- a/drivers/gpio/gpio-davinci.c
> +++ b/drivers/gpio/gpio-davinci.c
> @@ -632,6 +632,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
>
>  static const struct of_device_id davinci_gpio_ids[] = {
>         { .compatible = "ti,keystone-gpio", keystone_gpio_get_irq_chip},
> +       { .compatible = "ti,am654-gpio", keystone_gpio_get_irq_chip},

Please add a patch adding this compatible to the binding document as well.

Bart

>         { .compatible = "ti,dm6441-gpio", davinci_gpio_get_irq_chip},
>         { /* sentinel */ },
>  };
> --
> 2.17.1
>

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

* Re: [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs
  2019-06-05 14:26   ` Bartosz Golaszewski
@ 2019-06-05 15:13     ` Keerthy
  2019-06-06  7:49       ` Bartosz Golaszewski
  0 siblings, 1 reply; 11+ messages in thread
From: Keerthy @ 2019-06-05 15:13 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Linus Walleij, lokeshvutla, linux-gpio, Tero Kristo, LKML



On 05/06/19 7:56 PM, Bartosz Golaszewski wrote:
> śr., 5 cze 2019 o 10:02 Keerthy <j-keerthy@ti.com> napisał(a):
>>
>> Add new compatible for K3 AM654 SoCs.
>>
>> Signed-off-by: Keerthy <j-keerthy@ti.com>
>> ---
>>   drivers/gpio/gpio-davinci.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
>> index 0977590eb996..fc494a84a29d 100644
>> --- a/drivers/gpio/gpio-davinci.c
>> +++ b/drivers/gpio/gpio-davinci.c
>> @@ -632,6 +632,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
>>
>>   static const struct of_device_id davinci_gpio_ids[] = {
>>          { .compatible = "ti,keystone-gpio", keystone_gpio_get_irq_chip},
>> +       { .compatible = "ti,am654-gpio", keystone_gpio_get_irq_chip},
> 
> Please add a patch adding this compatible to the binding document as well.

https://patchwork.kernel.org/patch/10976445/

Posted but did not add you in Cc. Sorry about that.

- Keerthy
> 
> Bart
> 
>>          { .compatible = "ti,dm6441-gpio", davinci_gpio_get_irq_chip},
>>          { /* sentinel */ },
>>   };
>> --
>> 2.17.1
>>

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

* Re: [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs
  2019-06-05 15:13     ` Keerthy
@ 2019-06-06  7:49       ` Bartosz Golaszewski
  2019-06-07 22:38         ` Linus Walleij
  0 siblings, 1 reply; 11+ messages in thread
From: Bartosz Golaszewski @ 2019-06-06  7:49 UTC (permalink / raw)
  To: Keerthy
  Cc: Bartosz Golaszewski, Linus Walleij, lokeshvutla, linux-gpio,
	Tero Kristo, LKML

śr., 5 cze 2019 o 17:12 Keerthy <j-keerthy@ti.com> napisał(a):
>
>
>
> On 05/06/19 7:56 PM, Bartosz Golaszewski wrote:
> > śr., 5 cze 2019 o 10:02 Keerthy <j-keerthy@ti.com> napisał(a):
> >>
> >> Add new compatible for K3 AM654 SoCs.
> >>
> >> Signed-off-by: Keerthy <j-keerthy@ti.com>
> >> ---
> >>   drivers/gpio/gpio-davinci.c | 1 +
> >>   1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
> >> index 0977590eb996..fc494a84a29d 100644
> >> --- a/drivers/gpio/gpio-davinci.c
> >> +++ b/drivers/gpio/gpio-davinci.c
> >> @@ -632,6 +632,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
> >>
> >>   static const struct of_device_id davinci_gpio_ids[] = {
> >>          { .compatible = "ti,keystone-gpio", keystone_gpio_get_irq_chip},
> >> +       { .compatible = "ti,am654-gpio", keystone_gpio_get_irq_chip},
> >
> > Please add a patch adding this compatible to the binding document as well.
>
> https://patchwork.kernel.org/patch/10976445/
>
> Posted but did not add you in Cc. Sorry about that.
>

I don't see it on GPIO patchwork either. Please resend it as part of
this series.

Bart

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

* Re: [PATCH v2 1/3] gpio: davinci: Fix the compiler warning with ARM64 config enabled
  2019-06-05  8:02 ` [PATCH v2 1/3] gpio: davinci: Fix the compiler warning with ARM64 config enabled Keerthy
@ 2019-06-07 22:34   ` Linus Walleij
  0 siblings, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2019-06-07 22:34 UTC (permalink / raw)
  To: Keerthy
  Cc: Bartosz Golaszewski, Lokesh Vutla, open list:GPIO SUBSYSTEM,
	Tero Kristo, linux-kernel

On Wed, Jun 5, 2019 at 10:02 AM Keerthy <j-keerthy@ti.com> wrote:

> Fix the compiler warning with ARM64 config enabled
> as the current mask assumes 32 bit by default.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>

Patch applied, I think this and patch 2/3 work fine
together as-is.

Yours,
Linus Walleij

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

* Re: [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs
  2019-06-05  8:02 ` [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs Keerthy
  2019-06-05 14:26   ` Bartosz Golaszewski
@ 2019-06-07 22:36   ` Linus Walleij
  1 sibling, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2019-06-07 22:36 UTC (permalink / raw)
  To: Keerthy
  Cc: Bartosz Golaszewski, Lokesh Vutla, open list:GPIO SUBSYSTEM,
	Tero Kristo, linux-kernel

On Wed, Jun 5, 2019 at 10:02 AM Keerthy <j-keerthy@ti.com> wrote:

> Add new compatible for K3 AM654 SoCs.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH v2 3/3] gpio: Davinci: Add K3 dependencies
  2019-06-05  8:02 ` [PATCH v2 3/3] gpio: Davinci: Add K3 dependencies Keerthy
@ 2019-06-07 22:36   ` Linus Walleij
  0 siblings, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2019-06-07 22:36 UTC (permalink / raw)
  To: Keerthy
  Cc: Bartosz Golaszewski, Lokesh Vutla, open list:GPIO SUBSYSTEM,
	Tero Kristo, linux-kernel

On Wed, Jun 5, 2019 at 10:02 AM Keerthy <j-keerthy@ti.com> wrote:

> Add K3 dependencies to enable the driver on K3 platforms.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs
  2019-06-06  7:49       ` Bartosz Golaszewski
@ 2019-06-07 22:38         ` Linus Walleij
  0 siblings, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2019-06-07 22:38 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Keerthy, Bartosz Golaszewski, Lokesh Vutla, linux-gpio,
	Tero Kristo, LKML

On Thu, Jun 6, 2019 at 9:49 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> śr., 5 cze 2019 o 17:12 Keerthy <j-keerthy@ti.com> napisał(a):

> > >>   static const struct of_device_id davinci_gpio_ids[] = {
> > >>          { .compatible = "ti,keystone-gpio", keystone_gpio_get_irq_chip},
> > >> +       { .compatible = "ti,am654-gpio", keystone_gpio_get_irq_chip},
> > >
> > > Please add a patch adding this compatible to the binding document as well.
> >
> > https://patchwork.kernel.org/patch/10976445/
> >
> > Posted but did not add you in Cc. Sorry about that.
>
> I don't see it on GPIO patchwork either. Please resend it as part of
> this series.

I see the whole other series got resent as RFC, I'll just apply these
three and the binding patch so we don't have to pingpong these
patches too much around :)

Yours,
Linus Walleij

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

end of thread, other threads:[~2019-06-07 22:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-05  8:02 [PATCH v2 0/3] gpio: davinci: Add support for TI K3 AM6 platform Keerthy
2019-06-05  8:02 ` [PATCH v2 1/3] gpio: davinci: Fix the compiler warning with ARM64 config enabled Keerthy
2019-06-07 22:34   ` Linus Walleij
2019-06-05  8:02 ` [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs Keerthy
2019-06-05 14:26   ` Bartosz Golaszewski
2019-06-05 15:13     ` Keerthy
2019-06-06  7:49       ` Bartosz Golaszewski
2019-06-07 22:38         ` Linus Walleij
2019-06-07 22:36   ` Linus Walleij
2019-06-05  8:02 ` [PATCH v2 3/3] gpio: Davinci: Add K3 dependencies Keerthy
2019-06-07 22:36   ` Linus Walleij

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