24 Aug, 2017

1 commit


06 Apr, 2017

1 commit

  • The num-cs property is a required property according to the binding
    documentation. However, if it is not present, the driver currently
    simply uses random junk from the stack for the num-cs since the variable
    whose pointer is passed to of_property_read_u32() is not initialized.

    Signed-off-by: Rabin Vincent
    Signed-off-by: Mark Brown

    Rabin Vincent
     

17 Feb, 2016

1 commit


23 Nov, 2015

1 commit


12 Apr, 2015

1 commit


07 Mar, 2015

4 commits

  • Commit fd316941c ("spi/pl022: disable port when unused") introduced a race,
    which leads to possible driver lock up (easily reproducible on SMP).

    The problem happens in giveback() function where the completion of the transfer
    is signalled to SPI subsystem and then the HW SPI controller is disabled. Another
    transfer might be setup in between, which brings driver in locked-up state.

    Exact event sequence on SMP:

    core0 core1

    => pump_transfers()
    /* message->state == STATE_DONE */
    => giveback()
    => spi_finalize_current_message()

    => pl022_unprepare_transfer_hardware()
    => pl022_transfer_one_message
    => flush()
    => do_interrupt_dma_transfer()
    => set_up_next_transfer()
    /* Enable SSP, turn on interrupts */
    writew((readw(SSP_CR1(pl022->virtbase)) |
    SSP_CR1_MASK_SSE), SSP_CR1(pl022->virtbase));

    ...

    => pl022_interrupt_handler()
    => readwriter()

    /* disable the SPI/SSP operation */
    => writew((readw(SSP_CR1(pl022->virtbase)) &
    (~SSP_CR1_MASK_SSE)), SSP_CR1(pl022->virtbase));

    Lockup! SPI controller is disabled and the data will never be received. Whole
    SPI subsystem is waiting for transfer ACK and blocked.

    So, only signal transfer completion after disabling the controller.

    Fixes: fd316941c (spi/pl022: disable port when unused)
    Signed-off-by: Alexander Sverdlin
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Alexander Sverdlin
     
  • "flag" variable does nothing, remove it.

    Signed-off-by: Alexander Sverdlin
    Signed-off-by: Mark Brown

    Alexander Sverdlin
     
  • PL022 Programmers model explicitely states "do not modify undefined register
    bits". Correct the "all enable" interrupt mask so that it only enables defined
    ones.

    Signed-off-by: Alexander Sverdlin
    Signed-off-by: Mark Brown

    Alexander Sverdlin
     
  • According to PL022 specification, TNF bit states for "Transmit FIFO Not full".
    So the logic here is inverted. But "Receive Overrun Interrupt", which is handled
    here, is only triggered on Rx errors. So instead of fixing the if statement,
    remove the whole message.

    Signed-off-by: Alexander Sverdlin
    Signed-off-by: Mark Brown

    Alexander Sverdlin
     

04 Dec, 2014

1 commit

  • The SET_PM_RUNTIME_PM_OPS() and SET_RUNTIME_PM_OPS() macros are
    identical except that one of them is not empty for CONFIG_PM set,
    while the other one is not empty for CONFIG_PM_RUNTIME set,
    respectively.

    However, after commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if
    PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so one
    of these macros is now redundant.

    For this reason, replace SET_PM_RUNTIME_PM_OPS() with
    SET_RUNTIME_PM_OPS() everywhere and redefine the SET_PM_RUNTIME_PM_OPS
    symbol as SET_RUNTIME_PM_OPS in case new code is starting to use the
    macro being removed here.

    Reviewed-by: Ulf Hansson
    Acked-by: Kevin Hilman
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

13 Oct, 2014

1 commit

  • When mapped RX DMA entries are unmapped in an error condition when DMA
    is firstly configured in the driver, the number of TX DMA entries was
    passed in, which is incorrect

    Signed-off-by: Ray Jui
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Ray Jui
     

03 Oct, 2014

1 commit


24 Sep, 2014

1 commit

  • Add support for a extended PL022 which has an extra register for controlling up
    to five chip select signals. This controller is found on the AXM5516 SoC.
    Unfortunately the PrimeCell identification registers are identical to a
    standard ARM PL022. To work around this, the peripheral ID must be overridden
    in the device tree using the "arm,primecell-periphid" property with the value
    0x000b6022.

    Signed-off-by: Anders Berg
    Acked-by: Linus Walleij
    Acked-by: Russell King
    Signed-off-by: Mark Brown

    Anders Berg
     

