07 Mar, 2014

1 commit


05 Mar, 2014

3 commits


03 Mar, 2014

1 commit

  • The 'ath79_spi_setup_cs' function initializes the chip
    select line of a given SPI device in order to make sure
    that the device is inactive.

    If the SPI_CS_HIGH bit is set for a given device, it
    means that the CS line of that device is active HIGH
    so it must be set to LOW initially. In case of GPIO
    CS lines, the 'ath79_spi_setup_cs' function does the
    opposite of that due to the wrong GPIO flags.

    Fix the code to use the correct GPIO flags.

    Reported-by: Ronald Wahl
    Signed-off-by: Gabor Juhos
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Gabor Juhos
     

28 Feb, 2014

1 commit

  • Currently, at module removal, one gets the following warnings:
    ------------[ cut here ]------------
    WARNING: at drivers/clk/clk.c:780 clk_disable+0x18/0x24()
    Modules linked in: spi_imx(-) [last unloaded: ev76c560]
    CPU: 1 PID: 16337 Comm: rmmod Tainted: G W 3.10.17-80548-g90191eb-dirty #33
    [] (unwind_backtrace+0x0/0xf8) from [] (show_stack+0x10/0x14)
    [] (show_stack+0x10/0x14) from [] (warn_slowpath_common+0x4c/0x68)
    [] (warn_slowpath_common+0x4c/0x68) from [] (warn_slowpath_null+0x1c/0x24)
    [] (warn_slowpath_null+0x1c/0x24) from [] (clk_disable+0x18/0x24)
    [] (clk_disable+0x18/0x24) from [] (spi_imx_remove+0x54/0x9c [spi_imx])
    [] (spi_imx_remove+0x54/0x9c [spi_imx]) from [] (platform_drv_remove+0x18/0x1c)
    [] (platform_drv_remove+0x18/0x1c) from [] (__device_release_driver+0x70/0xcc)
    [] (__device_release_driver+0x70/0xcc) from [] (driver_detach+0xcc/0xd0)
    [] (driver_detach+0xcc/0xd0) from [] (bus_remove_driver+0x7c/0xc0)
    [] (bus_remove_driver+0x7c/0xc0) from [] (SyS_delete_module+0x144/0x1f8)
    [] (SyS_delete_module+0x144/0x1f8) from [] (ret_fast_syscall+0x0/0x30)
    ---[ end trace 1f5df9ad54996300 ]---
    ------------[ cut here ]------------
    WARNING: at drivers/clk/clk.c:780 clk_disable+0x18/0x24()
    Modules linked in: spi_imx(-) [last unloaded: ev76c560]
    CPU: 1 PID: 16337 Comm: rmmod Tainted: G W 3.10.17-80548-g90191eb-dirty #33
    [] (unwind_backtrace+0x0/0xf8) from [] (show_stack+0x10/0x14)
    [] (show_stack+0x10/0x14) from [] (warn_slowpath_common+0x4c/0x68)
    [] (warn_slowpath_common+0x4c/0x68) from [] (warn_slowpath_null+0x1c/0x24)
    [] (warn_slowpath_null+0x1c/0x24) from [] (clk_disable+0x18/0x24)
    [] (clk_disable+0x18/0x24) from [] (spi_imx_remove+0x70/0x9c [spi_imx])
    [] (spi_imx_remove+0x70/0x9c [spi_imx]) from [] (platform_drv_remove+0x18/0x1c)
    [] (platform_drv_remove+0x18/0x1c) from [] (__device_release_driver+0x70/0xcc)
    [] (__device_release_driver+0x70/0xcc) from [] (driver_detach+0xcc/0xd0)
    [] (driver_detach+0xcc/0xd0) from [] (bus_remove_driver+0x7c/0xc0)
    [] (bus_remove_driver+0x7c/0xc0) from [] (SyS_delete_module+0x144/0x1f8)
    [] (SyS_delete_module+0x144/0x1f8) from [] (ret_fast_syscall+0x0/0x30)
    ---[ end trace 1f5df9ad54996301 ]---

    Since commit 9e556dcc55774c9a1032f32baa0e5cfafede8b70, "spi: spi-imx: only
    enable the clocks when we start to transfer a message", clocks are always
    disabled except when transmitting messages. There is thus no need to
    disable them at module removal.

    Fixes: 9e556dcc55774 (spi: spi-imx: only enable the clocks when we start to transfer a message)
    Signed-off-by: Philippe De Muyter
    Acked-by: Huang Shijie
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Philippe De Muyter
     

27 Feb, 2014

