Unverified Commit 8f3ed6d0 authored by Mark Brown's avatar Mark Brown
Browse files

Merge branch 'spi-5.4' into spi-linus

parents af42d346 c5923243
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -302,7 +302,6 @@ struct atmel_spi {
	bool			use_cs_gpios;

	bool			keep_cs;
	bool			cs_active;

	u32			fifo_size;
};
@@ -1376,11 +1375,9 @@ static int atmel_spi_one_transfer(struct spi_master *master,
				 &msg->transfers)) {
			as->keep_cs = true;
		} else {
			as->cs_active = !as->cs_active;
			if (as->cs_active)
				cs_activate(as, msg->spi);
			else
			cs_deactivate(as, msg->spi);
			udelay(10);
			cs_activate(as, msg->spi);
		}
	}

@@ -1403,7 +1400,6 @@ static int atmel_spi_transfer_one_message(struct spi_master *master,
	atmel_spi_lock(as);
	cs_activate(as, spi);

	as->cs_active = true;
	as->keep_cs = false;

	msg->status = 0;
+1 −1
Original line number Diff line number Diff line
@@ -1248,7 +1248,7 @@ static int bcm2835_spi_setup(struct spi_device *spi)
	/*
	 * Retrieve the corresponding GPIO line used for CS.
	 * The inversion semantics will be handled by the GPIO core
	 * code, so we pass GPIOS_OUT_LOW for "unasserted" and
	 * code, so we pass GPIOD_OUT_LOW for "unasserted" and
	 * the correct flag for inversion semantics. The SPI_CS_HIGH
	 * on spi->mode cannot be checked for polarity in this case
	 * as the flag use_gpio_descriptors enforces SPI_CS_HIGH.
+5 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
#include <linux/scatterlist.h>
@@ -193,6 +194,8 @@ static int dw_spi_mmio_probe(struct platform_device *pdev)
			goto out;
	}

	pm_runtime_enable(&pdev->dev);

	ret = dw_spi_add_host(&pdev->dev, dws);
	if (ret)
		goto out;
@@ -201,6 +204,7 @@ static int dw_spi_mmio_probe(struct platform_device *pdev)
	return 0;

out:
	pm_runtime_disable(&pdev->dev);
	clk_disable_unprepare(dwsmmio->pclk);
out_clk:
	clk_disable_unprepare(dwsmmio->clk);
@@ -212,6 +216,7 @@ static int dw_spi_mmio_remove(struct platform_device *pdev)
	struct dw_spi_mmio *dwsmmio = platform_get_drvdata(pdev);

	dw_spi_remove_host(&dwsmmio->dws);
	pm_runtime_disable(&pdev->dev);
	clk_disable_unprepare(dwsmmio->pclk);
	clk_disable_unprepare(dwsmmio->clk);

+2 −1
Original line number Diff line number Diff line
@@ -308,7 +308,8 @@ static int dw_spi_transfer_one(struct spi_controller *master,
	cr0 = (transfer->bits_per_word - 1)
		| (chip->type << SPI_FRF_OFFSET)
		| ((((spi->mode & SPI_CPOL) ? 1 : 0) << SPI_SCOL_OFFSET) |
			(((spi->mode & SPI_CPHA) ? 1 : 0) << SPI_SCPH_OFFSET))
			(((spi->mode & SPI_CPHA) ? 1 : 0) << SPI_SCPH_OFFSET) |
			(((spi->mode & SPI_LOOP) ? 1 : 0) << SPI_SRL_OFFSET))
		| (chip->tmode << SPI_TMOD_OFFSET);

	/*
+2 −1
Original line number Diff line number Diff line
@@ -392,6 +392,7 @@ void fsl_spi_cpm_free(struct mpc8xxx_spi *mspi)
	dma_unmap_single(dev, mspi->dma_dummy_rx, SPI_MRBLR, DMA_FROM_DEVICE);
	dma_unmap_single(dev, mspi->dma_dummy_tx, PAGE_SIZE, DMA_TO_DEVICE);
	cpm_muram_free(cpm_muram_offset(mspi->tx_bd));
	if (!(mspi->flags & SPI_CPM1))
		cpm_muram_free(cpm_muram_offset(mspi->pram));
	fsl_spi_free_dummy_rx();
}
Loading