aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/spi/spi-bcm2835.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c
index e7874a6171ec..370822e4669f 100644
--- a/drivers/spi/spi-bcm2835.c
+++ b/drivers/spi/spi-bcm2835.c
@@ -777,7 +777,7 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
777 goto out_master_put; 777 goto out_master_put;
778 } 778 }
779 779
780 bs->irq = irq_of_parse_and_map(pdev->dev.of_node, 0); 780 bs->irq = platform_get_irq(pdev, 0);
781 if (bs->irq <= 0) { 781 if (bs->irq <= 0) {
782 dev_err(&pdev->dev, "could not get IRQ: %d\n", bs->irq); 782 dev_err(&pdev->dev, "could not get IRQ: %d\n", bs->irq);
783 err = bs->irq ? bs->irq : -ENODEV; 783 err = bs->irq ? bs->irq : -ENODEV;
@@ -786,6 +786,12 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
786 786
787 clk_prepare_enable(bs->clk); 787 clk_prepare_enable(bs->clk);
788 788
789 bcm2835_dma_init(master, &pdev->dev);
790
791 /* initialise the hardware with the default polarities */
792 bcm2835_wr(bs, BCM2835_SPI_CS,
793 BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX);
794
789 err = devm_request_irq(&pdev->dev, bs->irq, bcm2835_spi_interrupt, 0, 795 err = devm_request_irq(&pdev->dev, bs->irq, bcm2835_spi_interrupt, 0,
790 dev_name(&pdev->dev), master); 796 dev_name(&pdev->dev), master);
791 if (err) { 797 if (err) {
@@ -793,12 +799,6 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
793 goto out_clk_disable; 799 goto out_clk_disable;
794 } 800 }
795 801
796 bcm2835_dma_init(master, &pdev->dev);
797
798 /* initialise the hardware with the default polarities */
799 bcm2835_wr(bs, BCM2835_SPI_CS,
800 BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX);
801
802 err = devm_spi_register_master(&pdev->dev, master); 802 err = devm_spi_register_master(&pdev->dev, master);
803 if (err) { 803 if (err) {
804 dev_err(&pdev->dev, "could not register SPI master: %d\n", err); 804 dev_err(&pdev->dev, "could not register SPI master: %d\n", err);