1 commit

  • If during registering SPI master due to SPI device probing a SPI transfer
    is issued the DMA buffers are not allocated yet.

    This fixes the following oops:
    pch_spi 0000:02:0c.1: enabling device (0000 -> 0002)
    pch_spi 0000:02:0c.1: master is unqueued, this is deprecated
    BUG: unable to handle kernel NULL pointer dereference at (null)
    IP: [] pch_spi_handle_dma+0x15c/0x6f4
    [...]

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

    Alexander Stein
     

19 Feb, 2014

1 commit

  • bus_num might be asigned dynamically to e.g. 32766. In this case the
    calculated DMA channel based on SPI bus number is bogus. Use SPI channel
    number instead for calculation.

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

    Alexander Stein
     

11 Feb, 2014

2 commits


05 Feb, 2014

2 commits


29 Jan, 2014

2 commits

  • <<
    Switch mpc512x to the common clock framework and adapt mpc512x
    drivers to use the new clock driver. Old PPC_CLOCK code is
    removed entirely since there are no users any more.
    >>

    Benjamin Herrenschmidt
     
  • This reverts commit e120cc0dcf2880a4c5c0a6cb27b655600a1cfa1d.

    It causes a NULL pointer dereference with drivers using the generic
    spi_transfer_one_message(), which always calls
    spi_finalize_current_message(), which zeroes master->cur_msg.

    Drivers implementing transfer_one_message() theirselves must always call
    spi_finalize_current_message(), even if the transfer failed:

    * @transfer_one_message: the subsystem calls the driver to transfer a single
    * message while queuing transfers that arrive in the meantime. When the
    * driver is finished with this message, it must call
    * spi_finalize_current_message() so the subsystem can issue the next
    * transfer

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Mark Brown

    Geert Uytterhoeven
     

26 Jan, 2014

1 commit

  • Pull spi updates from Mark Brown:
    "A respun version of the merges for the pull request previously sent
    with a few additional fixes. The last two merges were fixed up by
    hand since the branches have moved on and currently have the prior
    merge in them.

    Quite a busy release for the SPI subsystem, mostly in cleanups big and
    small scattered through the stack rather than anything else:

    - New driver for the Broadcom BC63xx HSSPI controller
    - Fix duplicate device registration for ACPI
    - Conversion of s3c64xx to DMAEngine (this pulls in platform and DMA
    changes upon which the transiton depends)
    - Some small optimisations to reduce the amount of time we hold locks
    in the datapath, eliminate some redundant checks and the size of a
    spi_transfer
    - Lots of fixes, cleanups and general enhancements to drivers,
    especially the rspi and Atmel drivers"

    * tag 'spi-v3.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (112 commits)
    spi: core: Fix transfer failure when master->transfer_one returns positive value
    spi: Correct set_cs() documentation
    spi: Clarify transfer_one() w.r.t. spi_finalize_current_transfer()
    spi: Spelling s/finised/finished/
    spi: sc18is602: Convert to use bits_per_word_mask
    spi: Remove duplicate code to set default bits_per_word setting
    spi/pxa2xx: fix compilation warning when !CONFIG_PM_SLEEP
    spi: clps711x: Add MODULE_ALIAS to support module auto-loading
    spi: rspi: Add missing clk_disable() calls in error and cleanup paths
    spi: rspi: Spelling s/transmition/transmission/
    spi: rspi: Add support for specifying CPHA/CPOL
    spi/pxa2xx: initialize DMA channels to -1 to prevent inadvertent match
    spi: rspi: Add more QSPI register documentation
    spi: rspi: Add more RSPI register documentation
    spi: rspi: Remove dependency on DMAE for SHMOBILE
    spi/s3c64xx: Correct indentation
    spi: sh: Use spi_sh_clear_bit() instead of open-coded
    spi: bitbang: Grammar s/make to make/to make/
    spi: sh-hspi: Spelling s/recive/receive/
    spi: core: Improve tx/rx_nbits check comments
    ...

    Linus Torvalds
     

25 Jan, 2014