19 Sep, 2014

1 commit


09 Sep, 2014

1 commit


02 Aug, 2014

1 commit

  • When building on 64 bit architectures the use of bitwise negation generates
    constants larger than 32 bits which won't fit in u32s used to represent
    32 bit register values on the device. Explicitly cast to let the compiler
    know that the higher bits are not significant and can be discarded.

    Signed-off-by: Mark Brown

    Mark Brown
     

30 Apr, 2014

1 commit


30 Mar, 2014

1 commit


06 Mar, 2014

2 commits

  • Previously only the resources controlled by the driver were put into
    low power state at system suspend. Both the amba bus and a potential
    power domain were ignored.

    Moreover, while putting the device into low power state we first
    brought it back to full power, but for no particular reason.

    To handle both issues above, use pm_runtime_force_suspend|resume() from
    the system suspend|resume callbacks.

    Signed-off-by: Ulf Hansson
    Signed-off-by: Mark Brown

    Ulf Hansson
     
  • Convert to the SET_PM_RUNTIME_PM macro while defining the runtime PM
    callbacks. This means the callbacks becomes available for both
    CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME, which is needed to handle the
    combinations of these scenarios.

    Signed-off-by: Ulf Hansson
    Signed-off-by: Mark Brown

    Ulf Hansson
     

23 Feb, 2014

1 commit


05 Feb, 2014

2 commits


03 Feb, 2014

1 commit

  • When the driver was converted to clk_prepare() the suspend path didn't
    have any changes made so the clock remains prepared throughout the runtime
    of the driver. Unprepare it when suspended so that any savings that can be
    made as a result are made.

    Signed-off-by: Mark Brown
    Acked-by: Linus Walleij

    Mark Brown
     

25 Oct, 2013

1 commit


15 Oct, 2013

1 commit


26 Sep, 2013

1 commit


17 Sep, 2013

2 commits


01 Sep, 2013

2 commits


29 Aug, 2013

1 commit


22 Aug, 2013

1 commit

  • When CONFIG_ARM_LPAE=y the following build warning is generated:

    drivers/spi/spi-pl022.c:2178:9: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'resource_size_t' [-Wformat]

    According to Documentation/printk-formats.txt '%pa' can be used to properly
    print 'resource_size_t'.

    Reported-by: Kevin Hilman
    Signed-off-by: Fabio Estevam
    Signed-off-by: Mark Brown

    Fabio Estevam
     

30 Jul, 2013

1 commit


04 Jul, 2013

1 commit

  • …/linusw/linux-pinctrl

    Pull pin control changes from Linus Walleij:

    - A large slew of improvements of the Genric pin configuration support,
    and deployment in four different platforms: Rockchip, Super-H PFC,
    ABx500 and TZ1090. Support BIAS_BUS_HOLD, get device tree parsing
    and debugfs support into shape.

    - We also have device tree support with generic naming conventions for
    the generic pin configuration.

    - Delete the unused and confusing direct pinconf API. Now state
    transitions is *the* way to control pins and multiplexing.

    - New drivers for Rockchip, TZ1090, and TZ1090 PDC.

    - Two pin control states related to power management are now handled in
    the device core: "sleep" and "idle", removing a lot of boilerplate
    code in drivers. We do not yet know if this is the final word for
    pin PM, but it already make things a lot easier to handle.

    - Handle sparse GPIO ranges passing a list of disparate pins, and
    utilize these in the new BayTrail (x86 Atom SoC) driver.

    - Make the sunxi (AllWinner) driver handle external interrupts.

    - Make it possible for pinctrl-single to handle the case where several
    pins are managed by a single register, and augment it to handle sleep
    modes.

    - Cleanups and improvements for the abx500 drivers.

    - Move Sirf pin control drivers to their own directory, support
    save/restore of context and add support for the SiRFatlas6 SoC.

    - PMU muxing for the Dove pinctrl driver.

    - Finalization and support for VF610 in the i.MX6 pinctrl driver.

    - Smoothen out various Exynos rough edges.

    - Generic cleanups of various kinds.

    * tag 'pinctrl-for-v3.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (82 commits)
    pinctrl: vt8500: wmt: remove redundant dev_err call in wmt_pinctrl_probe()
    pinctrl: remove bindings for pinconf options needing more thought
    pinctrl: remove slew-rate parameter from tz1090
    pinctrl: set unit for debounce time pinconfig to usec
    pinctrl: more clarifications for generic pull configs
    pinctrl: rip out the direct pinconf API
    pinctrl-tz1090-pdc: add TZ1090 PDC pinctrl driver
    pinctrl-tz1090: add TZ1090 pinctrl driver
    pinctrl: samsung: Staticize drvdata_list
    pinctrl: rockchip: Add missing irq_gc_unlock() call before return error
    pinctrl: abx500: rework error path
    pinctrl: abx500: suppress hardcoded value
    pinctrl: abx500: factorize code
    pinctrl: abx500: fix abx500_gpio_get()
    pinctrl: abx500: fix abx500_pin_config_set()
    pinctrl: abx500: Add device tree support
    sh-pfc: Guard DT parsing with #ifdef CONFIG_OF
    pinctrl: add Intel BayTrail GPIO/pinctrl support
    pinctrl: fix pinconf_ops::pin_config_dbg_parse_modify kerneldoc
    pinctrl: Staticize local symbols
    ...

    Conflicts:
    drivers/net/ethernet/ti/davinci_mdio.c
    drivers/pinctrl/Makefile

    Linus Torvalds
     

