aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <ukleinek@debian.org>2018-12-17 11:30:59 +0100
committerUwe Kleine-König <ukleinek@debian.org>2018-12-17 11:30:59 +0100
commita48b71908842e12389a442273c53eea6709d1308 (patch)
tree655a18f1d7e9085813c61f520fd67ca942d7641e
parent9b22ee4b80d33ef7fa4bbf9f53bb4a402be4c367 (diff)
downloadkernel_replicant_linux-a48b71908842e12389a442273c53eea6709d1308.tar.gz
kernel_replicant_linux-a48b71908842e12389a442273c53eea6709d1308.tar.bz2
kernel_replicant_linux-a48b71908842e12389a442273c53eea6709d1308.zip
[arm] Fix probing of 3rd gpio device on Armada 370.
-rw-r--r--debian/changelog6
-rw-r--r--debian/patches/bugfix/arm/gpio-mvebu-only-fail-on-missing-clk-if-pwm-is-actual.patch41
-rw-r--r--debian/patches/series1
3 files changed, 48 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index a37abe53c922..70540a317d26 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+linux (4.19.9-2) UNRELEASED; urgency=medium
+
+ * [arm] Fix probing of 3rd gpio device on Armada 370.
+
+ -- Uwe Kleine-König <ukleinek@debian.org> Mon, 17 Dec 2018 11:27:32 +0100
+
linux (4.19.9-1) unstable; urgency=medium
* New upstream stable update:
diff --git a/debian/patches/bugfix/arm/gpio-mvebu-only-fail-on-missing-clk-if-pwm-is-actual.patch b/debian/patches/bugfix/arm/gpio-mvebu-only-fail-on-missing-clk-if-pwm-is-actual.patch
new file mode 100644
index 000000000000..9c7ddc95528d
--- /dev/null
+++ b/debian/patches/bugfix/arm/gpio-mvebu-only-fail-on-missing-clk-if-pwm-is-actual.patch
@@ -0,0 +1,41 @@
+From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Date: Mon, 17 Dec 2018 09:30:10 +0100
+Subject: gpio: mvebu: only fail on missing clk if pwm is actually to be used
+Origin: http://lists.infradead.org/pipermail/linux-arm-kernel/2018-December/621248.html
+
+The gpio IP on Armada 370 at offset 0x18180 has neither a clk nor pwm
+registers. So there is no need for a clk as the pwm isn't used anyhow.
+So only check for the clk in the presence of the pwm registers. This fixes
+a failure to probe the gpio driver for the above mentioned gpio device.
+
+Fixes: 757642f9a584 ("gpio: mvebu: Add limited PWM support")
+Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
+---
+ drivers/gpio/gpio-mvebu.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
+index 6e02148c208b..adc768f908f1 100644
+--- a/drivers/gpio/gpio-mvebu.c
++++ b/drivers/gpio/gpio-mvebu.c
+@@ -773,9 +773,6 @@ static int mvebu_pwm_probe(struct platform_device *pdev,
+ "marvell,armada-370-gpio"))
+ return 0;
+
+- if (IS_ERR(mvchip->clk))
+- return PTR_ERR(mvchip->clk);
+-
+ /*
+ * There are only two sets of PWM configuration registers for
+ * all the GPIO lines on those SoCs which this driver reserves
+@@ -786,6 +783,9 @@ static int mvebu_pwm_probe(struct platform_device *pdev,
+ if (!res)
+ return 0;
+
++ if (IS_ERR(mvchip->clk))
++ return PTR_ERR(mvchip->clk);
++
+ /*
+ * Use set A for lines of GPIO chip with id 0, B for GPIO chip
+ * with id 1. Don't allow further GPIO chips to be used for PWM.
diff --git a/debian/patches/series b/debian/patches/series
index eb59831e0ecc..4d8be899464c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -78,6 +78,7 @@ bugfix/powerpc/powerpc-boot-fix-missing-crc32poly.h-when-building-with-kernel_xz
bugfix/arm64/arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch
bugfix/x86/x86-32-disable-3dnow-in-generic-config.patch
bugfix/x86/x86-mm-Fix-guard-hole-handling.patch
+bugfix/arm/gpio-mvebu-only-fail-on-missing-clk-if-pwm-is-actual.patch
# Arch features
features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch