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

Commit d1345c52 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'spi/topic/adi-v3', 'spi/topic/atmel',...

Merge remote-tracking branches 'spi/topic/adi-v3', 'spi/topic/atmel', 'spi/topic/cleanup' and 'spi/topic/davinci' into spi-next
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -8,7 +8,8 @@ Required properties:
	- "ti,dm6441-spi" for SPI used similar to that on DM644x SoC family
	- "ti,da830-spi" for SPI used similar to that on DA8xx SoC family
- reg: Offset and length of SPI controller register space
- num-cs: Number of chip selects
- num-cs: Number of chip selects. This includes internal as well as
	GPIO chip selects.
- ti,davinci-spi-intr-line: interrupt line used to connect the SPI
	IP to the interrupt controller within the SoC. Possible values
	are 0 and 1. Manual says one of the two possible interrupt
@@ -17,6 +18,12 @@ Required properties:
- interrupts: interrupt number mapped to CPU.
- clocks: spi clk phandle

Optional:
- cs-gpios: gpio chip selects
	For example to have 3 internal CS and 2 GPIO CS, user could define
	cs-gpios = <0>, <0>, <0>, <&gpio1 30 0>, <&gpio1 31 0>;
	where first three are internal CS and last two are GPIO CS.

Example of a NOR flash slave device (n25q032) connected to DaVinci
SPI controller device over the SPI bus.

+2 −3
Original line number Diff line number Diff line
@@ -660,10 +660,9 @@ static int adi_spi_setup(struct spi_device *spi)
		struct adi_spi3_chip *chip_info = spi->controller_data;

		chip = kzalloc(sizeof(*chip), GFP_KERNEL);
		if (!chip) {
			dev_err(&spi->dev, "can not allocate chip data\n");
		if (!chip)
			return -ENOMEM;
		}

		if (chip_info) {
			if (chip_info->control & ~ctl_reg) {
				dev_err(&spi->dev,
+8 −14
Original line number Diff line number Diff line
@@ -597,21 +597,15 @@ static int atmel_spi_next_xfer_dma_submit(struct spi_master *master,
		goto err_exit;

	/* Send both scatterlists */
	rxdesc = rxchan->device->device_prep_slave_sg(rxchan,
					&as->dma.sgrx,
					1,
	rxdesc = dmaengine_prep_slave_sg(rxchan, &as->dma.sgrx, 1,
					 DMA_FROM_DEVICE,
					DMA_PREP_INTERRUPT | DMA_CTRL_ACK,
					NULL);
					 DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
	if (!rxdesc)
		goto err_dma;

	txdesc = txchan->device->device_prep_slave_sg(txchan,
					&as->dma.sgtx,
					1,
	txdesc = dmaengine_prep_slave_sg(txchan, &as->dma.sgtx, 1,
					 DMA_TO_DEVICE,
					DMA_PREP_INTERRUPT | DMA_CTRL_ACK,
					NULL);
					 DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
	if (!txdesc)
		goto err_dma;

@@ -1018,7 +1012,7 @@ static int atmel_spi_setup(struct spi_device *spi)
	csr |= SPI_BF(DLYBCT, 0);

	/* chipselect must have been muxed as GPIO (e.g. in board setup) */
	npcs_pin = (unsigned int)spi->controller_data;
	npcs_pin = (unsigned long)spi->controller_data;

	if (gpio_is_valid(spi->cs_gpio))
		npcs_pin = spi->cs_gpio;
@@ -1253,7 +1247,7 @@ static int atmel_spi_transfer_one_message(struct spi_master *master,
static void atmel_spi_cleanup(struct spi_device *spi)
{
	struct atmel_spi_device	*asd = spi->controller_state;
	unsigned		gpio = (unsigned) spi->controller_data;
	unsigned		gpio = (unsigned long) spi->controller_data;

	if (!asd)
		return;
+1 −1
Original line number Diff line number Diff line
@@ -664,7 +664,7 @@ static int __maybe_unused cdns_spi_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(cdns_spi_dev_pm_ops, cdns_spi_suspend,
			 cdns_spi_resume);

static struct of_device_id cdns_spi_of_match[] = {
static const struct of_device_id cdns_spi_of_match[] = {
	{ .compatible = "xlnx,zynq-spi-r1p6" },
	{ .compatible = "cdns,spi-r1p6" },
	{ /* end of table */ }
+0 −2
Original line number Diff line number Diff line
@@ -184,8 +184,6 @@ static int spi_clps711x_probe(struct platform_device *pdev)
	}
	master->max_speed_hz = clk_get_rate(hw->spi_clk);

	platform_set_drvdata(pdev, master);

	hw->syscon = syscon_regmap_lookup_by_pdevname("syscon.3");
	if (IS_ERR(hw->syscon)) {
		ret = PTR_ERR(hw->syscon);
Loading