Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cca112ec authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull spi fixes from Mark Brown:
 "The usual small smattering of driver specific fixes. A few bits that
  stand out here:

   - the R-Car patches adding fallbacks are just adding new compatible
     strings to the driver so that device trees are written in a more
     robustly future proof fashion, this isn't strictly a fix but it's
     just new IDs and it's better to get it into mainline sooner to
     improve the ABI

   - the DesignWare "switch to new API part 2" patch is actually a
     misleadingly titled fix for a bit that got missed in the original
     conversion"

* tag 'spi-fix-v4.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: davinci: use dma_mapping_error()
  spi: spi-axi: Free resources on error path
  spi: pxa2xx: add missed break
  spi: dw-mid: switch to new dmaengine_terminate_* API (part 2)
  spi: dw: Make debugfs name unique between instances
  spi: sh-msiof: Do not use C++ style comment
  spi: armada-3700: Set mode bits correctly
  spi: armada-3700: fix unsigned compare than zero on irq
  spi: sh-msiof: Add R-Car Gen 2 and 3 fallback bindings
  spi: SPI_FSL_DSPI should depend on HAS_DMA
parents e90665a5 52cc720c
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
Renesas MSIOF spi controller

Required properties:
- compatible           : "renesas,msiof-<soctype>" for SoCs,
			 "renesas,sh-msiof" for SuperH, or
			 "renesas,sh-mobile-msiof" for SH Mobile series.
			 Examples with soctypes are:
			 "renesas,msiof-r8a7790" (R-Car H2)
- compatible           : "renesas,msiof-r8a7790" (R-Car H2)
			 "renesas,msiof-r8a7791" (R-Car M2-W)
			 "renesas,msiof-r8a7792" (R-Car V2H)
			 "renesas,msiof-r8a7793" (R-Car M2-N)
			 "renesas,msiof-r8a7794" (R-Car E2)
			 "renesas,msiof-r8a7796" (R-Car M3-W)
			 "renesas,msiof-sh73a0" (SH-Mobile AG5)
			 "renesas,sh-mobile-msiof" (generic SH-Mobile compatibile device)
			 "renesas,rcar-gen2-msiof" (generic R-Car Gen2 compatible device)
			 "renesas,rcar-gen3-msiof" (generic R-Car Gen3 compatible device)
			 "renesas,sh-msiof"      (deprecated)

			 When compatible with the generic version, nodes
			 must list the SoC-specific version corresponding
			 to the platform first followed by the generic
			 version.

- reg                  : A list of offsets and lengths of the register sets for
			 the device.
			 If only one register set is present, it is to be used
@@ -61,7 +67,8 @@ Documentation/devicetree/bindings/pinctrl/renesas,*.
Example:

	msiof0: spi@e6e20000 {
		compatible = "renesas,msiof-r8a7791";
		compatible = "renesas,msiof-r8a7791",
			     "renesas,rcar-gen2-msiof";
		reg = <0 0xe6e20000 0 0x0064>;
		interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
		clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>;
+1 −0
Original line number Diff line number Diff line
@@ -378,6 +378,7 @@ config SPI_FSL_SPI
config SPI_FSL_DSPI
	tristate "Freescale DSPI controller"
	select REGMAP_MMIO
	depends on HAS_DMA
	depends on SOC_VF610 || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
	help
	  This enables support for the Freescale DSPI controller in master
+6 −5
Original line number Diff line number Diff line
@@ -800,7 +800,7 @@ static int a3700_spi_probe(struct platform_device *pdev)
	struct spi_master *master;
	struct a3700_spi *spi;
	u32 num_cs = 0;
	int ret = 0;
	int irq, ret = 0;

	master = spi_alloc_master(dev, sizeof(*spi));
	if (!master) {
@@ -825,7 +825,7 @@ static int a3700_spi_probe(struct platform_device *pdev)
	master->unprepare_message = a3700_spi_unprepare_message;
	master->set_cs = a3700_spi_set_cs;
	master->flags = SPI_MASTER_HALF_DUPLEX;
	master->mode_bits |= (SPI_RX_DUAL | SPI_RX_DUAL |
	master->mode_bits |= (SPI_RX_DUAL | SPI_TX_DUAL |
			      SPI_RX_QUAD | SPI_TX_QUAD);

	platform_set_drvdata(pdev, master);
@@ -846,12 +846,13 @@ static int a3700_spi_probe(struct platform_device *pdev)
		goto error;
	}

	spi->irq = platform_get_irq(pdev, 0);
	if (spi->irq < 0) {
		dev_err(dev, "could not get irq: %d\n", spi->irq);
	irq = platform_get_irq(pdev, 0);
	if (irq < 0) {
		dev_err(dev, "could not get irq: %d\n", irq);
		ret = -ENXIO;
		goto error;
	}
	spi->irq = irq;

	init_completion(&spi->done);

+2 −1
Original line number Diff line number Diff line
@@ -494,7 +494,8 @@ static int spi_engine_probe(struct platform_device *pdev)
			SPI_ENGINE_VERSION_MAJOR(version),
			SPI_ENGINE_VERSION_MINOR(version),
			SPI_ENGINE_VERSION_PATCH(version));
		return -ENODEV;
		ret = -ENODEV;
		goto err_put_master;
	}

	spi_engine->clk = devm_clk_get(&pdev->dev, "s_axi_aclk");
+2 −2
Original line number Diff line number Diff line
@@ -646,7 +646,7 @@ static int davinci_spi_bufs(struct spi_device *spi, struct spi_transfer *t)
			buf = t->rx_buf;
		t->rx_dma = dma_map_single(&spi->dev, buf,
				t->len, DMA_FROM_DEVICE);
		if (!t->rx_dma) {
		if (dma_mapping_error(&spi->dev, !t->rx_dma)) {
			ret = -EFAULT;
			goto err_rx_map;
		}
@@ -660,7 +660,7 @@ static int davinci_spi_bufs(struct spi_device *spi, struct spi_transfer *t)
			buf = (void *)t->tx_buf;
		t->tx_dma = dma_map_single(&spi->dev, buf,
				t->len, DMA_TO_DEVICE);
		if (!t->tx_dma) {
		if (dma_mapping_error(&spi->dev, t->tx_dma)) {
			ret = -EFAULT;
			goto err_tx_map;
		}
Loading