19 Mar, 2018

1 commit

  • [ Upstream commit 2d9bbd02c54094ceffa555143b0d68cd06504d63 ]

    sun6i_spi_probe() uses sun6i_spi_runtime_resume() to prepare/enable
    clocks, so sun6i_spi_remove() should use sun6i_spi_runtime_suspend() to
    disable/unprepare them if we're not suspended.
    Replacing pm_runtime_disable() by pm_runtime_force_suspend() will ensure
    that sun6i_spi_runtime_suspend() is called if needed.

    Found by Linux Driver Verification project (linuxtesting.org).

    Fixes: 3558fe900e8af (spi: sunxi: Add Allwinner A31 SPI controller driver)
    Signed-off-by: Tobias Jordan
    Acked-by: Maxime Ripard
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Tobias Jordan
     

20 Jul, 2017

1 commit

  • Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
    reset lines") started to transition the reset control request API calls
    to explicitly state whether the driver needs exclusive or shared reset
    control behavior. Convert all drivers requesting exclusive resets to the
    explicit API call so the temporary transition helpers can be removed.

    No functional changes.

    Cc: Mark Brown
    Cc: Maxime Ripard
    Cc: Chen-Yu Tsai
    Cc: linux-spi@vger.kernel.org
    Signed-off-by: Philipp Zabel
    Signed-off-by: Mark Brown

    Philipp Zabel
     

20 Mar, 2017

1 commit

  • The spi-sun6i driver have already got the ability to do large transfers.
    However, the max transfer size reported is still fifo depth - 1.

    Update the max transfer size reported to the max value possible.

    Reported-by: Martin Ayotte
    Signed-off-by: Icenowy Zheng
    Signed-off-by: Mark Brown

    Icenowy Zheng
     

07 Mar, 2017

1 commit

  • The spi-sun6i driver have the same problem that spi-sun4i used to have
    -- SPI transfers are limited to one FIFO depth.

    This commit fixes this problem in the same way it's fixed in spi-sun4i.
    See commit 196737912da5 ("spi: sun4i: Allow transfers larger than FIFO size")
    for more information.

    The sun6i SPI controllers features changeable interrupt trigger level, but I
    set it to 3/4 of fifo depth, as same as the the sun4i SPI controllers.

    Signed-off-by: Icenowy Zheng
    Acked-by: Maxime Ripard
    Signed-off-by: Mark Brown

    Icenowy Zheng
     

03 Nov, 2016

1 commit

  • H3 has two SPI controllers. The size of the buffer is 64 * 8.
    (8 bit transfer by 64 entry FIFO)
    A31 has four controllers. The size of the buffer is 128 * 8.
    (8 bit transfer by 128 entry FIFO)

    Register maps are sharable, so sun6i SPI driver is reusable with
    device configuration.

    Use the variable, 'fifo_depth' instead of fixed value to support both SPI
    controllers.

    Signed-off-by: Milo Kim
    Acked-by: Maxime Ripard
    Signed-off-by: Mark Brown

    Milo Kim
     

25 Jul, 2016

1 commit


28 Jun, 2016

1 commit

  • The speed limits are unset in the sun4i and sun6i SPI drivers.

    The maximum speed of SPI master is used when maximum speed of SPI slave
    is not specified. Also the __spi_validate function should check that
    transfer speeds do not exceed the master limits.

    The user manual for A10 and A31 specifies maximum
    speed of the SPI clock as 100MHz and minimum as 3kHz.

    Setting the SPI clock to out-of-spec values can lock up the SoC.

    Signed-off-by: Michal Suchanek
    --
    v2:
    new patch
    v3:
    fix constant style
    Signed-off-by: Mark Brown

    Michal Suchanek
     

14 Jun, 2016

2 commits

  • The trasfer timeout is fixed at 1000 ms. Reading a 4Mbyte flash over
    1MHz SPI bus takes way longer than that. Calculate the timeout from the
    actual time the transfer is supposed to take and multiply by 2 for good
    measure.

    Signed-off-by: Michal Suchanek
    Acked-by: Maxime Ripard
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Michal Suchanek
     
  • The sun4i spi hardware can trasfer at most 63 bytes of data without DMA
    support so report the limitation. Same for sun6i.

    Signed-off-by: Michal Suchanek
    Acked-by: Maxime Ripard
    Signed-off-by: Mark Brown

    Michal Suchanek
     

19 Nov, 2015

1 commit


20 Oct, 2014

1 commit


15 Apr, 2014

1 commit


04 Mar, 2014

1 commit


16 Feb, 2014

1 commit


05 Feb, 2014

1 commit