aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-rpi
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-01-05 14:53:10 +0000
committerTimo Teräs <timo.teras@iki.fi>2016-01-05 15:02:06 +0000
commit75becdeef9900f0f77751201143f861b4c3cb65e (patch)
tree7323878d8311631f668d2596309b331e778c8ac1 /main/linux-rpi
parent0798b2a34e3d7f0e063cb2a5bc117527bd4b1f99 (diff)
downloadaports-75becdeef9900f0f77751201143f861b4c3cb65e.tar.bz2
aports-75becdeef9900f0f77751201143f861b4c3cb65e.tar.xz
main/linux-rpi: apply rotary-encoder dts fix and rpi mmc-spi fix
fixes #4973
Diffstat (limited to 'main/linux-rpi')
-rw-r--r--main/linux-rpi/APKBUILD18
-rw-r--r--main/linux-rpi/issue-4973.patch67
-rw-r--r--main/linux-rpi/rotary-encoder-fix.patch62
3 files changed, 142 insertions, 5 deletions
diff --git a/main/linux-rpi/APKBUILD b/main/linux-rpi/APKBUILD
index 6755151865..ad2d157820 100644
--- a/main/linux-rpi/APKBUILD
+++ b/main/linux-rpi/APKBUILD
@@ -7,7 +7,7 @@ case $pkgver in
*.*.*) _kernver=${pkgver%.*};;
*.*) _kernver=${pkgver};;
esac
-pkgrel=0
+pkgrel=1
pkgdesc="Linux kernel with Raspberry Pi patches"
url=https://github.com/raspberrypi/linux
depends="mkinitfs linux-firmware"
@@ -16,9 +16,11 @@ options="!strip"
install=
source="http://ftp.kernel.org/pub/linux/kernel/v4.x/linux-$_kernver.tar.xz
http://ftp.kernel.org/pub/linux/kernel/v4.x/patch-$pkgver.xz
- http://dev.alpinelinux.org/~tteras/linux-4.1.y-rpi-20151218.patch
+ http://dev.alpinelinux.org/~tteras/linux-4.1.y-rpi-20160105.patch
rpi-cirrus-4.1.y-20151218.patch
gpio-mcp23s08-pullups.patch
+ rotary-encoder-fix.patch
+ issue-4973.patch
config-rpi.armhf
config-rpi2.armhf
@@ -198,25 +200,31 @@ dev() {
md5sums="fe9dc0f6729f36400ea81aa41d614c37 linux-4.1.tar.xz
5ec05841161a172f8ae1a7f38bb382b0 patch-4.1.15.xz
-6b091b3432dfde5452b3d1c9239622f2 linux-4.1.y-rpi-20151218.patch
+c5bf5a6389520729d0e17bf02ab44504 linux-4.1.y-rpi-20160105.patch
d4b70738cf06dbd70534d5e873442951 rpi-cirrus-4.1.y-20151218.patch
b66e8aa4991ca5c2ccd61559ed7e6491 gpio-mcp23s08-pullups.patch
+53112c9e4422d407463ad6c45faa789c rotary-encoder-fix.patch
+29281b74d2cef6965fa4ab6d826a2aa4 issue-4973.patch
3b645eef5408cbbcf9c6b13581ef775a config-rpi.armhf
1c21e249ea27b70dd5e0a7b69820fdee config-rpi2.armhf
e587cae1dca2f5992555d9bcf53deecf markdt"
sha256sums="caf51f085aac1e1cea4d00dbbf3093ead07b551fc07b31b2a989c05f8ea72d9f linux-4.1.tar.xz
0ffca8557f1aa191da2f2260ad279c9cc858e6308a8af8a76f7ca3d3c0540344 patch-4.1.15.xz
-21dded436f0ff6f36fdc630c406b179820a13403f18c9c221c41d98cc9b77b4b linux-4.1.y-rpi-20151218.patch
+d093ece97f5ae05b255cfd3923a9f2683c41e77d5d83aa8c1ac92f163c1657c5 linux-4.1.y-rpi-20160105.patch
5aa17a1554598c3b364b7e8aea84bacfc13e8aca9b9101e58d89c211674a3d5a rpi-cirrus-4.1.y-20151218.patch
b389a556bbd98053881b43deef1adf20640f980557c5f37cfd7ece2daeecbda9 gpio-mcp23s08-pullups.patch
+8f810099810660436a49f029429aadb573aec756b07fcefbcc2ca2ffd21d6ecb rotary-encoder-fix.patch
+3a16e927ce53a8c56e7f1dd86fe8ad08b1c06466f5206c521a7e2de1e4796d6c issue-4973.patch
7eb3025189c64f4023db864169dcc9d64d029fc871d0ffbc59621292a338772a config-rpi.armhf
10318f14c68a7fafe3b1a8f3208c8586dabce5c01598a4bf7a2da76166b273b4 config-rpi2.armhf
0f6681fc5c3590e1dbe13a2bde796403bd1529cf0fe19720899eaa0db79bcb49 markdt"
sha512sums="168ef84a4e67619f9f53f3574e438542a5747f9b43443363cb83597fcdac9f40d201625c66e375a23226745eaada9176eb006ca023613cec089349e91751f3c0 linux-4.1.tar.xz
646daf16c01fb8c3013c7c9919c18c3635eb6bd37560623cb56cc7a6d0b22fb13290cee8865dfbcc435cd8544cc3ecb6f3aae538d10c9e0b1098806f233155a3 patch-4.1.15.xz
-9ca5c2c0417fc091f46393a7b84b4f8520fa7e21ce6f4c6987966f535388c97e92ffaf8044c80182be584d37b458f9c95b0cf0d8bd86ba3b5cbef1e47b2178bc linux-4.1.y-rpi-20151218.patch
+bdd4caf18762e1705536227d573321164f62d7c194dec06848764ad1a2a91e2eaa5a4e032a4bfb94d2264a6d9a77ab28e5659c34e011b9465557be03d6e343dc linux-4.1.y-rpi-20160105.patch
843afc1f2a72fa9618935dd67d4ac33a22ee78f20114af349f8d93e54864375b3ef192c8d8fde814d6685d5fe675c2a850743834ef89640eedce9f4db5ffdb67 rpi-cirrus-4.1.y-20151218.patch
36724ba56cb8fdf3a3d347cffb67ae1cc3d7b1052d526b6b5134ebf6baae9f9724b586c97833453dc7697ab24699426f0749af78b6a80be36967a80033a0cf40 gpio-mcp23s08-pullups.patch
+e948ce9c44bc7f20a632519f9ca49f0b9c8c256cdf75d5632a184d41d6a9995c122232d7812d5224def7d119192d4d18f6f9acb9cf6adc8f1df52bea4970731b rotary-encoder-fix.patch
+501c91bf2538a18102da59bbccc3097f9c3c90079acc0e946ff075074160c09b8a66934e5ce5470e170f0e4f93d114709a95230367426d0bb7ea02c4bdf4cc9b issue-4973.patch
51f7fcacb9fb05aa14e7ee7890f7726ce4b0001496cfe9ca2152693c2acf5fefbfa654d2d4f26058aa3b617141f29cff7e0427c30e291209829ab1e44c6412ba config-rpi.armhf
1e249312b12e5d247ca7e250653afbacb5bc9d23983eaa4d552ff5b28c2dc0b0302a1c6af499fa59fa166a31e067fddae191bd977b0bd13773a66c81ca398f93 config-rpi2.armhf
a4ecd1f48db64f9d6a189250d1937d7f2cd3a049a3d24cc527d04d05db06137722f1ba44bcd6033794781c3f2cfe2fbe065410a16de4bfdf4b1cd95d89322a77 markdt"
diff --git a/main/linux-rpi/issue-4973.patch b/main/linux-rpi/issue-4973.patch
new file mode 100644
index 0000000000..810c72e190
--- /dev/null
+++ b/main/linux-rpi/issue-4973.patch
@@ -0,0 +1,67 @@
+https://bugs.alpinelinux.org/issues/4973
+https://github.com/raspberrypi/linux/issues/911
+https://github.com/raspberrypi/linux/pull/1135
+https://github.com/msperl/linux-rpi/commit/aef50a19f335ae3d2eb43ac5496c7f03930b394f
+
+This is not a proper fix, but as this is rasperry pi specific kernel,
+we've applied this workaround for now.
+
+From aef50a19f335ae3d2eb43ac5496c7f03930b394f Mon Sep 17 00:00:00 2001
+From: Martin Sperl <kernel@martin.sperl.org>
+Date: Tue, 15 Sep 2015 07:26:07 +0000
+Subject: [PATCH] mmc: spi: disable dma mapping code, as it does not work
+
+since:
+ commit 0589342c27944e50ebd7a54f5215002b6598b748
+ Author: Rob Herring <rob.herring@calxeda.com>
+ Date: Tue Oct 29 23:36:46 2013 -0500
+
+ of: set dma_mask to point to coherent_dma_mask
+
+ Platform devices created by DT code don't initialize dma_mask pointer to
+ anything. Set it to coherent_dma_mask by default if the architecture
+ code has not set it.
+
+the mmc-spi driver no longer detects the sd-cards any longer.
+
+This patch disables the offending section in mmc_spi
+so that the driver works again and detects the sd card normally.
+
+There is no real negative impact as the spi-framework
+does no longer rely on driver-provided DMA mappings but
+maps the transfers transparently.
+
+Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
+---
+ drivers/mmc/host/mmc_spi.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
+index ae19d83..16946e2 100644
+--- a/drivers/mmc/host/mmc_spi.c
++++ b/drivers/mmc/host/mmc_spi.c
+@@ -1387,6 +1387,16 @@ static int mmc_spi_probe(struct spi_device *spi)
+ if (!host->data)
+ goto fail_nobuf1;
+
++ /* for some reason mmc_spi does not work with this enabled
++ * it is not needed anyway, as the SPI framework does DMA
++ * transfers now automatically
++ * the patch that introduced this was:
++ * commit 0589342c27944e50ebd7a54f5215002b6598b748
++ * Author: Rob Herring <rob.herring@calxeda.com>
++ * Date: Tue Oct 29 23:36:46 2013 -0500
++ * of: set dma_mask to point to coherent_dma_mask
++ */
++#if 0
+ if (spi->master->dev.parent->dma_mask) {
+ struct device *dev = spi->master->dev.parent;
+
+@@ -1402,6 +1412,7 @@ static int mmc_spi_probe(struct spi_device *spi)
+ host->data_dma, sizeof(*host->data),
+ DMA_BIDIRECTIONAL);
+ }
++#endif
+
+ /* setup message for status/busy readback */
+ spi_message_init(&host->readback);
diff --git a/main/linux-rpi/rotary-encoder-fix.patch b/main/linux-rpi/rotary-encoder-fix.patch
new file mode 100644
index 0000000000..0d9c6ba59f
--- /dev/null
+++ b/main/linux-rpi/rotary-encoder-fix.patch
@@ -0,0 +1,62 @@
+From e2b19ed7b2284e808dfca3e9207ad52c09e11104 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Wed, 23 Dec 2015 16:37:00 +0200
+Subject: [PATCH] Input: rotary-encoder: use request_any_context_irq and
+ gpio_get_value_cansleep
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This allows to use GPIO expanders behind I2C or SPI bus.
+
+Signed-off-by: Timo Teräs <timo.teras@iki.fi>
+---
+ drivers/input/misc/rotary_encoder.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c
+index 8aee719..8bedd7b 100644
+--- a/drivers/input/misc/rotary_encoder.c
++++ b/drivers/input/misc/rotary_encoder.c
+@@ -48,8 +48,8 @@ struct rotary_encoder {
+
+ static int rotary_encoder_get_state(const struct rotary_encoder_platform_data *pdata)
+ {
+- int a = !!gpio_get_value(pdata->gpio_a);
+- int b = !!gpio_get_value(pdata->gpio_b);
++ int a = !!gpio_get_value_cansleep(pdata->gpio_a);
++ int b = !!gpio_get_value_cansleep(pdata->gpio_b);
+
+ a ^= pdata->inverted_a;
+ b ^= pdata->inverted_b;
+@@ -335,18 +335,18 @@ static int rotary_encoder_probe(struct platform_device *pdev)
+ goto exit_free_gpio_b;
+ }
+
+- err = request_irq(encoder->irq_a, handler,
+- IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+- DRV_NAME, encoder);
+- if (err) {
++ err = request_any_context_irq(encoder->irq_a, handler,
++ IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++ DRV_NAME, encoder);
++ if (err < 0) {
+ dev_err(dev, "unable to request IRQ %d\n", encoder->irq_a);
+ goto exit_free_gpio_b;
+ }
+
+- err = request_irq(encoder->irq_b, handler,
+- IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+- DRV_NAME, encoder);
+- if (err) {
++ err = request_any_context_irq(encoder->irq_b, handler,
++ IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++ DRV_NAME, encoder);
++ if (err < 0) {
+ dev_err(dev, "unable to request IRQ %d\n", encoder->irq_b);
+ goto exit_free_irq_a;
+ }
+--
+2.6.4
+
+