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

Commit 1504d226 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'spi/fix/bcm63xx', 'spi/fix/dspi',...

Merge remote-tracking branches 'spi/fix/bcm63xx', 'spi/fix/dspi', 'spi/fix/hspi', 'spi/fix/imx', 'spi/fix/msiof', 'spi/fix/pxa2xx', 'spi/fix/qspi', 'spi/topic/altera', 'spi/topic/ath79' and 'spi/topic/atmel' into spi-linus
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -220,8 +220,6 @@ static int altera_spi_probe(struct platform_device *pdev)


	/* setup the state for the bitbang driver */
	/* setup the state for the bitbang driver */
	hw->bitbang.master = master;
	hw->bitbang.master = master;
	if (!hw->bitbang.master)
		return err;
	hw->bitbang.chipselect = altera_spi_chipsel;
	hw->bitbang.chipselect = altera_spi_chipsel;
	hw->bitbang.txrx_bufs = altera_spi_txrx;
	hw->bitbang.txrx_bufs = altera_spi_txrx;


+4 −10
Original line number Original line Diff line number Diff line
@@ -243,21 +243,21 @@ static int ath79_spi_probe(struct platform_device *pdev)
		goto err_put_master;
		goto err_put_master;
	}
	}


	sp->base = ioremap(r->start, resource_size(r));
	sp->base = devm_ioremap(&pdev->dev, r->start, resource_size(r));
	if (!sp->base) {
	if (!sp->base) {
		ret = -ENXIO;
		ret = -ENXIO;
		goto err_put_master;
		goto err_put_master;
	}
	}


	sp->clk = clk_get(&pdev->dev, "ahb");
	sp->clk = devm_clk_get(&pdev->dev, "ahb");
	if (IS_ERR(sp->clk)) {
	if (IS_ERR(sp->clk)) {
		ret = PTR_ERR(sp->clk);
		ret = PTR_ERR(sp->clk);
		goto err_unmap;
		goto err_put_master;
	}
	}


	ret = clk_enable(sp->clk);
	ret = clk_enable(sp->clk);
	if (ret)
	if (ret)
		goto err_clk_put;
		goto err_put_master;


	rate = DIV_ROUND_UP(clk_get_rate(sp->clk), MHZ);
	rate = DIV_ROUND_UP(clk_get_rate(sp->clk), MHZ);
	if (!rate) {
	if (!rate) {
@@ -280,10 +280,6 @@ static int ath79_spi_probe(struct platform_device *pdev)
	ath79_spi_disable(sp);
	ath79_spi_disable(sp);
err_clk_disable:
err_clk_disable:
	clk_disable(sp->clk);
	clk_disable(sp->clk);
err_clk_put:
	clk_put(sp->clk);
err_unmap:
	iounmap(sp->base);
err_put_master:
err_put_master:
	spi_master_put(sp->bitbang.master);
	spi_master_put(sp->bitbang.master);


@@ -297,8 +293,6 @@ static int ath79_spi_remove(struct platform_device *pdev)
	spi_bitbang_stop(&sp->bitbang);
	spi_bitbang_stop(&sp->bitbang);
	ath79_spi_disable(sp);
	ath79_spi_disable(sp);
	clk_disable(sp->clk);
	clk_disable(sp->clk);
	clk_put(sp->clk);
	iounmap(sp->base);
	spi_master_put(sp->bitbang.master);
	spi_master_put(sp->bitbang.master);


	return 0;
	return 0;
+276 −502

File changed.

Preview size limit exceeded, changes collapsed.

+0 −2
Original line number Original line Diff line number Diff line
@@ -169,8 +169,6 @@ static int bcm63xx_txrx_bufs(struct spi_device *spi, struct spi_transfer *first,
			       transfer_list);
			       transfer_list);
	}
	}


	len -= prepend_len;

	init_completion(&bs->done);
	init_completion(&bs->done);


	/* Fill in the Message control register */
	/* Fill in the Message control register */
+2 −0
Original line number Original line Diff line number Diff line
@@ -320,8 +320,10 @@ static void dspi_chipselect(struct spi_device *spi, int value)
	switch (value) {
	switch (value) {
	case BITBANG_CS_ACTIVE:
	case BITBANG_CS_ACTIVE:
		pushr |= SPI_PUSHR_CONT;
		pushr |= SPI_PUSHR_CONT;
		break;
	case BITBANG_CS_INACTIVE:
	case BITBANG_CS_INACTIVE:
		pushr &= ~SPI_PUSHR_CONT;
		pushr &= ~SPI_PUSHR_CONT;
		break;
	}
	}


	writel(pushr, dspi->base + SPI_PUSHR);
	writel(pushr, dspi->base + SPI_PUSHR);
Loading