19 Dec, 2014

1 commit

  • Pull more ACPI and power management updates from Rafael Wysocki:
    "These are regression fixes (leds-gpio, ACPI backlight driver,
    operating performance points library, ACPI device enumeration
    messages, cpupower tool), other bug fixes (ACPI EC driver, ACPI device
    PM), some cleanups in the operating performance points (OPP)
    framework, continuation of CONFIG_PM_RUNTIME elimination, a couple of
    minor intel_pstate driver changes, a new MAINTAINERS entry for it and
    an ACPI fan driver change needed for better support of thermal
    management in user space.

    Specifics:

    - Fix a regression in leds-gpio introduced by a recent commit that
    inadvertently changed the name of one of the properties used by the
    driver (Fabio Estevam).

    - Fix a regression in the ACPI backlight driver introduced by a
    recent fix that missed one special case that had to be taken into
    account (Aaron Lu).

    - Drop the level of some new kernel messages from the ACPI core
    introduced by a recent commit to KERN_DEBUG which they should have
    used from the start and drop some other unuseful KERN_ERR messages
    printed by ACPI (Rafael J Wysocki).

    - Revert an incorrect commit modifying the cpupower tool (Prarit
    Bhargava).

    - Fix two regressions introduced by recent commits in the OPP library
    and clean up some existing minor issues in that code (Viresh
    Kumar).

    - Continue to replace CONFIG_PM_RUNTIME with CONFIG_PM throughout the
    tree (or drop it where that can be done) in order to make it
    possible to eliminate CONFIG_PM_RUNTIME (Rafael J Wysocki, Ulf
    Hansson, Ludovic Desroches).

    There will be one more "CONFIG_PM_RUNTIME removal" batch after this
    one, because some new uses of it have been introduced during the
    current merge window, but that should be sufficient to finally get
    rid of it.

    - Make the ACPI EC driver more robust against race conditions related
    to GPE handler installation failures (Lv Zheng).

    - Prevent the ACPI device PM core code from attempting to disable
    GPEs that it has not enabled which confuses ACPICA and makes it
    report errors unnecessarily (Rafael J Wysocki).

    - Add a "force" command line switch to the intel_pstate driver to
    make it possible to override the blacklisting of some systems in
    that driver if needed (Ethan Zhao).

    - Improve intel_pstate code documentation and add a MAINTAINERS entry
    for it (Kristen Carlson Accardi).

    - Make the ACPI fan driver create cooling device interfaces witn
    names that reflect the IDs of the ACPI device objects they are
    associated with, except for "generic" ACPI fans (PNP ID "PNP0C0B").

    That's necessary for user space thermal management tools to be able
    to connect the fans with the parts of the system they are supposed
    to be cooling properly. From Srinivas Pandruvada"

    * tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits)
    MAINTAINERS: add entry for intel_pstate
    ACPI / video: update the skip case for acpi_video_device_in_dod()
    power / PM: Eliminate CONFIG_PM_RUNTIME
    NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    ACPI / EC: Fix unexpected ec_remove_handlers() invocations
    Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()"
    tracing / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    x86 / PM: Replace CONFIG_PM_RUNTIME in io_apic.c
    PM: Remove the SET_PM_RUNTIME_PM_OPS() macro
    mmc: atmel-mci: use SET_RUNTIME_PM_OPS() macro
    PM / Kconfig: Replace PM_RUNTIME with PM in dependencies
    ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    phy / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    video / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    tty / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    ACPI / PM: Do not disable wakeup GPEs that have not been enabled
    ACPI / utils: Drop error messages from acpi_evaluate_reference()
    ...

    Linus Torvalds
     

15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

13 Dec, 2014

1 commit

  • After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
    selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
    depending on CONFIG_PM_RUNTIME may now be changed to depend on
    CONFIG_PM.

    Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
    drivers/spi/.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Mark Brown

    Rafael J. Wysocki
     

12 Dec, 2014

