linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19
@ 2018-11-21  9:35 Bartosz Golaszewski
  2018-11-21  9:35 ` [PATCH 01/12] ARM: davinci: da8xx: define gpio interrupts as separate resources Bartosz Golaszewski
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2018-11-21  9:35 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King, Keerthy, Linus Walleij,
	Grygorii Strashko
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

This is the entire set of changes needed to fix the broken GPIO support
for DaVinci boards in legacy mode after certain changes made to the
GPIO driver in 4.19, namely: commits 587f7a694f01 ("gpio: davinci: Use
dev name for label and automatic base selection") and eb3744a2dd01
("gpio: davinci: Do not assume continuous IRQ numbering").

Bartosz Golaszewski (12):
  ARM: davinci: da8xx: define gpio interrupts as separate resources
  ARM: davinci: dm365: define gpio interrupts as separate resources
  ARM: davinci: dm646x: define gpio interrupts as separate resources
  ARM: davinci: dm355: define gpio interrupts as separate resources
  ARM: davinci: dm644x: define gpio interrupts as separate resources
  gpio: davinci: restore a way to manually specify the GPIO base
  ARM: davinci: da850: set the GPIO base to 0
  ARM: davinci: dm365: set the GPIO base to 0
  ARM: davinci: dm646x: set the GPIO base to 0
  ARM: davinci: dm355: set the GPIO base to 0
  ARM: davinci: da830: set the GPIO base to 0
  ARM: davinci: dm644x: set the GPIO base to 0

 arch/arm/mach-davinci/da830.c              |  4 ++-
 arch/arm/mach-davinci/da850.c              |  4 ++-
 arch/arm/mach-davinci/devices-da8xx.c      | 40 ++++++++++++++++++++++
 arch/arm/mach-davinci/dm355.c              | 32 +++++++++++++++++
 arch/arm/mach-davinci/dm365.c              | 37 ++++++++++++++++++++
 arch/arm/mach-davinci/dm644x.c             | 22 ++++++++++++
 arch/arm/mach-davinci/dm646x.c             | 12 +++++++
 drivers/gpio/gpio-davinci.c                |  2 +-
 include/linux/platform_data/gpio-davinci.h |  2 ++
 9 files changed, 152 insertions(+), 3 deletions(-)

-- 
2.19.1


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

* [PATCH 01/12] ARM: davinci: da8xx: define gpio interrupts as separate resources
  2018-11-21  9:35 [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Bartosz Golaszewski
@ 2018-11-21  9:35 ` Bartosz Golaszewski
  2018-11-21  9:35 ` [PATCH 02/12] ARM: davinci: dm365: " Bartosz Golaszewski
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2018-11-21  9:35 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King, Keerthy, Linus Walleij,
	Grygorii Strashko
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, Bartosz Golaszewski, stable

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Since commit eb3744a2dd01 ("gpio: davinci: Do not assume continuous
IRQ numbering") the davinci GPIO driver fails to probe if we boot
in legacy mode from any of the board files. Since the driver now
expects every interrupt to be defined as a separate resource, split
the definition of IRQ resources instead of having a single continuous
interrupt range.

Fixes: eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/devices-da8xx.c | 40 +++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index 1fd3619f6a09..cf78da5ab054 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -701,6 +701,46 @@ static struct resource da8xx_gpio_resources[] = {
 	},
 	{ /* interrupt */
 		.start	= IRQ_DA8XX_GPIO0,
+		.end	= IRQ_DA8XX_GPIO0,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DA8XX_GPIO1,
+		.end	= IRQ_DA8XX_GPIO1,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DA8XX_GPIO2,
+		.end	= IRQ_DA8XX_GPIO2,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DA8XX_GPIO3,
+		.end	= IRQ_DA8XX_GPIO3,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DA8XX_GPIO4,
+		.end	= IRQ_DA8XX_GPIO4,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DA8XX_GPIO5,
+		.end	= IRQ_DA8XX_GPIO5,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DA8XX_GPIO6,
+		.end	= IRQ_DA8XX_GPIO6,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DA8XX_GPIO7,
+		.end	= IRQ_DA8XX_GPIO7,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DA8XX_GPIO8,
 		.end	= IRQ_DA8XX_GPIO8,
 		.flags	= IORESOURCE_IRQ,
 	},
-- 
2.19.1


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

* [PATCH 02/12] ARM: davinci: dm365: define gpio interrupts as separate resources
  2018-11-21  9:35 [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Bartosz Golaszewski
  2018-11-21  9:35 ` [PATCH 01/12] ARM: davinci: da8xx: define gpio interrupts as separate resources Bartosz Golaszewski