1 commit

  • Pull ACPI and power management updates from Rafael Wysocki:
    "As far as the number of commits goes, the top spot belongs to ACPI
    this time with cpufreq in the second position and a handful of PM
    core, PNP and cpuidle updates. They are fixes and cleanups mostly, as
    usual, with a couple of new features in the mix.

    The most visible change is probably that we will create struct
    acpi_device objects (visible in sysfs) for all devices represented in
    the ACPI tables regardless of their status and there will be a new
    sysfs attribute under those objects allowing user space to check that
    status via _STA.

    Consequently, ACPI device eject or generally hot-removal will not
    delete those objects, unless the table containing the corresponding
    namespace nodes is unloaded, which is extremely rare. Also ACPI
    container hotplug will be handled quite a bit differently and cpufreq
    will support CPU boost ("turbo") generically and not only in the
    acpi-cpufreq driver.

    Specifics:

    - ACPI core changes to make it create a struct acpi_device object for
    every device represented in the ACPI tables during all namespace
    scans regardless of the current status of that device. In
    accordance with this, ACPI hotplug operations will not delete those
    objects, unless the underlying ACPI tables go away.

    - On top of the above, new sysfs attribute for ACPI device objects
    allowing user space to check device status by triggering the
    execution of _STA for its ACPI object. From Srinivas Pandruvada.

    - ACPI core hotplug changes reducing code duplication, integrating
    the PCI root hotplug with the core and reworking container hotplug.

    - ACPI core simplifications making it use ACPI_COMPANION() in the
    code "glueing" ACPI device objects to "physical" devices.

    - ACPICA update to upstream version 20131218. This adds support for
    the DBG2 and PCCT tables to ACPICA, fixes some bugs and improves
    debug facilities. From Bob Moore, Lv Zheng and Betty Dall.

    - Init code change to carry out the early ACPI initialization
    earlier. That should allow us to use ACPI during the timekeeping
    initialization and possibly to simplify the EFI initialization too.
    From Chun-Yi Lee.

    - Clenups of the inclusions of ACPI headers in many places all over
    from Lv Zheng and Rashika Kheria (work in progress).

    - New helper for ACPI _DSM execution and rework of the code in
    drivers that uses _DSM to execute it via the new helper. From
    Jiang Liu.

    - New Win8 OSI blacklist entries from Takashi Iwai.

    - Assorted ACPI fixes and cleanups from Al Stone, Emil Goode, Hanjun
    Guo, Lan Tianyu, Masanari Iida, Oliver Neukum, Prarit Bhargava,
    Rashika Kheria, Tang Chen, Zhang Rui.

    - intel_pstate driver updates, including proper Baytrail support,
    from Dirk Brandewie and intel_pstate documentation from Ramkumar
    Ramachandra.

    - Generic CPU boost ("turbo") support for cpufreq from Lukasz
    Majewski.

    - powernow-k6 cpufreq driver fixes from Mikulas Patocka.

    - cpufreq core fixes and cleanups from Viresh Kumar, Jane Li, Mark
    Brown.

    - Assorted cpufreq drivers fixes and cleanups from Anson Huang, John
    Tobias, Paul Bolle, Paul Walmsley, Sachin Kamat, Shawn Guo, Viresh
    Kumar.

    - cpuidle cleanups from Bartlomiej Zolnierkiewicz.

    - Support for hibernation APM events from Bin Shi.

    - Hibernation fix to avoid bringing up nonboot CPUs with ACPI EC
    disabled during thaw transitions from Bjørn Mork.

    - PM core fixes and cleanups from Ben Dooks, Leonardo Potenza, Ulf
    Hansson.

    - PNP subsystem fixes and cleanups from Dmitry Torokhov, Levente
    Kurusa, Rashika Kheria.

    - New tool for profiling system suspend from Todd E Brandt and a
    cpupower tool cleanup from One Thousand Gnomes"

    * tag 'pm+acpi-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (153 commits)
    thermal: exynos: boost: Automatic enable/disable of BOOST feature (at Exynos4412)
    cpufreq: exynos4x12: Change L0 driver data to CPUFREQ_BOOST_FREQ
    Documentation: cpufreq / boost: Update BOOST documentation
    cpufreq: exynos: Extend Exynos cpufreq driver to support boost
    cpufreq / boost: Kconfig: Support for software-managed BOOST
    acpi-cpufreq: Adjust the code to use the common boost attribute
    cpufreq: Add boost frequency support in core
    intel_pstate: Add trace point to report internal state.
    cpufreq: introduce cpufreq_generic_get() routine
    ARM: SA1100: Create dummy clk_get_rate() to avoid build failures
    cpufreq: stats: create sysfs entries when cpufreq_stats is a module
    cpufreq: stats: free table and remove sysfs entry in a single routine
    cpufreq: stats: remove hotplug notifiers
    cpufreq: stats: handle cpufreq_unregister_driver() and suspend/resume properly
    cpufreq: speedstep: remove unused speedstep_get_state
    platform: introduce OF style 'modalias' support for platform bus
    PM / tools: new tool for suspend/resume performance optimization
    ACPI: fix module autoloading for ACPI enumerated devices
    ACPI: add module autoloading support for ACPI enumerated devices
    ACPI: fix create_modalias() return value handling
    ...

    Linus Torvalds
     

24 Jan, 2014

1 commit

  • Pull ARM SoC cleanups from Olof Johansson:
    "This is the branch where we usually queue up cleanup efforts, moving
    drivers out of the architecture directory, header file restructuring,
    etc. Sometimes they tangle with new development so it's hard to keep
    it strictly to cleanups.

    Some of the things included in this branch are:

    * Atmel SAMA5 conversion to common clock
    * Reset framework conversion for tegra platforms
    - Some of this depends on tegra clock driver reworks that are shared
    with Mike Turquette's clk tree.
    * Tegra DMA refactoring, which are shared branches with the DMA tree.
    * Removal of some header files on exynos to prepare for
    multiplatform"

    * tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (169 commits)
    ARM: mvebu: move Armada 370/XP specific definitions to armada-370-xp.h
    ARM: mvebu: remove prototypes of non-existing functions from common.h
    ARM: mvebu: move ARMADA_XP_MAX_CPUS to armada-370-xp.h
    serial: sh-sci: Rework baud rate calculation
    serial: sh-sci: Compute overrun_bit without using baud rate algo
    serial: sh-sci: Remove unused GPIO request code
    serial: sh-sci: Move overrun_bit and error_mask fields out of pdata
    serial: sh-sci: Support resources passed through platform resources
    serial: sh-sci: Don't check IRQ in verify port operation
    serial: sh-sci: Set the UPF_FIXED_PORT flag
    serial: sh-sci: Remove duplicate interrupt check in verify port op
    serial: sh-sci: Simplify baud rate calculation algorithms
    serial: sh-sci: Remove baud rate calculation algorithm 5
    serial: sh-sci: Sort headers alphabetically
    ARM: EXYNOS: Kill exynos_pm_late_initcall()
    ARM: EXYNOS: Consolidate selection of PM_GENERIC_DOMAINS for Exynos4
    ARM: at91: switch Calao QIL-A9260 board to DT
    clk: at91: fix pmc_clk_ids data type attriubte
    PM / devfreq: use inclusion instead of
    ARM: EXYNOS: remove for exynos
    ...

    Linus Torvalds
     

23 Jan, 2014

8 commits


22 Jan, 2014

2 commits


17 Jan, 2014

4 commits

  • Since commit 543bb25 "spi: add ability to validate xfer->bits_per_word in SPI
    core", the driver can set bits_per_word_mask for the master then the SPI core
    will reject transfers that attempt to use an unsupported bits_per_word value.
    So we can remove the bits_per_word checking in sc18is602_check_transfer() and
    let SPI core handle the checking.

    Signed-off-by: Axel Lin
    Acked-by: Guenter Roeck
    Signed-off-by: Mark Brown

    Axel Lin
     
  • The implementation in spi_setup() already set spi->bits_per_word = 8 when
    spi->bits_per_word is 0 before calling spi->master->setup.
    So we don't need to do it again in setup() callback.

    Signed-off-by: Axel Lin
    Acked-by: Marek Vasut
    Acked-by: Barry Song
    Acked-by: Guenter Roeck
    Signed-off-by: Mark Brown

    Axel Lin
     
  • …m/linux/kernel/git/broonie/spi into spi-bpw

    Mark Brown
     
  • ACPI enumerated devices has ACPI style _HID and _CID strings,
    all of these strings can be used for both driver loading and matching.

    Currently, in Platform, I2C and SPI bus, the ACPI style driver matching
    is supported by invoking acpi_driver_match_device() in bus .match() callback.
    But, the module autoloading is still broken.

    For example, there is any ACPI device with _HID "INTABCD" that is
    enumerated to platform bus, and we have a driver that can probe it.

    The driver exports its module_alias as "acpi:INTABCD" use the following code
    static const struct acpi_device_id xxx_acpi_match[] = {
    { "INTABCD", 0 },
    { }
    };
    MODULE_DEVICE_TABLE(acpi, xxx_acpi_match);

    But, unfortunately, the device' modalias is shown as "platform:INTABCD:00",
    please refer to modalias_show() and platform_uevent() in
    drivers/base/platform.c.
    This results in that the driver will not be loaded automatically when the
    device node is created, because their modalias do not match.

    This also applies to I2C and SPI bus.

    With this patch, the device' modalias will be shown as "acpi:INTABCD" as well.

    Signed-off-by: Zhang Rui
    Acked-by: Mark Brown
    Acked-by: Wolfram Sang
    Signed-off-by: Rafael J. Wysocki

    Zhang Rui
     

16 Jan, 2014

1 commit

  • CONFIG_PM will be set if either or both CONFIG_PM_SLEEP and
    CONFIG_PM_RUNTIME is set. Compiling the driver with !CONFIG_PM_SLEEP causes
    following compilation warning:

    drivers/spi/spi-pxa2xx.c:1270:12: warning: ‘pxa2xx_spi_suspend’ defined but not used [-Wunused-function]

    Fix this by using CONFIG_PM_SLEEP instead.

    Signed-off-by: Mika Westerberg
    Signed-off-by: Mark Brown

    Mika Westerberg
     

14 Jan, 2014

5 commits


13 Jan, 2014

3 commits