mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Merge 5.4.139 into android11-5.4-lts
Changes in 5.4.139
btrfs: delete duplicated words + other fixes in comments
btrfs: do not commit logs and transactions during link and rename operations
btrfs: fix race causing unnecessary inode logging during link and rename
btrfs: fix lost inode on log replay after mix of fsync, rename and inode eviction
regulator: rt5033: Fix n_voltages settings for BUCK and LDO
spi: stm32h7: fix full duplex irq handler handling
ASoC: tlv320aic31xx: fix reversed bclk/wclk master bits
r8152: Fix potential PM refcount imbalance
qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union()
net: Fix zero-copy head len calculation.
nvme: fix nvme_setup_command metadata trace event
ACPI: fix NULL pointer dereference
Revert "Bluetooth: Shutdown controller after workqueues are flushed or cancelled"
firmware: arm_scmi: Ensure drivers provide a probe function
firmware: arm_scmi: Add delayed response status check
Revert "watchdog: iTCO_wdt: Account for rebooting on second timeout"
bpf: Inherit expanded/patched seen count from old aux data
bpf: Do not mark insn as seen under speculative path verification
bpf: Fix leakage under speculation on mispredicted branches
bpf: Test_verifier, add alu32 bounds tracking tests
bpf, selftests: Add a verifier test for assigning 32bit reg states to 64bit ones
bpf, selftests: Adjust few selftest outcomes wrt unreachable code
spi: mediatek: Fix fifo transfer
Linux 5.4.139
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Change-Id: I4777fb2a78804bc8d710bd2f6c5b722086a41e32
This commit is contained in:
commit
ea224455dd
31 changed files with 296 additions and 250 deletions
|
|
@ -426,24 +426,15 @@ static int mtk_spi_fifo_transfer(struct spi_master *master,
|
|||
mtk_spi_prepare_transfer(master, xfer);
|
||||
mtk_spi_setup_packet(master);
|
||||
|
||||
cnt = xfer->len / 4;
|
||||
if (xfer->tx_buf)
|
||||
if (xfer->tx_buf) {
|
||||
cnt = xfer->len / 4;
|
||||
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);
|
||||
|
||||
remainder = xfer->len % 4;
|
||||
if (remainder > 0) {
|
||||
reg_val = 0;
|
||||
if (xfer->tx_buf) {
|
||||
remainder = xfer->len % 4;
|
||||
if (remainder > 0) {
|
||||
reg_val = 0;
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
mtk_spi_enable_transfer(master);
|
||||
|
|
|
|||
|
|
@ -913,15 +913,18 @@ static irqreturn_t stm32h7_spi_irq_thread(int irq, void *dev_id)
|
|||
ier = readl_relaxed(spi->base + STM32H7_SPI_IER);
|
||||
|
||||
mask = ier;
|
||||
/* EOTIE is triggered on EOT, SUSP and TXC events. */
|
||||
/*
|
||||
* EOTIE enables irq from EOT, SUSP and TXC events. We need to set
|
||||
* SUSP to acknowledge it later. TXC is automatically cleared
|
||||
*/
|
||||
|
||||
mask |= STM32H7_SPI_SR_SUSP;
|
||||
/*
|
||||
* When TXTF is set, DXPIE and TXPIE are cleared. So in case of
|
||||
* Full-Duplex, need to poll RXP event to know if there are remaining
|
||||
* data, before disabling SPI.
|
||||
* DXPIE is set in Full-Duplex, one IT will be raised if TXP and RXP
|
||||
* are set. So in case of Full-Duplex, need to poll TXP and RXP event.
|
||||
*/
|
||||
if (spi->rx_buf && !spi->cur_usedma)
|
||||
mask |= STM32H7_SPI_SR_RXP;
|
||||
if ((spi->cur_comm == SPI_FULL_DUPLEX) && !spi->cur_usedma)
|
||||
mask |= STM32H7_SPI_SR_TXP | STM32H7_SPI_SR_RXP;
|
||||
|
||||
if (!(sr & mask)) {
|
||||
dev_warn(spi->dev, "spurious IT (sr=0x%08x, ier=0x%08x)\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue