aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan P. Stanić <mps@arvanta.net>2021-07-29 18:53:00 +0000
committerMilan P. Stanić <mps@arvanta.net>2021-07-29 18:53:00 +0000
commita2d4f327a7d8c3224ca74e024fe2ac8e375b5f19 (patch)
tree9e7331c8c863ab3a4ef008a8d4a438aa9d52ac4d
parentfde006f9e650282a91a919109e31505ac6cc8b3f (diff)
downloadaports-a2d4f327a7d8c3224ca74e024fe2ac8e375b5f19.tar.gz
aports-a2d4f327a7d8c3224ca74e024fe2ac8e375b5f19.tar.bz2
aports-a2d4f327a7d8c3224ca74e024fe2ac8e375b5f19.tar.xz
testing/linux-elm: fix non working keyboard
create patch by reverting upstream commit 09b8cc7810587257e5f82080884001301e1a1ba9 which made cros_ec not detected
-rw-r--r--testing/linux-elm/APKBUILD4
-rw-r--r--testing/linux-elm/revert-spi-mt65xx.c.patch37
2 files changed, 40 insertions, 1 deletions
diff --git a/testing/linux-elm/APKBUILD b/testing/linux-elm/APKBUILD
index e5f7eaa1d4..b1f7de113f 100644
--- a/testing/linux-elm/APKBUILD
+++ b/testing/linux-elm/APKBUILD
@@ -9,7 +9,7 @@ case $pkgver in
*.*.*) _kernver=${pkgver%.*};;
*.*) _kernver=$pkgver;;
esac
-pkgrel=0
+pkgrel=1
pkgdesc="Linux latest stable kernel for elm chromebooks"
url="https://www.kernel.org"
#depends="mkinitfs linux-firmware-any"
@@ -35,6 +35,7 @@ esac
fix-spi-nor-max-frequency.patch
fix-mmc-order.patch
fix-cursor.patch
+ revert-spi-mt65xx.c.patch
"
arch="aarch64"
@@ -243,4 +244,5 @@ a8edf97e9d38a49f1be2bde1e29ad96274bb2c6f7e8a2bebaa1161dd4df9cabcbaec4ff644c45bee
9e17fb96b81590da0f9b0917ddd2b9d195bab5cde2a4e7feb19991c50a8ac8e4502445715153ced8666e5b6575137c1d49899bb0ae9ab4505ed8f1ff7e569269 fix-spi-nor-max-frequency.patch
00e7afdab1dc89a6e0426829685d85cebb98fb95cb13a253d01326fd22f78ddf792bbe3b5be4c9bc93784f1fa93f87f604a4b6c6710660319db6f2e35dd09835 fix-mmc-order.patch
cadb1e1d651ffb3bd3ef2f32585cd2842249b933b99614c2b01a29a3471998090ff76b7c159c4330b88fda520902cabd5d5b4c9d630be5e4d64c56ecba813612 fix-cursor.patch
+965d96cc0915f9eee23ecc566742aba49882b7c99c8d7d1bfd6a54a65970142464b425726ab19a33814c9513a064219c241dc066deb40ab18619c8982484a81b revert-spi-mt65xx.c.patch
"
diff --git a/testing/linux-elm/revert-spi-mt65xx.c.patch b/testing/linux-elm/revert-spi-mt65xx.c.patch
new file mode 100644
index 0000000000..8c7ad60abd
--- /dev/null
+++ b/testing/linux-elm/revert-spi-mt65xx.c.patch
@@ -0,0 +1,37 @@
+Author: Milan P. Stanić <mps@arvanta.net>
+Date: Thu Jul 29 18:43:30 2021 +0000
+
+revert 09b8cc7810587257e5f82080884001301e1a1ba9 commit
+with this commit cros_ec keyboard is not detected on MT8173 elm chromebook
+and doesn't work
+reverting this commit fixed it
+
+--- a/drivers/spi/spi-mt65xx.c
++++ b/drivers/spi/spi-mt65xx.c
+@@ -427,23 +427,13 @@
+ mtk_spi_setup_packet(master);
+
+ cnt = xfer->len / 4;
+- if (xfer->tx_buf)
+- iowrite32_rep(mdata->base + SPI_TX_DATA_REG, xfer->tx_buf, cnt);
+-
+- if (xfer->rx_buf)
+- ioread32_rep(mdata->base + SPI_RX_DATA_REG, xfer->rx_buf, cnt);
++ iowrite32_rep(mdata->base + SPI_TX_DATA_REG, xfer->tx_buf, cnt);
+
+ remainder = xfer->len % 4;
+ if (remainder > 0) {
+ reg_val = 0;
+- if (xfer->tx_buf) {
+- memcpy(&reg_val, xfer->tx_buf + (cnt * 4), remainder);
+- writel(reg_val, mdata->base + SPI_TX_DATA_REG);
+- }
+- if (xfer->rx_buf) {
+- reg_val = readl(mdata->base + SPI_RX_DATA_REG);
+- memcpy(xfer->rx_buf + (cnt * 4), &reg_val, remainder);
+- }
++ memcpy(&reg_val, xfer->tx_buf + (cnt * 4), remainder);
++ writel(reg_val, mdata->base + SPI_TX_DATA_REG);
+ }
+
+ mtk_spi_enable_transfer(master);