2 commits

  • Pull devicetree changes from Grant Likely:
    "Lots of activity in the devicetree code for v3.18. Most of it is
    related to getting all of the overlay support code in place, but there
    are other important things in there.

    Highlights:

    - OF_RECONFIG notifiers for SPI, I2C and Platform devices. Those
    subsystems can now respond to live changes to the device tree.

    - CONFIG_OF_OVERLAY method for applying live changes to the device
    tree

    - Removal of the of_allnodes list. This used to be used to iterate
    over all the nodes in the device tree, but it is unnecessary
    because the same thing can be done by iterating over the list of
    child pointers. Getting rid of of_allnodes saves some memory and
    avoids the possibility of of_allnodes being sorted differently from
    the child lists.

    - Support for retrieving original DTB blob via sysfs. Needed by
    kexec.

    - More unittests

    - Documentation and minor bug fixes"

    * tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux: (42 commits)
    of: Delete unnecessary check before calling "of_node_put()"
    of: Drop ->next pointer from struct device_node
    spi: Check for spi_of_notifier when CONFIG_OF_DYNAMIC=y
    of: support passing console options with stdout-path
    of: add optional options parameter to of_find_node_by_path()
    of: Add bindings for chosen node, stdout-path
    of: Remove unneeded and incorrect MODULE_DEVICE_TABLE
    ARM: dt: fix up PL011 device tree bindings
    of: base, fix of_property_read_string_helper kernel-doc
    of: remove select of non-existant OF_DEVICE config symbol
    spi/of: Add OF notifier handler
    spi/of: Create new device registration method and accessors
    i2c/of: Add OF_RECONFIG notifier handler
    i2c/of: Factor out Devicetree registration code
    of/overlay: Add overlay unittests
    of/overlay: Introduce DT overlay support
    of/reconfig: Add OF_DYNAMIC notifier for platform_bus_type
    of/reconfig: Always use the same structure for notifiers
    of/reconfig: Add debug output for OF_RECONFIG notifiers
    of/reconfig: Add empty stubs for the of_reconfig methods
    ...

    Linus Torvalds
     
  • Pull spi updates from Mark Brown:
    "Not a huge amount going on this release, mainly new drivers (there's a
    couple more waiting that didn't quite make the cut for this release
    too):

    - An interface for querying if the current transfer is the last in a
    message, allowing controllers that need special handling for the
    final transfer to use the core message parsing.
    - Support for Amlogic Meson SPIFC, Imagination Technologies SFPI,
    Intel Quark X1000 and Samsung Exynos 7 controllers"

    * tag 'spi-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (38 commits)
    spi/s3c64xx: Remove redundant runtime PM management
    spi: fsl-spi: remove unused variable assignment
    spi: spi-fsl-spi: Return an error code in fsl_spi_do_one_msg()
    spi: core: Do not mangle error code from kthread_run()
    spi: fsl-espi: add (un)prepare_transfer_hardware calls to save power if SPI is not in use
    spi: fsl-(e)spi: migrate to generic master queueing
    spi/txx9: Deletion of an unnecessary check before the function call "clk_disable"
    spi: cadence: Fix 3-to-8 mux mode
    spi: cadence: Init HW after reading devicetree attributes
    spi: meson: Select REGMAP_MMIO
    spi: s3c64xx: add support for exynos7 SPI controller
    spi: spi-pxa2xx: SPI support for Intel Quark X1000
    spi: meson: meson_spifc_setup_speed() can be static
    spi: spi-pxa2xx: Add helpers for regiseters' accessing
    spi: spi-mxs: Fix mapping from vmalloc-ed buffer to scatter list
    spi: atmel: introduce probe deferring
    spi: atmel: remove compat for non DT board when requesting dma chan
    spi: meson: Add support for Amlogic Meson SPIFC
    spi: meson: Add device tree bindings documentation for SPIFC
    spi: core: Add spi_transfer_is_last() helper
    ...

    Linus Torvalds
     

09 Dec, 2014

1 commit

  • * pm-runtime: (25 commits)
    i2c-omap / PM: Drop CONFIG_PM_RUNTIME from i2c-omap.c
    dmaengine / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    drivers: sh / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    e1000e / igb / PM: Eliminate CONFIG_PM_RUNTIME
    MMC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    MFD / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    misc / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    media / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    input / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    iio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    hsi / OMAP / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    i2c-hid / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    drm / exynos / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    gpio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    hwrandom / exynos / PM: Use CONFIG_PM in #ifdef
    block / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    USB / PM: Drop CONFIG_PM_RUNTIME from the USB core
    PM: Merge the SET*_RUNTIME_PM_OPS() macros
    PM / Kconfig: Do not select PM directly from Kconfig files
    PCI / PM: Drop CONFIG_PM_RUNTIME from the PCI core
    ...

    Rafael J. Wysocki
     

08 Dec, 2014

6 commits


07 Dec, 2014

1 commit


05 Dec, 2014

3 commits


04 Dec, 2014

