2019-06-05 08:03:57

by Keerthy

[permalink] [raw]
Subject: [PATCH v2 0/3] gpio: davinci: Add support for TI K3 AM6 platform

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


2019-06-05 08:04:09

by Keerthy

[permalink] [raw]
Subject: [PATCH v2 1/3] gpio: davinci: Fix the compiler warning with ARM64 config enabled

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

Signed-off-by: Keerthy <[email protected]>
---
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

2019-06-05 08:04:10

by Keerthy

[permalink] [raw]
Subject: [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs

Add new compatible for K3 AM654 SoCs.

Signed-off-by: Keerthy <[email protected]>
---
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

2019-06-05 08:04:20

by Keerthy

[permalink] [raw]
Subject: [PATCH v2 3/3] gpio: Davinci: Add K3 dependencies

Add K3 dependencies to enable the driver on K3 platforms.

Signed-off-by: Keerthy <[email protected]>
---
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

2019-06-05 14:28:26

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs

śr., 5 cze 2019 o 10:02 Keerthy <[email protected]> napisał(a):
>
> Add new compatible for K3 AM654 SoCs.
>
> Signed-off-by: Keerthy <[email protected]>
> ---
> 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
>

2019-06-05 15:14:41

by Keerthy

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs



On 05/06/19 7:56 PM, Bartosz Golaszewski wrote:
> śr., 5 cze 2019 o 10:02 Keerthy <[email protected]> napisał(a):
>>
>> Add new compatible for K3 AM654 SoCs.
>>
>> Signed-off-by: Keerthy <[email protected]>
>> ---
>> 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
>>

2019-06-06 07:50:39

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs

śr., 5 cze 2019 o 17:12 Keerthy <[email protected]> napisał(a):
>
>
>
> On 05/06/19 7:56 PM, Bartosz Golaszewski wrote:
> > śr., 5 cze 2019 o 10:02 Keerthy <[email protected]> napisał(a):
> >>
> >> Add new compatible for K3 AM654 SoCs.
> >>
> >> Signed-off-by: Keerthy <[email protected]>
> >> ---
> >> 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

2019-06-07 22:39:59

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] gpio: davinci: Fix the compiler warning with ARM64 config enabled

On Wed, Jun 5, 2019 at 10:02 AM Keerthy <[email protected]> wrote:

> Fix the compiler warning with ARM64 config enabled
> as the current mask assumes 32 bit by default.
>
> Signed-off-by: Keerthy <[email protected]>

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

Yours,
Linus Walleij

2019-06-07 22:40:05

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs

On Wed, Jun 5, 2019 at 10:02 AM Keerthy <[email protected]> wrote:

> Add new compatible for K3 AM654 SoCs.
>
> Signed-off-by: Keerthy <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-06-07 22:42:12

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs

On Thu, Jun 6, 2019 at 9:49 AM Bartosz Golaszewski <[email protected]> wrote:
> śr., 5 cze 2019 o 17:12 Keerthy <[email protected]> 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

2019-06-08 00:23:51

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] gpio: Davinci: Add K3 dependencies

On Wed, Jun 5, 2019 at 10:02 AM Keerthy <[email protected]> wrote:

> Add K3 dependencies to enable the driver on K3 platforms.
>
> Signed-off-by: Keerthy <[email protected]>

Patch applied.

Yours,
Linus Walleij