Skip to content

Commit a271838

Browse files
committed
Merge tag 'spi-fix-v6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi fixes from Mark Brown: "A collection of mostly unremarkable fixes for SPI that have built up since the merge window, all driver specific. The change to the qup adding support for GPIO chip selects is fixing a regression due to the removal of legacy GPIO handling, the driver had previously been silently relying on the legacy GPIO support in a slightly broken way which worked well enough on some systems. Fixing it is simply a case of setting a couple of bits of information in the driver description" * tag 'spi-fix-v6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: aspeed: Fix window offset of CE1 spi: qup: support using GPIO as chip select line spi: intel: Fix the offset to get the 64K erase opcode spi: aspeed: Fix typo in mode_bits field for AST2600 platform spi: mpc52xx: Replace NO_IRQ by 0 spi: spi-mem: Fix typo (of -> or) spi: spi-gxp: fix typo in SPDX identifier line spi: tegra210-quad: Fix combined sequence
2 parents 9855523 + f8aa6c8 commit a271838

File tree

7 files changed

+14
-7
lines changed

7 files changed

+14
-7
lines changed

drivers/spi/spi-aspeed-smc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ static void aspeed_spi_get_windows(struct aspeed_spi *aspi,
398398
windows[cs].cs = cs;
399399
windows[cs].size = data->segment_end(aspi, reg_val) -
400400
data->segment_start(aspi, reg_val);
401-
windows[cs].offset = cs ? windows[cs - 1].offset + windows[cs - 1].size : 0;
401+
windows[cs].offset = data->segment_start(aspi, reg_val) - aspi->ahb_base_phy;
402402
dev_vdbg(aspi->dev, "CE%d offset=0x%.8x size=0x%x\n", cs,
403403
windows[cs].offset, windows[cs].size);
404404
}
@@ -1163,7 +1163,7 @@ static const struct aspeed_spi_data ast2500_spi_data = {
11631163
static const struct aspeed_spi_data ast2600_fmc_data = {
11641164
.max_cs = 3,
11651165
.hastype = false,
1166-
.mode_bits = SPI_RX_QUAD | SPI_RX_QUAD,
1166+
.mode_bits = SPI_RX_QUAD | SPI_TX_QUAD,
11671167
.we0 = 16,
11681168
.ctl0 = CE0_CTRL_REG,
11691169
.timing = CE0_TIMING_COMPENSATION_REG,
@@ -1178,7 +1178,7 @@ static const struct aspeed_spi_data ast2600_fmc_data = {
11781178
static const struct aspeed_spi_data ast2600_spi_data = {
11791179
.max_cs = 2,
11801180
.hastype = false,
1181-
.mode_bits = SPI_RX_QUAD | SPI_RX_QUAD,
1181+
.mode_bits = SPI_RX_QUAD | SPI_TX_QUAD,
11821182
.we0 = 16,
11831183
.ctl0 = CE0_CTRL_REG,
11841184
.timing = CE0_TIMING_COMPENSATION_REG,

drivers/spi/spi-gxp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: GPL-2.0=or-later
1+
// SPDX-License-Identifier: GPL-2.0-or-later
22
/* Copyright (C) 2022 Hewlett-Packard Development Company, L.P. */
33

44
#include <linux/iopoll.h>

drivers/spi/spi-intel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
#define ERASE_OPCODE_SHIFT 8
115115
#define ERASE_OPCODE_MASK (0xff << ERASE_OPCODE_SHIFT)
116116
#define ERASE_64K_OPCODE_SHIFT 16
117-
#define ERASE_64K_OPCODE_MASK (0xff << ERASE_OPCODE_SHIFT)
117+
#define ERASE_64K_OPCODE_MASK (0xff << ERASE_64K_OPCODE_SHIFT)
118118

119119
/* Flash descriptor fields */
120120
#define FLVALSIG_MAGIC 0x0ff0a55a

drivers/spi/spi-mpc52xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ mpc52xx_spi_fsmstate_idle(int irq, struct mpc52xx_spi *ms, u8 status, u8 data)
151151
int spr, sppr;
152152
u8 ctrl1;
153153

154-
if (status && (irq != NO_IRQ))
154+
if (status && irq)
155155
dev_err(&ms->master->dev, "spurious irq, status=0x%.2x\n",
156156
status);
157157

drivers/spi/spi-qup.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,8 @@ static int spi_qup_probe(struct platform_device *pdev)
10571057
else
10581058
master->num_chipselect = num_cs;
10591059

1060+
master->use_gpio_descriptors = true;
1061+
master->max_native_cs = SPI_NUM_CHIPSELECTS;
10601062
master->bus_num = pdev->id;
10611063
master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LOOP;
10621064
master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32);

drivers/spi/spi-tegra210-quad.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,6 +1157,11 @@ static int tegra_qspi_combined_seq_xfer(struct tegra_qspi *tqspi,
11571157
msg->actual_length += xfer->len;
11581158
transfer_phase++;
11591159
}
1160+
if (!xfer->cs_change) {
1161+
tegra_qspi_transfer_end(spi);
1162+
spi_transfer_delay_exec(xfer);
1163+
}
1164+
ret = 0;
11601165

11611166
exit:
11621167
msg->status = ret;

include/linux/spi/spi-mem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ static inline void *spi_mem_get_drvdata(struct spi_mem *mem)
225225
/**
226226
* struct spi_controller_mem_ops - SPI memory operations
227227
* @adjust_op_size: shrink the data xfer of an operation to match controller's
228-
* limitations (can be alignment of max RX/TX size
228+
* limitations (can be alignment or max RX/TX size
229229
* limitations)
230230
* @supports_op: check if an operation is supported by the controller
231231
* @exec_op: execute a SPI memory operation

0 commit comments

Comments
 (0)