2 commits

  • 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
     
  • Since commit ce79d54ae447d651173 ("spi/of: Add OF notifier handler") the
    following warning is seen on a imx53 system that has CONFIG_OF_DYNAMIC=n:

    [ 0.048119] ------------[ cut here ]------------
    [ 0.048146] WARNING: CPU: 0 PID: 1 at drivers/spi/spi.c:2419 spi_init+0x60/0xa8()
    [ 0.048158] Modules linked in:
    [ 0.048183] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.18.0-rc6-next-20141126-00003-g9388e85 #2080
    [ 0.048193] Hardware name: Freescale i.MX53 (Device Tree Support)
    [ 0.048203] Backtrace:
    [ 0.048235] [] (dump_backtrace) from [] (show_stack+0x18/0x1c)
    [ 0.048246] r6:00000973 r5:00000000 r4:00000000 r3:00000000
    [ 0.048284] [] (show_stack) from [] (dump_stack+0x88/0xa4)
    [ 0.048312] [] (dump_stack) from [] (warn_slowpath_common+0x80/0xbc)
    [ 0.048320] r5:8096cfcc r4:00000000
    [ 0.048343] [] (warn_slowpath_common) from [] (warn_slowpath_null+0x24/0x2c)
    [ 0.048354] r8:8096cf6c r7:809355ec r6:ddcd7c00 r5:812029e4 r4:00000000
    [ 0.048389] [] (warn_slowpath_null) from [] (spi_init+0x60/0xa8)
    [ 0.048405] [] (spi_init) from [] (do_one_initcall+0x88/0x1e0)
    [ 0.048415] r5:8099e018 r4:8099e018
    [ 0.048438] [] (do_one_initcall) from [] (kernel_init_freeable+0x110/0x1e0)
    [ 0.048448] r10:80980700 r9:809806e4 r8:000000cc r7:809355ec r6:809f8940 r5:00000002
    [ 0.048478] r4:8098d744
    [ 0.048508] [] (kernel_init_freeable) from [] (kernel_init+0x10/0xf4)
    [ 0.048517] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:806ae564
    [ 0.048547] r4:00000000
    [ 0.048565] [] (kernel_init) from [] (ret_from_fork+0x14/0x2c)
    [ 0.048574] r4:00000000 r3:00000000
    [ 0.048616] ---[ end trace 405a65d177dae4fd ]---

    Only check of_reconfig_notifier_register() in the CONFIG_OF_DYNAMIC=y case,
    as intended by commit ce79d54ae447d65.

    Signed-off-by: Fabio Estevam
    Signed-off-by: Grant Likely

    Fabio Estevam
     

03 Dec, 2014

2 commits


02 Dec, 2014

1 commit


28 Nov, 2014

2 commits

  • In 3-to-8 mux mode for the CS pins we need to set the PERI_SEL bit in the
    control register. Currently the driver never sets this bit even when
    configured for 3-to-8 mux mode. This patch adds code which sets the bit
    during device initialization when necessary.

    Signed-off-by: Lars-Peter Clausen
    Acked-by: Harini Katakam
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     
  • This will make it possible to use the settings specified in the devicetree
    to configure the hardware.

    Signed-off-by: Paul Cercueil
    Signed-off-by: Lars-Peter Clausen
    Reviewed-by: Michal Simek
    Signed-off-by: Mark Brown

    Paul Cercueil
     

27 Nov, 2014

5 commits


25 Nov, 2014