18 Jun, 2013

1 commit

  • Removes the warnings:

    drivers/spi/spi-pl022.c: In function 'pl022_suspend_resources':
    drivers/spi/spi-pl022.c:2322:24: warning: unused variable 'pins_state' [-Wunused-variable]
    drivers/spi/spi-pl022.c:2321:6: warning: unused variable 'ret' [-Wunused-variable]
    drivers/spi/spi-pl022.c: In function 'pl022_resume_resources':
    drivers/spi/spi-pl022.c:2334:6: warning: unused variable 'ret' [-Wunused-variable]

    introduced in:

    f1c9cf0 spi: pl022: use pinctrl PM helpers

    Signed-off-by: Fabio Baltieri
    Acked-by: Mark Brown
    Signed-off-by: Linus Walleij

    Fabio Baltieri
     

17 Jun, 2013

1 commit

  • In the past we controlled the selection of DMA for a certain
    host by a boolean switch in the platform data. Currently
    there is no way to enable DMA on a PL022 probed from the
    device tree. Let's default to trying to obtain DMA channels
    in the DT case, and then we can always fail (and thus fall
    back to PIO mode).

    Signed-off-by: Linus Walleij

    Linus Walleij
     

16 Jun, 2013

1 commit

  • This utilize the new pinctrl core PM helpers to transition
    the driver to "sleep" and "idle" states, cutting away some
    boilerplate code.

    Cc: Hebbar Gururaja
    Cc: Dmitry Torokhov
    Cc: Kevin Hilman
    Cc: Greg Kroah-Hartman
    Cc: Stephen Warren
    Cc: Wolfram Sang
    Acked-by: Mark Brown
    Signed-off-by: Linus Walleij

    Linus Walleij
     

13 Mar, 2013

1 commit

  • With the new OF DMA binding, it is possible to completely avoid the
    need for platform_data for configuring a DMA channel. In cases where the
    platform has already been converted, calling dma_request_slave_channel
    should get all the necessary information from the device tree.

    Like the patch that converts the dw_dma controller, this is completely
    untested and is looking for someone to try it out.

    Signed-off-by: Arnd Bergmann
    Acked-by: Grant Likely
    Acked-by: Mark Brown
    Acked-by: Linus Walleij
    Cc: spi-devel-general@lists.sourceforge.net
    Cc: Viresh Kumar
    Cc: Andy Shevchenko
    Cc: Vinod Koul
    Cc: devicetree-discuss@lists.ozlabs.org
    Cc: linux-arm-kernel@lists.infradead.org

    Arnd Bergmann
     

08 Dec, 2012

1 commit

  • CONFIG_HOTPLUG is going away as an option. As result the __dev*
    markings will be going away.

    Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
    and __devexit.

    Bill Pemberton has done most of the legwork on this series. I've used
    his script to purge the attributes from the drivers/gpio tree.

    Reported-by: Bill Pemberton
    Signed-off-by: Grant Likely

    Grant Likely