@ 2018-11-21  9:35 ` Bartosz Golaszewski
  2018-11-21  9:35 ` [PATCH 03/12] ARM: davinci: dm646x: " Bartosz Golaszewski
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2018-11-21  9:35 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King, Keerthy, Linus Walleij,
	Grygorii Strashko
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, Bartosz Golaszewski, stable

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Since commit eb3744a2dd01 ("gpio: davinci: Do not assume continuous
IRQ numbering") the davinci GPIO driver fails to probe if we boot
in legacy mode from any of the board files. Since the driver now
expects every interrupt to be defined as a separate resource, split
the definition of IRQ resources instead of having a single continuous
interrupt range.

Fixes: eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/dm365.c | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index abcf2a5ed89b..42665914166a 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -267,6 +267,41 @@ static struct resource dm365_gpio_resources[] = {
 	},
 	{	/* interrupt */
 		.start	= IRQ_DM365_GPIO0,
+		.end	= IRQ_DM365_GPIO0,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DM365_GPIO1,
+		.end	= IRQ_DM365_GPIO1,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DM365_GPIO2,
+		.end	= IRQ_DM365_GPIO2,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DM365_GPIO3,
+		.end	= IRQ_DM365_GPIO3,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DM365_GPIO4,
+		.end	= IRQ_DM365_GPIO4,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DM365_GPIO5,
+		.end	= IRQ_DM365_GPIO5,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DM365_GPIO6,
+		.end	= IRQ_DM365_GPIO6,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DM365_GPIO7,
 		.end	= IRQ_DM365_GPIO7,
 		.flags	= IORESOURCE_IRQ,
 	},
-- 
2.19.1


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

* [PATCH 03/12] ARM: davinci: dm646x: define gpio interrupts as separate resources
  2018-11-21  9:35 [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Bartosz Golaszewski
  2018-11-21  9:35 ` [PATCH 01/12] ARM: davinci: da8xx: define gpio interrupts as separate resources Bartosz Golaszewski
  2018-11-21  9:35 ` [PATCH 02/12] ARM: davinci: dm365: " Bartosz Golaszewski
@ 2018-11-21  9:35 ` Bartosz Golaszewski
  2018-11-21  9:35 ` [PATCH 04/12] ARM: davinci: dm355: " Bartosz Golaszewski
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2018-11-21  9:35 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King, Keerthy, Linus Walleij,
	Grygorii Strashko
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, Bartosz Golaszewski, stable

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Since commit eb3744a2dd01 ("gpio: davinci: Do not assume continuous
IRQ numbering") the davinci GPIO driver fails to probe if we boot
in legacy mode from any of the board files. Since the driver now
expects every interrupt to be defined as a separate resource, split
the definition of IRQ resources instead of having a single continuous
interrupt range.

Fixes: eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/dm646x.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index 6bd2ed069d0d..d9b93e2806d2 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -442,6 +442,16 @@ static struct resource dm646x_gpio_resources[] = {
 	},
 	{	/* interrupt */
 		.start	= IRQ_DM646X_GPIOBNK0,
+		.end	= IRQ_DM646X_GPIOBNK0,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DM646X_GPIOBNK1,
+		.end	= IRQ_DM646X_GPIOBNK1,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DM646X_GPIOBNK2,
 		.end	= IRQ_DM646X_GPIOBNK2,
 		.flags	= IORESOURCE_IRQ,
 	},
-- 
2.19.1


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

* [PATCH 04/12] ARM: davinci: dm355: define gpio interrupts as separate resources
  2018-11-21  9:35 [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Bartosz Golaszewski
                   ` (2 preceding siblings ...)
  2018-11-21  9:35 ` [PATCH 03/12] ARM: davinci: dm646x: " Bartosz Golaszewski
@ 2018-11-21  9:35 ` Bartosz Golaszewski
  2018-11-21  9:35 ` [PATCH 05/12] ARM: davinci: dm644x: " Bartosz Golaszewski
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2018-11-21  9:35 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King, Keerthy, Linus Walleij,
	Grygorii Strashko
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, Bartosz Golaszewski, stable

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Since commit eb3744a2dd01 ("gpio: davinci: Do not assume continuous
IRQ numbering") the davinci GPIO driver fails to probe if we boot
in legacy mode from any of the board files. Since the driver now
expects every interrupt to be defined as a separate resource, split
the definition of IRQ resources instead of having a single continuous
interrupt range.

Fixes: eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/dm355.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index 9f7d38d12c88..2b0f5d97ab7c 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -548,6 +548,36 @@ static struct resource dm355_gpio_resources[] = {
 	},
 	{	/* interrupt */
 		.start	= IRQ_DM355_GPIOBNK0,
+		.end	= IRQ_DM355_GPIOBNK0,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DM355_GPIOBNK1,
+		.end	= IRQ_DM355_GPIOBNK1,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DM355_GPIOBNK2,
+		.end	= IRQ_DM355_GPIOBNK2,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DM355_GPIOBNK3,
+		.end	= IRQ_DM355_GPIOBNK3,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DM355_GPIOBNK4,
+		.end	= IRQ_DM355_GPIOBNK4,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DM355_GPIOBNK5,
+		.end	= IRQ_DM355_GPIOBNK5,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_DM355_GPIOBNK6,
 		.end	= IRQ_DM355_GPIOBNK6,
 		.flags	= IORESOURCE_IRQ,
 	},
-- 
2.19.1


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

* [PATCH 05/12] ARM: davinci: dm644x: define gpio interrupts as separate resources
  2018-11-21  9:35 [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Bartosz Golaszewski
                   ` (3 preceding siblings ...)
  2018-11-21  9:35 ` [PATCH 04/12] ARM: davinci: dm355: " Bartosz Golaszewski
@ 2018-11-21  9:35 ` Bartosz Golaszewski
  2018-11-21  9:35 ` [PATCH 06/12] gpio: davinci: restore a way to manually specify the GPIO base Bartosz Golaszewski
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2018-11-21  9:35 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King, Keerthy, Linus Walleij,
	Grygorii Strashko
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, Bartosz Golaszewski, stable

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Since commit eb3744a2dd01 ("gpio: davinci: Do not assume continuous
IRQ numbering") the davinci GPIO driver fails to probe if we boot
in legacy mode from any of the board files. Since the driver now
expects every interrupt to be defined as a separate resource, split
the definition of IRQ resources instead of having a single continuous
interrupt range.

Fixes: eb3744a2dd01 ("gpio: davinci: Do not assume continuous IRQ numbering")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/dm644x.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index 0720da7809a6..de1ec6dc01e9 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -492,6 +492,26 @@ static struct resource dm644_gpio_resources[] = {
 	},
 	{	/* interrupt */
 		.start	= IRQ_GPIOBNK0,
+		.end	= IRQ_GPIOBNK0,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_GPIOBNK1,
+		.end	= IRQ_GPIOBNK1,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_GPIOBNK2,
+		.end	= IRQ_GPIOBNK2,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_GPIOBNK3,
+		.end	= IRQ_GPIOBNK3,
+		.flags	= IORESOURCE_IRQ,
+	},
+	{
+		.start	= IRQ_GPIOBNK4,
 		.end	= IRQ_GPIOBNK4,
 		.flags	= IORESOURCE_IRQ,
 	},
-- 
2.19.1


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

* [PATCH 06/12] gpio: davinci: restore a way to manually specify the GPIO base
  2018-11-21  9:35 [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Bartosz Golaszewski
                   ` (4 preceding siblings ...)
  2018-11-21  9:35 ` [PATCH 05/12] ARM: davinci: dm644x: " Bartosz Golaszewski
@ 2018-11-21  9:35 ` Bartosz Golaszewski
  2018-11-21  9:35 ` [PATCH 07/12] ARM: davinci: da850: set the GPIO base to 0 Bartosz Golaszewski
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2018-11-21  9:35 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King, Keerthy, Linus Walleij,
	Grygorii Strashko
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, Bartosz Golaszewski, stable

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and
automatic base selection") broke the network support in legacy boot
mode for da850-evm since we can no longer request the MDIO clock GPIO.

Other boards may be broken too, which I haven't tested.

The problem is in the fact that most board files still use the legacy
GPIO API where lines are requested by numbers rather than descriptors.

While this should be fixed eventually, in order to unbreak the board
for now - provide a way to manually specify the GPIO base in platform
data.

Fixes: 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpio-davinci.c                | 2 +-
 include/linux/platform_data/gpio-davinci.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 5c1564fcc24e..bdb29e51b417 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -258,7 +258,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
 	chips->chip.set = davinci_gpio_set;
 
 	chips->chip.ngpio = ngpio;
-	chips->chip.base = -1;
+	chips->chip.base = pdata->no_auto_base ? pdata->base : -1;
 
 #ifdef CONFIG_OF_GPIO
 	chips->chip.of_gpio_n_cells = 2;
diff --git a/include/linux/platform_data/gpio-davinci.h b/include/linux/platform_data/gpio-davinci.h
index f92a47e18034..a93841bfb9f7 100644
--- a/include/linux/platform_data/gpio-davinci.h
+++ b/include/linux/platform_data/gpio-davinci.h
@@ -17,6 +17,8 @@
 #define __DAVINCI_GPIO_PLATFORM_H
 
 struct davinci_gpio_platform_data {
+	bool	no_auto_base;
+	u32	base;
 	u32	ngpio;
 	u32	gpio_unbanked;
 };
-- 
2.19.1


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

* [PATCH 07/12] ARM: davinci: da850: set the GPIO base to 0
  2018-11-21  9:35 [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Bartosz Golaszewski
                   ` (5 preceding siblings ...)
  2018-11-21  9:35 ` [PATCH 06/12] gpio: davinci: restore a way to manually specify the GPIO base Bartosz Golaszewski
@ 2018-11-21  9:35 ` Bartosz Golaszewski
  2018-11-21  9:35 ` [PATCH 08/12] ARM: davinci: dm365: " Bartosz Golaszewski
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2018-11-21  9:35 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King, Keerthy, Linus Walleij,
	Grygorii Strashko
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, Bartosz Golaszewski, stable

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and
automatic base selection") broke the network support in legacy boot
mode for da850-evm since we can no longer request the MDIO clock GPIO.

We now have the option to specify the GPIO base manually for davinci,
so add the relevant fields to platform data.

Fixes: 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/da850.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 4528bbf0c861..e7b78df2bfef 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -719,7 +719,9 @@ int __init da850_register_vpif_capture(struct vpif_capture_config
 }
 
 static struct davinci_gpio_platform_data da850_gpio_platform_data = {
-	.ngpio = 144,
+	.no_auto_base	= true,
+	.base		= 0,
+	.ngpio		= 144,
 };
 
 int __init da850_register_gpio(void)
-- 
2.19.1


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

* [PATCH 08/12] ARM: davinci: dm365: set the GPIO base to 0
  2018-11-21  9:35 [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Bartosz Golaszewski
                   ` (6 preceding siblings ...)
  2018-11-21  9:35 ` [PATCH 07/12] ARM: davinci: da850: set the GPIO base to 0 Bartosz Golaszewski
@ 2018-11-21  9:35 ` Bartosz Golaszewski
  2018-11-21  9:35 ` [PATCH 09/12] ARM: davinci: dm646x: " Bartosz Golaszewski
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2018-11-21  9:35 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King, Keerthy, Linus Walleij,
	Grygorii Strashko
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, Bartosz Golaszewski, stable

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and
automatic base selection") broke the GPIO support on DaVinci boards
in legacy mode by allowing gpiolib to set the GPIO base automatically.

DaVinci board files use the legacy GPIO API with hard-coded GPIO line
numbers. Use the new fields in struct davinci_gpio_platform_data to
manually set the GPIO base to 0.

Fixes: 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/dm365.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index 42665914166a..01fb2b0c82de 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -308,6 +308,8 @@ static struct resource dm365_gpio_resources[] = {
 };
 
 static struct davinci_gpio_platform_data dm365_gpio_platform_data = {
+	.no_auto_base	= true,
+	.base		= 0,
 	.ngpio		= 104,
 	.gpio_unbanked	= 8,
 };
-- 
2.19.1


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

* [PATCH 09/12] ARM: davinci: dm646x: set the GPIO base to 0
  2018-11-21  9:35 [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Bartosz Golaszewski
                   ` (7 preceding siblings ...)
  2018-11-21  9:35 ` [PATCH 08/12] ARM: davinci: dm365: " Bartosz Golaszewski
@ 2018-11-21  9:35 ` Bartosz Golaszewski
  2018-11-21  9:35 ` [PATCH 10/12] ARM: davinci: dm355: " Bartosz Golaszewski
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2018-11-21  9:35 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King, Keerthy, Linus Walleij,
	Grygorii Strashko
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, Bartosz Golaszewski, stable

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and
automatic base selection") broke the GPIO support on DaVinci boards
in legacy mode by allowing gpiolib to set the GPIO base automatically.

DaVinci board files use the legacy GPIO API with hard-coded GPIO line
numbers. Use the new fields in struct davinci_gpio_platform_data to
manually set the GPIO base to 0.

Fixes: 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/dm646x.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index d9b93e2806d2..7dc54b2a610f 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -458,6 +458,8 @@ static struct resource dm646x_gpio_resources[] = {
 };
 
 static struct davinci_gpio_platform_data dm646x_gpio_platform_data = {
+	.no_auto_base	= true,
+	.base		= 0,
 	.ngpio		= 43,
 };
 
-- 
2.19.1


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

* [PATCH 10/12] ARM: davinci: dm355: set the GPIO base to 0
  2018-11-21  9:35 [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Bartosz Golaszewski
                   ` (8 preceding siblings ...)
  2018-11-21  9:35 ` [PATCH 09/12] ARM: davinci: dm646x: " Bartosz Golaszewski
@ 2018-11-21  9:35 ` Bartosz Golaszewski
  2018-11-21  9:35 ` [PATCH 11/12] ARM: davinci: da830: " Bartosz Golaszewski
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2018-11-21  9:35 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King, Keerthy, Linus Walleij,
	Grygorii Strashko
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, Bartosz Golaszewski, stable

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and
automatic base selection") broke the GPIO support on DaVinci boards
in legacy mode by allowing gpiolib to set the GPIO base automatically.

DaVinci board files use the legacy GPIO API with hard-coded GPIO line
numbers. Use the new fields in struct davinci_gpio_platform_data to
manually set the GPIO base to 0.

Fixes: 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/dm355.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index 2b0f5d97ab7c..4c6e0bef4509 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -584,6 +584,8 @@ static struct resource dm355_gpio_resources[] = {
 };
 
 static struct davinci_gpio_platform_data dm355_gpio_platform_data = {
+	.no_auto_base	= true,
+	.base		= 0,
 	.ngpio		= 104,
 };
 
-- 
2.19.1


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

* [PATCH 11/12] ARM: davinci: da830: set the GPIO base to 0
  2018-11-21  9:35 [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Bartosz Golaszewski
                   ` (9 preceding siblings ...)
  2018-11-21  9:35 ` [PATCH 10/12] ARM: davinci: dm355: " Bartosz Golaszewski
@ 2018-11-21  9:35 ` Bartosz Golaszewski
  2018-11-21  9:35 ` [PATCH 12/12] ARM: davinci: dm644x: " Bartosz Golaszewski
  2018-11-27 12:20 ` [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Sekhar Nori
  12 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2018-11-21  9:35 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King, Keerthy, Linus Walleij,
	Grygorii Strashko
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, Bartosz Golaszewski, stable

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and
automatic base selection") broke the GPIO support on DaVinci boards
in legacy mode by allowing gpiolib to set the GPIO base automatically.

DaVinci board files use the legacy GPIO API with hard-coded GPIO line
numbers. Use the new fields in struct davinci_gpio_platform_data to
manually set the GPIO base to 0.

Fixes: 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/da830.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c
index 0bc5bd2665df..2cc9fe4c3a91 100644
--- a/arch/arm/mach-davinci/da830.c
+++ b/arch/arm/mach-davinci/da830.c
@@ -759,7 +759,9 @@ static struct davinci_id da830_ids[] = {
 };
 
 static struct davinci_gpio_platform_data da830_gpio_platform_data = {
-	.ngpio = 128,
+	.no_auto_base	= true,
+	.base		= 0,
+	.ngpio		= 128,
 };
 
 int __init da830_register_gpio(void)
-- 
2.19.1


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

* [PATCH 12/12] ARM: davinci: dm644x: set the GPIO base to 0
  2018-11-21  9:35 [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Bartosz Golaszewski
                   ` (10 preceding siblings ...)
  2018-11-21  9:35 ` [PATCH 11/12] ARM: davinci: da830: " Bartosz Golaszewski
@ 2018-11-21  9:35 ` Bartosz Golaszewski
  2018-11-27 12:20 ` [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Sekhar Nori
  12 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2018-11-21  9:35 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King, Keerthy, Linus Walleij,
	Grygorii Strashko
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, Bartosz Golaszewski, stable

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and
automatic base selection") broke the GPIO support on DaVinci boards
in legacy mode by allowing gpiolib to set the GPIO base automatically.

DaVinci board files use the legacy GPIO API with hard-coded GPIO line
numbers. Use the new fields in struct davinci_gpio_platform_data to
manually set the GPIO base to 0.

Fixes: 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/dm644x.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index de1ec6dc01e9..38f92b7d413e 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -518,6 +518,8 @@ static struct resource dm644_gpio_resources[] = {
 };
 
 static struct davinci_gpio_platform_data dm644_gpio_platform_data = {
+	.no_auto_base	= true,
+	.base		= 0,
 	.ngpio		= 71,
 };
 
-- 
2.19.1


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

* Re: [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19
  2018-11-21  9:35 [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Bartosz Golaszewski
                   ` (11 preceding siblings ...)
  2018-11-21  9:35 ` [PATCH 12/12] ARM: davinci: dm644x: " Bartosz Golaszewski
@ 2018-11-27 12:20 ` Sekhar Nori
  12 siblings, 0 replies; 14+ messages in thread
From: Sekhar Nori @ 2018-11-27 12:20 UTC (permalink / raw)
  To: Bartosz Golaszewski, Kevin Hilman, Russell King, Keerthy,
	Linus Walleij, Grygorii Strashko
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, Bartosz Golaszewski

Hi Bartosz,

On 21/11/18 3:05 PM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> This is the entire set of changes needed to fix the broken GPIO support
> for DaVinci boards in legacy mode after certain changes made to the
> GPIO driver in 4.19, namely: commits 587f7a694f01 ("gpio: davinci: Use
> dev name for label and automatic base selection") and eb3744a2dd01
> ("gpio: davinci: Do not assume continuous IRQ numbering").

I applied this series and sent a pull request to ARM SoC too.

Thanks,
Sekhar

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

end of thread, other threads:[~2018-11-27 12:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-21  9:35 [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Bartosz Golaszewski
2018-11-21  9:35 ` [PATCH 01/12] ARM: davinci: da8xx: define gpio interrupts as separate resources Bartosz Golaszewski
2018-11-21  9:35 ` [PATCH 02/12] ARM: davinci: dm365: " Bartosz Golaszewski
2018-11-21  9:35 ` [PATCH 03/12] ARM: davinci: dm646x: " Bartosz Golaszewski
2018-11-21  9:35 ` [PATCH 04/12] ARM: davinci: dm355: " Bartosz Golaszewski
2018-11-21  9:35 ` [PATCH 05/12] ARM: davinci: dm644x: " Bartosz Golaszewski
2018-11-21  9:35 ` [PATCH 06/12] gpio: davinci: restore a way to manually specify the GPIO base Bartosz Golaszewski
2018-11-21  9:35 ` [PATCH 07/12] ARM: davinci: da850: set the GPIO base to 0 Bartosz Golaszewski
2018-11-21  9:35 ` [PATCH 08/12] ARM: davinci: dm365: " Bartosz Golaszewski
2018-11-21  9:35 ` [PATCH 09/12] ARM: davinci: dm646x: " Bartosz Golaszewski
2018-11-21  9:35 ` [PATCH 10/12] ARM: davinci: dm355: " Bartosz Golaszewski
2018-11-21  9:35 ` [PATCH 11/12] ARM: davinci: da830: " Bartosz Golaszewski
2018-11-21  9:35 ` [PATCH 12/12] ARM: davinci: dm644x: " Bartosz Golaszewski
2018-11-27 12:20 ` [PATCH 00/12] ARM: davinci: fix GPIO breakage after v4.19 Sekhar Nori

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