All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] spi: spi-cavium-thunderx: flag controller as half duplex
@ 2020-05-28 15:46 Tim Harvey
  2020-06-15 23:41 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Harvey @ 2020-05-28 15:46 UTC (permalink / raw)
  To: Mark Brown, linux-spi, Robert Richter; +Cc: linux-kernel, Tim Harvey

The OcteonTX (TX1/ThunderX) SPI controller does not support full
duplex transactions. Set the appropriate flag such that the spi
core will return -EINVAL on such transactions requested by chip
drivers.

This is an RFC as I need someone from Marvell/Cavium to confirm
if this driver is used for other silicon that does support
full duplex transfers (in which case we will need to identify
that we are running on the ThunderX arch before setting the flag).

Cc: Robert Richter <rrichter@marvell.com>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 drivers/spi/spi-cavium-thunderx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-cavium-thunderx.c b/drivers/spi/spi-cavium-thunderx.c
index fd6b9ca..60c0d69 100644
--- a/drivers/spi/spi-cavium-thunderx.c
+++ b/drivers/spi/spi-cavium-thunderx.c
@@ -64,6 +64,7 @@ static int thunderx_spi_probe(struct pci_dev *pdev,
 		p->sys_freq = SYS_FREQ_DEFAULT;
 	dev_info(dev, "Set system clock to %u\n", p->sys_freq);
 
+	master->flags = SPI_MASTER_HALF_DUPLEX;
 	master->num_chipselect = 4;
 	master->mode_bits = SPI_CPHA | SPI_CPOL | SPI_CS_HIGH |
 			    SPI_LSB_FIRST | SPI_3WIRE;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC PATCH] spi: spi-cavium-thunderx: flag controller as half duplex
  2020-05-28 15:46 [RFC PATCH] spi: spi-cavium-thunderx: flag controller as half duplex Tim Harvey
@ 2020-06-15 23:41 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2020-06-15 23:41 UTC (permalink / raw)
  To: Tim Harvey, linux-spi, Robert Richter; +Cc: linux-kernel

On Thu, 28 May 2020 08:46:39 -0700, Tim Harvey wrote:
> The OcteonTX (TX1/ThunderX) SPI controller does not support full
> duplex transactions. Set the appropriate flag such that the spi
> core will return -EINVAL on such transactions requested by chip
> drivers.
> 
> This is an RFC as I need someone from Marvell/Cavium to confirm
> if this driver is used for other silicon that does support
> full duplex transfers (in which case we will need to identify
> that we are running on the ThunderX arch before setting the flag).

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: spi-cavium-thunderx: flag controller as half duplex
      commit: e8510d43f219beff1f426080049a5462148afd2f

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-15 23:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 15:46 [RFC PATCH] spi: spi-cavium-thunderx: flag controller as half duplex Tim Harvey
2020-06-15 23:41 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.