]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branches 'spi/topic/adi', 'spi/topic/atmel' and 'spi/topic...
authorMark Brown <broonie@linaro.org>
Mon, 2 Jun 2014 16:08:35 +0000 (17:08 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 2 Jun 2014 16:08:35 +0000 (17:08 +0100)
1  2  3  4 
drivers/spi/Kconfig
drivers/spi/Makefile
drivers/spi/spi-atmel.c

diff --combined drivers/spi/Kconfig
index 722312fe19be3635e6d2c27df8ad2cecab8349ed,a52e0edb7146337f9ac5f6eb634ca6c30b089636,60f2b41c7310529410939d1df6d0d1c3ee8b1222,32b1d0f1416c0708509d0654ef734e494a17a46b..213b5cbb9dccede248f7a02b08f1fb36c2980672
@@@@@ -91,8 -91,8 -91,8 -91,8 +91,8 @@@@@ config SPI_BFIN5X
        help
          This is the SPI controller master driver for Blackfin 5xx processor.
    
- --config SPI_BFIN_V3
- --    tristate "SPI controller v3 for Blackfin"
+ ++config SPI_ADI_V3
+ ++    tristate "SPI controller v3 for ADI"
        depends on BF60x
        help
          This is the SPI controller v3 master driver
@@@@@ -148,6 -148,6 -148,6 -148,13 +148,13 @@@@@ config SPI_BUTTERFL
          inexpensive battery powered microcontroller evaluation board.
          This same cable can be used to flash new firmware.
    
+++ config SPI_CADENCE
+++     tristate "Cadence SPI controller"
+++     depends on ARM
+++     help
+++       This selects the Cadence SPI controller master driver
+++       used by Xilinx Zynq.
+++ 
    config SPI_CLPS711X
        tristate "CLPS711X host SPI controller"
        depends on ARCH_CLPS711X || COMPILE_TEST
@@@@@ -505,7 -505,7 -505,7 -512,7 +512,7 @@@@@ config SPI_TEGRA20_SLIN
    
    config SPI_TOPCLIFF_PCH
        tristate "Intel EG20T PCH/LAPIS Semicon IOH(ML7213/ML7223/ML7831) SPI"
 ---    depends on PCI
 +++    depends on PCI && (X86_32 || COMPILE_TEST)
        help
          SPI driver for the Topcliff PCH (Platform Controller Hub) SPI bus
          used in some x86 embedded processors.
diff --combined drivers/spi/Makefile
index bd792669e56395525cfa3aba6c3542cb54fc6dad,71e65dfc0ea3611ad25a7e9fdb164c1f0528da96,bd792669e56395525cfa3aba6c3542cb54fc6dad,3e503d6d3df37f9f975793f984cc640929e5add2..929c9f5eac01d091cc2252e8c98795a5ab96a235
@@@@@ -18,10 -18,10 -18,10 -18,11 +18,11 @@@@@ obj-$(CONFIG_SPI_BCM2835)                += spi-bcm28
    obj-$(CONFIG_SPI_BCM63XX)           += spi-bcm63xx.o
    obj-$(CONFIG_SPI_BCM63XX_HSSPI)             += spi-bcm63xx-hsspi.o
    obj-$(CONFIG_SPI_BFIN5XX)           += spi-bfin5xx.o
- --obj-$(CONFIG_SPI_BFIN_V3)               += spi-bfin-v3.o
+ ++obj-$(CONFIG_SPI_ADI_V3)                += spi-adi-v3.o
    obj-$(CONFIG_SPI_BFIN_SPORT)                += spi-bfin-sport.o
    obj-$(CONFIG_SPI_BITBANG)           += spi-bitbang.o
    obj-$(CONFIG_SPI_BUTTERFLY)         += spi-butterfly.o
+++ obj-$(CONFIG_SPI_CADENCE)           += spi-cadence.o
    obj-$(CONFIG_SPI_CLPS711X)          += spi-clps711x.o
    obj-$(CONFIG_SPI_COLDFIRE_QSPI)             += spi-coldfire-qspi.o
    obj-$(CONFIG_SPI_DAVINCI)           += spi-davinci.o
diff --combined drivers/spi/spi-atmel.c
index 079e6b1b0cdb6fbc2e05532f3d8548653f4d4694,8005f986948173e55d5bc5a5387da80c8a5b9185,e6fe837d49fb0c3b8a2ebd0b93256b8d2fdbbfa8,8005f986948173e55d5bc5a5387da80c8a5b9185..92a6f0d93233983700a87f5bd07c0ffcceb8b5f9
@@@@@ -224,7 -224,7 -224,7 -224,7 +224,7 @@@@@ struct atmel_spi 
        struct platform_device  *pdev;
    
        struct spi_transfer     *current_transfer;
-- -    unsigned long           current_remaining_bytes;
++ +    int                     current_remaining_bytes;
        int                     done_status;
    
        struct completion       xfer_completion;
@@@@@ -874,8 -874,8 -874,9 -874,8 +874,9 @@@@@ atmel_spi_pump_pio_data(struct atmel_sp
                spi_readl(as, RDR);
        }
        if (xfer->bits_per_word > 8) {
-- -            as->current_remaining_bytes -= 2;
-- -            if (as->current_remaining_bytes < 0)
++ +            if (as->current_remaining_bytes > 2)
++ +                    as->current_remaining_bytes -= 2;
++ +            else
                        as->current_remaining_bytes = 0;
        } else {
                as->current_remaining_bytes--;
@@@@@ -1110,16 -1110,13 -1111,15 -1110,13 +1111,18 @@@@@ static int atmel_spi_one_transfer(struc
                                atmel_spi_next_xfer_pio(master, xfer);
                        } else {
                                as->current_remaining_bytes -= len;
++ +                            if (as->current_remaining_bytes < 0)
++ +                                    as->current_remaining_bytes = 0;
                        }
                } else {
                        atmel_spi_next_xfer_pio(master, xfer);
                }
    
 +++            /* interrupts are disabled, so free the lock for schedule */
 +++            atmel_spi_unlock(as);
                ret = wait_for_completion_timeout(&as->xfer_completion,
                                                        SPI_DMA_TIMEOUT);
 +++            atmel_spi_lock(as);
                if (WARN_ON(ret == 0)) {
                        dev_err(&spi->dev,
                                "spi trasfer timeout, err %d\n", ret);