From: Bartosz Golaszewski <brgl@bgdev.pl> To: Sekhar Nori <nsekhar@ti.com>, Kevin Hilman <khilman@kernel.org>, Russell King <linux@armlinux.org.uk>, Keerthy <j-keerthy@ti.com>, Linus Walleij <linus.walleij@linaro.org>, Grygorii Strashko <grygorii.strashko@ti.com> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski <bgolaszewski@baylibre.com>, stable@vger.kernel.org Subject: [PATCH 2/3] gpio: davinci: restore a way to manually specify the GPIO base Date: Tue, 13 Nov 2018 14:50:50 +0100 [thread overview] Message-ID: <20181113135051.15308-3-brgl@bgdev.pl> (raw) In-Reply-To: <20181113135051.15308-1-brgl@bgdev.pl> 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> --- 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
WARNING: multiple messages have this Message-ID (diff)
From: brgl@bgdev.pl (Bartosz Golaszewski) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] gpio: davinci: restore a way to manually specify the GPIO base Date: Tue, 13 Nov 2018 14:50:50 +0100 [thread overview] Message-ID: <20181113135051.15308-3-brgl@bgdev.pl> (raw) In-Reply-To: <20181113135051.15308-1-brgl@bgdev.pl> 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 at vger.kernel.org Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> --- 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
next prev parent reply other threads:[~2018-11-13 13:50 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-11-13 13:50 [PATCH 0/3] ARM: davinci: fix ethernet support on da850-evm Bartosz Golaszewski 2018-11-13 13:50 ` Bartosz Golaszewski 2018-11-13 13:50 ` [PATCH 1/3] ARM: davinci: define gpio interrupts as separate resources Bartosz Golaszewski 2018-11-13 13:50 ` Bartosz Golaszewski 2018-11-19 20:52 ` Sekhar Nori 2018-11-19 20:52 ` Sekhar Nori 2018-11-19 20:52 ` Sekhar Nori 2018-11-20 6:38 ` J, KEERTHY 2018-11-20 6:38 ` J, KEERTHY 2018-11-20 6:38 ` J, KEERTHY 2018-11-20 23:06 ` Sekhar Nori 2018-11-20 23:06 ` Sekhar Nori 2018-11-20 23:06 ` Sekhar Nori 2018-11-21 8:51 ` Bartosz Golaszewski 2018-11-21 8:51 ` Bartosz Golaszewski 2018-11-13 13:50 ` Bartosz Golaszewski [this message] 2018-11-13 13:50 ` [PATCH 2/3] gpio: davinci: restore a way to manually specify the GPIO base Bartosz Golaszewski 2018-11-19 13:19 ` Linus Walleij 2018-11-19 13:19 ` Linus Walleij 2018-11-19 14:20 ` Bartosz Golaszewski 2018-11-19 14:20 ` Bartosz Golaszewski 2018-11-13 13:50 ` [PATCH 3/3] ARM: davinci: fix da850-evm boot in legacy mode Bartosz Golaszewski 2018-11-13 13:50 ` Bartosz Golaszewski 2018-11-19 21:07 ` Sekhar Nori 2018-11-19 21:07 ` Sekhar Nori 2018-11-19 21:07 ` Sekhar Nori 2018-11-16 21:51 ` [PATCH 0/3] ARM: davinci: fix ethernet support on da850-evm Linus Walleij 2018-11-16 21:51 ` Linus Walleij 2018-11-19 9:11 ` Bartosz Golaszewski 2018-11-19 9:11 ` Bartosz Golaszewski 2018-11-20 8:40 ` Linus Walleij 2018-11-20 8:40 ` Linus Walleij
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20181113135051.15308-3-brgl@bgdev.pl \ --to=brgl@bgdev.pl \ --cc=bgolaszewski@baylibre.com \ --cc=grygorii.strashko@ti.com \ --cc=j-keerthy@ti.com \ --cc=khilman@kernel.org \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@armlinux.org.uk \ --cc=nsekhar@ti.com \ --cc=stable@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.