gpio: davinci: Add support for TI K3 AM6 platform
Subsystems (2)
Keerthy
maintainerv2 cover 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(-)
Signature · 1 line
2.17.1
Keerthy
maintainerPATCH 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.
--- drivers/gpio/gpio-davinci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpio/gpio-davinci.c +3 -3
@@ -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 ; }
Signature · 1 line
2.17.1
Re: [PATCH v2 1/3] gpio: davinci: Fix the compiler warning with ARM64 config enabled
Quoted 4 lines · Keerthy
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
Keerthy
maintainerPATCH v2 2/3 gpio: davinci: Add new compatible for K3 AM654 SoCs
In reply to KeerthyAdd new compatible for K3 AM654 SoCs.
--- drivers/gpio/gpio-davinci.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpio/gpio-davinci.c +1 -0
@@ -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 */ }, };
Signature · 1 line
2.17.1
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):
Quoted 13 lines
Add new compatible for K3 AM654 SoCs.
Signed-off-by Keerthy <[email protected]>--- drivers/gpio/gpio-davinci.c | 1 + 1 file changed, 1 insertion(+)drivers/gpio/gpio-davinci.c +0
-0
drivers/gpio/gpio-davinci.c static int davinci_gpio_irq_setup(struct platform_device *pdev) · line 635
Quoted 4 lines
drivers/gpio/gpio-davinci.c +1
-0@@ -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
Quoted 6 lines
drivers/gpio/gpio-davinci.c +0
-1{ .compatible = "ti,dm6441-gpio", davinci_gpio_get_irq_chip}, { /* sentinel */ }, }; --2.17.1
Keerthy
maintainerRe: [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs
Quoted 15 lines · Bartosz Golaszewski
śr., 5 cze 2019 o 10:02 Keerthy <[email protected]> napisał(a):
Quoted 14 lines
Add new compatible for K3 AM654 SoCs.
Signed-off-by Keerthy <[email protected]>--- drivers/gpio/gpio-davinci.c | 1 + 1 file changed, 1 insertion(+)drivers/gpio/gpio-davinci.c +0
-0@@ -632,6 +632,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
Quoted 5 lines
drivers/gpio/gpio-davinci.c static int davinci_gpio_irq_setup(struct platform_device *pdev) · line 635
Quoted 3 lines
drivers/gpio/gpio-davinci.c +1
-0static 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
Quoted 9 lines
Bart
Quoted 6 lines
drivers/gpio/gpio-davinci.c +0
-1{ .compatible = "ti,dm6441-gpio", davinci_gpio_get_irq_chip}, { /* sentinel */ }, }; --2.17.1
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):
Quoted 25 lines · Bartosz Golaszewski
Quoted 15 lines
śr., 5 cze 2019 o 10:02 Keerthy <[email protected]> napisał(a):
Quoted 14 lines
Add new compatible for K3 AM654 SoCs.
Signed-off-by Keerthy <[email protected]>--- drivers/gpio/gpio-davinci.c | 1 + 1 file changed, 1 insertion(+)drivers/gpio/gpio-davinci.c +0
-0@@ -632,6 +632,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)Quoted 5 lines
drivers/gpio/gpio-davinci.c static int davinci_gpio_irq_setup(struct platform_device *pdev) · line 635
Quoted 3 lines
drivers/gpio/gpio-davinci.c +1
-0static 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.
Quoted 4 lines
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
Re: [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs
Quoted 6 lines · Bartosz Golaszewski
śr., 5 cze 2019 o 17:12 Keerthy <[email protected]> napisał(a):
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
static const struct
of_device_iddavinci_gpio_ids[] = {
{ .compatible = "ti,keystone-gpio",keystone_gpio_get_irq_chip},
+ { .compatible = "ti,am654-gpio",keystone_gpio_get_irq_chip},
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
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
Re: [PATCH v2 2/3] gpio: davinci: Add new compatible for K3 AM654 SoCs
In reply to KeerthyQuoted 3 lines · Keerthy
Add new compatible for K3 AM654 SoCs.
Signed-off-by Keerthy <[email protected]>
Patch applied.
Yours,
Linus Walleij
Keerthy
maintainerPATCH v2 3/3 gpio: Davinci: Add K3 dependencies
In reply to KeerthyAdd K3 dependencies to enable the driver on K3 platforms.
--- drivers/gpio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/Kconfig +1 -1
@@ -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.
Signature · 1 line
2.17.1
Re: [PATCH v2 3/3] gpio: Davinci: Add K3 dependencies
Quoted 3 lines · Keerthy
Add K3 dependencies to enable the driver on K3 platforms.
Signed-off-by Keerthy <[email protected]>
Patch applied.
Yours,
Linus Walleij