8 commits

  • Add OF notifier handler needed for creating/destroying spi devices
    according to dynamic runtime changes in the DT live tree. This code is
    enabled when CONFIG_OF_DYNAMIC is selected.

    Signed-off-by: Pantelis Antoniou
    Signed-off-by: Grant Likely
    Reviewed-by: Mark Brown
    Cc:

    Pantelis Antoniou
     
  • Dynamically inserting spi device nodes requires the use of a single
    device registration method. Refactor the existing
    of_register_spi_devices() to split out the core functionality for a
    single device into a separate function; of_register_spi_device(). This
    function will be used by the OF_DYNAMIC overlay code to make live
    modifications to the tree.

    Methods to lookup a device/master using a device node are added
    as well, of_find_spi_master_by_node() & of_find_spi_device_by_node().

    Signed-off-by: Pantelis Antoniou
    [grant.likely] Split patch into two pieces for clarity
    Signed-off-by: Grant Likely
    Reviewed-by: Mark Brown
    Cc:

    Pantelis Antoniou
     
  • drivers/spi/spi-meson-spifc.c:171:6: sparse: symbol 'meson_spifc_setup_speed' was not declared. Should it be static?

    Signed-off-by: Fengguang Wu
    Signed-off-by: Mark Brown

    kbuild test robot
     
  • There are several registers for SPI, and the registers of 'SSCR0' and 'SSCR1'
    are accessed frequently. This path is to introduce helper functions to
    simplify the accessing of 'SSCR0' and 'SSCR1'.

    Reviewed-by: Andy Shevchenko
    Acked-by: Mika Westerberg
    Signed-off-by: Weike Chen
    Signed-off-by: Mark Brown

    Weike Chen
     
  • We can only use page_address on memory that has been mapped using kmap,
    when the buffer passed to the SPI has been allocated by vmalloc the page
    has not necessarily been mapped through kmap. This means sometimes
    page_address will return NULL causing the pointer we pass to sg_init_one
    to be invalid. Currently, this issue doesn't show up on the MXS
    architecture as the defconfig defines CONFIG_HIGHMEM=n which means all
    pages are mapped. For the sake of robustness though it is best to
    correct the issue.

    As we only call page_address so that we can pass a virtual address to
    sg_init_one which will eventually call virt_to_page on it, fix this
    by calling sg_set_page directly rather then relying on the sg_init_one
    helper.

    Note this patch is only build tested as I don't have an MXS system to
    test on.

    Signed-off-by: Charles Keepax
    Signed-off-by: Mark Brown

    Charles Keepax
     
  • Return probe defer if requesting a dma channel without a dma controller
    probed.

    Signed-off-by: Ludovic Desroches
    Signed-off-by: Mark Brown

    Ludovic Desroches
     
  • All boards with a dma controller have DT support so using
    dma_request_slave_channel_compat is no more needed.

    Signed-off-by: Ludovic Desroches
    Signed-off-by: Mark Brown

    Ludovic Desroches
     
  • This is a driver for the Amlogic Meson SPIFC (SPI flash controller),
    which is one of the two SPI controllers available on the SoC. It
    doesn't support DMA and has a 64-byte unified transmit/receive buffer.

    The device is optimized for interfacing with SPI NOR memories and
    allows the execution of standard operations such as read, page
    program, sector erase, etc. in a simplified way, toggling a bit in a
    dedicated register. The driver doesn't use those predefined commands
    and relies only on custom transfers.

    Signed-off-by: Beniamino Galvani
    Signed-off-by: Mark Brown

    Beniamino Galvani
     

22 Nov, 2014

2 commits

  • On CPM1, when the SPI parameter RAM is relocated to somewhere else than the
    default location, in accordance with freescale documentation
    (refer micropatch SPI application note EB662), init RX/TX params command shall
    not be used because it doesn't take into account the new location, and
    overwrites data that is in original location of SPI param ram at addresses
    SCC2 param base + (u32*)0x88 (u16*)0x90 (u32*)0x98 (u16*)0xA0, hence breaking
    activity on SCC2 if SCC2 is used in a mode like QMC for instance.

    Therefore, the action shall be done manually as described by freescale and as
    was already partly done by the driver.

    Reported-by: Patrick Vasseur
    Signed-off-by: Christophe Leroy
    Tested-by: Patrick Vasseur
    Signed-off-by: Mark Brown

    Christophe Leroy
     
  • in SPI boot mode, romcode uses SPI controller to fetch data from NOR
    flash. Here we need to reset the hardware IP to restore its state.

    Signed-off-by: Qipan Li
    Signed-off-by: Barry Song
    Signed-off-by: Mark Brown

    Qipan Li
     

18 Nov, 2014

2 commits

  • if spi device has no frequency, spi core will setup the default frequency
    to max_speed_hz of spi_master according to
    int spi_setup(struct spi_device *spi)
    {
    ...
    if (!spi->max_speed_hz)
    spi->max_speed_hz = spi->master->max_speed_hz;
    ...
    }
    this patch moves CSR SiRFSoC SPI frequency set to follow SPI core behaviour.

    Signed-off-by: Qipan Li
    Signed-off-by: Barry Song
    Signed-off-by: Mark Brown

    Qipan Li
     
  • commit 8c328a262f ("spi: sirf: Avoid duplicate code in various
    bits_per_word cases") is wrong in setting data width register of
    fifo is not right, it should use sspi->word_width >> 1 to set
    related bits. According to hardware spec, the mapping between
    register value and data width:
    0 - byte
    1 - WORD
    2 - DWORD

    Fixes: 8c328a262f ("spi: sirf: Avoid duplicate code in various bits_per_word cases") is wrong in setting data width register of
    Signed-off-by: Qipan Li
    Signed-off-by: Barry Song
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Qipan Li