mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 19:25:25 +03:00
create patch by reverting upstream commit 09b8cc7810587257e5f82080884001301e1a1ba9 which made cros_ec not detected
37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
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(®_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), ®_val, remainder);
|
|
- }
|
|
+ memcpy(®_val, xfer->tx_buf + (cnt * 4), remainder);
|
|
+ writel(reg_val, mdata->base + SPI_TX_DATA_REG);
|
|
}
|
|
|
|
mtk_spi_enable_transfer(master);
|