12 Feb, 2018

1 commit


04 Jan, 2017

1 commit


06 Feb, 2016

1 commit


30 Nov, 2015

1 commit


17 Mar, 2015

1 commit

  • Altera's Arria10 SoC interconnect requires a 32-bit write for APB
    peripherals. The current spi-dw driver uses 16-bit accesses in
    some locations. This patch converts all the 16-bit reads and
    writes to 32-bit reads and writes.

    Additional Documentation to Support this Change:
    The DW_apb_ssi databook states:
    "All registers in the DW_apb_ssi are addressed at 32-bit boundaries
    to remain consistent with the AHB bus. Where the physical size of
    any register is less than 32-bits wide, the upper unused bits of
    the 32-bit boundary are reserved. Writing to these bits has no
    effect; reading from these bits returns 0." [1]

    [1] Section 6.1 of dw_apb_ssi.pdf (version 3.22a)

    Request for test with platforms using the DesignWare SPI IP.

    Tested On:
    Altera CycloneV development kit
    Altera Arria10 development kit
    Compile tested for build errors on x86_64 (allyesconfigs)

    Signed-off-by: Thor Thayer
    Reviewed-and-tested-by: Andy Shevchenko
    Signed-off-by: Mark Brown

    Thor Thayer
     

10 Mar, 2015

7 commits


07 Mar, 2015

2 commits

  • The logic of DMA completion is broken now since test_and_clear_bit() never
    returns the other bit is set. It means condition are always false and we have
    spi_finalize_current_transfer() called per each DMA completion which is wrong.

    The patch fixes logic by clearing BUSY bit first and then check for the other
    one.

    Fixes: 30c8eb52cc4a (spi: dw-mid: split rx and tx callbacks when DMA)
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Andy Shevchenko
     
  • This patch removes a lot of duplicate code since SPI core provides a nice
    message handling.

    Signed-off-by: Andy Shevchenko
    Signed-off-by: Mark Brown

    Andy Shevchenko
     

06 Mar, 2015

1 commit

  • When DMA descriptor allocation fails we should not try to assign any fields in
    the bad descriptor. The patch adds the necessary checks for that.

    Fixes: 7063c0d942a1 (spi/dw_spi: add DMA support)
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Andy Shevchenko
     

27 Jan, 2015

1 commit

  • The clock information is being kept in the custom register on Intel MID
    platforms. Each controller has its own dedicated custom register for that.
    Thus, to get a proper frequency we have to read value from the specific offset
    to the register block. This patch makes this happen.

    Fixes: d58cf5ff6500 (spi: dw-pci: describe Intel MID controllers better)
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Mark Brown

    Andy Shevchenko
     

08 Jan, 2015

1 commit

  • There are more that one SPI controller on the Intel MID boards. This patch
    describes the status and IDs of them. From now on we also have to care about
    bus number that must be unique per host.

    According to the specification the SPI1 has 5 bits for chip selects and SPI2
    only 2 bits. The patch makes it depend to PCI ID.

    The first controller (SPI1) is DMA capable, meanwhile SPI2 can share same
    channels (via software switch) such functionality is not in the scope of this
    patch. Thus, attempt to init DMA for SPI2 will always fail for now.

    Signed-off-by: Andy Shevchenko
    Signed-off-by: Mark Brown

    Andy Shevchenko
     

06 Jan, 2015

1 commit

  • The FIFO size is 40 accordingly to the specifications, but this means 0x40,
    i.e. 64 bytes. This patch fixes the typo and enables FIFO size autodetection
    for Intel MID devices.

    Fixes: 7063c0d942a1 (spi/dw_spi: add DMA support)
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Andy Shevchenko
     

29 Oct, 2014

2 commits


03 Oct, 2014

3 commits


24 Sep, 2014

2 commits


14 Sep, 2014

4 commits


15 Nov, 2013

1 commit

  • Remove no longer needed DMA unmap flags:
    - DMA_COMPL_SKIP_SRC_UNMAP
    - DMA_COMPL_SKIP_DEST_UNMAP
    - DMA_COMPL_SRC_UNMAP_SINGLE
    - DMA_COMPL_DEST_UNMAP_SINGLE

    Cc: Vinod Koul
    Cc: Tomasz Figa
    Cc: Dave Jiang
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Kyungmin Park
    Acked-by: Jon Mason
    Acked-by: Mark Brown
    [djbw: clean up straggling skip unmap flags in ntb]
    Signed-off-by: Dan Williams

    Bartlomiej Zolnierkiewicz
     

21 Mar, 2012

1 commit

  • Add inline wrappers for device_prep_slave_sg() and device_prep_dma_cyclic()
    interfaces to hide new parameter from current users of affected interfaces.
    Convert current users to use new wrappers instead of direct calls.
    Suggested by Russell King [https://lkml.org/lkml/2012/2/3/269].

    Signed-off-by: Alexandre Bounine
    Signed-off-by: Vinod Koul

    Alexandre Bounine
     

22 Feb, 2012

1 commit


17 Nov, 2011

1 commit


31 Oct, 2011

1 commit


21 Sep, 2011

1 commit

  • The dw_{read,write}[lw] macros produce sparse warnings everytime they
    are used. The "read" ones cause:

    warning: cast removes address space of expression
    warning: incorrect type in argument 1 (different address spaces)
    expected void const volatile [noderef] *addr
    got unsigned int *

    And the "write" ones:

    warning: cast removes address space of expression
    warning: incorrect type in argument 2 (different address spaces)
    expected void volatile [noderef] *addr
    got unsigned int *

    Fix this by removing struct dw_spi_reg and converting all the register
    offsets to #defines. Then convert the macros into inlined functions so
    that proper type checking can occur.

    While here, also fix the three sparse warnings in spi-dw-mid.c due to
    the return value of ioremap_nocache being stored in a u32 * not a
    void __iomem *.

    With these changes the spi-dw* files all build with no sparse warnings.

    Signed-off-by: H Hartley Sweeten
    Acked-by: Feng Tang
    Signed-off-by: Grant Likely

    H Hartley Sweeten
     

06 Jun, 2011

1 commit

  • Sort the SPI makefile and enforce the naming convention spi_*.c for
    spi drivers.

    This change also rolls the contents of atmel_spi.h into the .c file
    since there is only one user of that particular include file.

    v2: - Use 'spi-' prefix instead of 'spi_' to match what seems to be
    be the predominant pattern for subsystem prefixes.
    - Clean up filenames in Kconfig and header comment blocks

    Signed-off-by: Grant Likely
    Acked-by: Wolfram Sang
    Acked-by: Linus Walleij

    Grant Likely