27 Jul, 2012

1 commit

  • Pull spi updates from Mark Brown:
    "Since Grant is even more specacularly busy than usual for the time
    being I've been collecting SPI patches for him for this release -
    probably things will revert back to Grant before the next release.

    There's nothing too exciting here, mostly it's simple driver specific
    stuff:

    - Add spi: to the modaliases of SPI devices to provide namespacing.
    - A driver for AD-FMCOMMS1-EBZ.
    - DT binding for Orion.
    - Fixes and cleanups for i.MX, PL0022, OMAP and bitbang drivers.

    There may be a few more fixes I've missed, people keep sending me new
    things."

    * tag 'spi-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc:
    spi/orion: remove uneeded spi_info
    spi/bcm63xx: fix clock configuration selection
    spi/orion: add device tree binding
    spi/omap2: mark omap2_mcspi_master_setup as __devinit
    spi: omap2-mcspi: Fix the below warning
    spi: Add AD-FMCOMMS1-EBZ I2C-SPI bridge driver
    spi/imx: use gpio_is_valid to determine if a gpio is valid
    spi/imx: remove redundant config.speed_hz setting
    spi/gpio: start with CS non-active
    spi: tegra: use dmaengine based dma driver
    spi/pl022: cleanup pl022 header documentation
    spi/pl022: enable runtime PM
    spi/pl022: delete DB5500 support
    spi/pl022: disable port when unused
    spi: Add "spi:" prefix to modalias attribute of spi devices

    Linus Torvalds
     

25 Jul, 2012

1 commit

  • Pull m68knommu arch update from Greg Ungerer:
    "Quite a varied set of changes this time.
    - A little more merge cleanup, this time the assembler entry code.
    - New sub-architecture support for the ColdFire 5251/5253 and 5441x
    CPU families.
    - Specific clk support code for the ColdFire 520x and 532x CPU
    familes.
    - Refactoring of the ColdFire GPIO support.
    - PCI bus support for some ColdFire CPUS that have PCI hardware (54xx
    family). This showed up a few problems with ColdFire cache,
    allocating coherent memory and bi-directional DMA support. Fixes
    for those too."

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (21 commits)
    m68k: allow PCI bus to be enabled for ColdFire m54xx CPUs
    m68k: add PCI bus code support for the ColdFire M54xx SoC family
    m68k: add IO access definitions to support PCI on ColdFire platforms
    m68k: add PCI bus support definitions for the ColdFire M54xx SoC family
    m68k: common PCI support definitions and code
    m68k: add support for DMA_BIDIRECTIONAL in dma support functions
    m68k: fix ColdFire clear cache operation
    m68k: use simpler dma_alloc_coherent() for ColdFire CPUs
    m68knommu: platform support for 8390 based ethernet used on some boards
    m68knommu: Add clk definitions for m532x.
    m68knommu: Add clk definitions for m520x.
    m68knommu: Add rtc device for m5441x.
    m68knommu: add definitions for the third interrupt controller on devices that don't have a third interrupt controller.
    m68knommu: Add support for the Coldfire m5441x.
    m68knommu: use MCF_IRQ_PIT1 instead of MCFINT_VECBASE + MCFINT_PIT1
    coldfire-qspi: Add support for the Coldfire 5251/5253.
    m68knommu: Add support for the Coldfire 5251/5253
    m68knommu: refactor Coldfire GPIO not to require GPIOLIB, eliminate mcf_gpio_chips.
    m68k: merge the MMU and non-MMU versions of the entry.S code
    m68k: use jbsr to call functions instead of bsrl
    ...

    Linus Torvalds
     

24 Jul, 2012

1 commit

  • Pull arm-soc clk changes from Arnd Bergmann:
    "Clock support is moving to the clk subsystem. These tegra, omap and
    imx changes are for code that is still platform specific and not (yet)
    part of that subsystem."

    Fix up conflicts in arch/arm/mach-{imx/clk-imx51-imx53.c,omap2/Makefile}

    * tag 'clk' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (23 commits)
    ARM: imx: clk-imx31: Fix clock id for rnga driver
    ARM: imx: add missing item to the list of clock event modes
    ARM: i.MX5x CSPI: Fixed clock name for CSPI
    ARM: i.MX5x clocks: Fix GPT clocks
    ARM: i.MX5x clocks: Fix parent for PWM clocks
    ARM: i.MX5x clocks: Add EPIT support
    ARM: mx27: Reenable silicon version print
    ARM: clk-imx27: Fix rtc clock id
    ARM: tegra: Provide clock for only one PWM controller
    ARM: tegra: Fix PWM clock programming
    ARM: OMAP3+: clock33xx: Add AM33XX clock tree data
    ARM: OMAP3+: clock: Move common clksel_rate & clock data to common file
    ARM: tegra: dma: rename driver name for clock to "tegra-apbdma"
    ARM: tegra: Remove second instance of uart clk
    crypto: add clk_prepare/clk_unprepare
    ASoC: tegra: add clk_prepare/clk_unprepare
    staging: nvec: add clk_prepare/clk_unprepare
    spi/tegra: add clk_prepare/clk_unprepare
    Input: tegra-kbc - add clk_prepare/clk_unprepare
    USB: ehci-tegra: add clk_prepare/clk_unprepare
    ...

    Linus Torvalds
     

23 Jul, 2012

4 commits

  • This was formerly used to store the tclk value. This is now discovered
    using the clk API, rather than pass it as platform data.

    Signed-off-by: Michael Walle
    Acked-by: Jason Cooper
    Signed-off-by: Andrew Lunn
    Acked-by: Sebastian Hesselbarth
    Signed-off-by: Mark Brown

    Michael Walle
     
  • We are currently using an inferior or equal operator for comparing
    the transfer frequency with the clock frequency table. Because of
    this, we always end up selecting 20Mhz as a frequency, due to the
    inequality transfer hz
    Signed-off-by: Mark Brown

    Florian Fainelli
     
  • Signed-off-by: Michael Walle
    Signed-off-by: Andrew Lunn
    Acked-by: Jason Cooper
    Acked-by: Sebastian Hesselbarth
    Signed-off-by: Mark Brown

    Andrew Lunn
     
  • This warning recently appeared with omap2plus_defconfig:

    WARNING: drivers/spi/built-in.o(.devinit.text+0x3c4): Section mismatch in reference from the function omap2_mcspi_probe() to the function .init.text:omap2_mcspi_master_setup()
    The function __devinit omap2_mcspi_probe() references
    a function __init omap2_mcspi_master_setup().
    If omap2_mcspi_master_setup is only used by omap2_mcspi_probe then
    annotate omap2_mcspi_master_setup with a matching annotation.

    The fix is obviously to mark the omap2_mcspi_master_setup function as
    __devinit, rather than __init.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Shubhrajyoti D
    Signed-off-by: Mark Brown

    Arnd Bergmann
     

20 Jul, 2012

2 commits

  • The dma_map and dma_unmap should have same parameter
    passed otherwise we get the below warn.

    ks8851 spi1.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x000000009f22]

    [ 2.066925] Modules linked in:
    [ 2.070312]
    [ 2.071929] [] (unwind_backtrace+0x0/0x130) from [] (warn_slowpath_common+0x4c/0x64)
    [ 2.081909] [] (warn_slowpath_common+0x4c/0x64) from [] (warn_slowpath_fmt+0x30/0x40)
    [ 2.091949] [] (warn_slowpath_fmt+0x30/0x40) from [] (check_unmap+0x6d0/0x7b0)
    [ 2.101348] [] (check_unmap+0x6d0/0x7b0) from [] (debug_dma_unmap_page+0x64/0x70)
    [ 2.111053] [] (debug_dma_unmap_page+0x64/0x70) from [] (omap2_mcspi_txrx_dma+0x2d8/0x4fc)
    [ 2.121582] [] (omap2_mcspi_txrx_dma+0x2d8/0x4fc) from [] (omap2_mcspi_work.clone.4+0xf0/0x290)
    [ 2.132537] [] (omap2_mcspi_work.clone.4+0xf0/0x290) from [] (omap2_mcspi_transfer_one_message+0x288/0x438)
    [ 2.144592] [] (omap2_mcspi_transfer_one_message+0x288/0x438) from [] (spi_pump_messages+0x100/0x160)
    [ 2.156127] [] (spi_pump_messages+0x100/0x160) from [] (kthread_worker_fn+0xac/0x180)
    [ 2.166168] [] (kthread_worker_fn+0xac/0x180) from [] (kthread+0x90/0x9c)
    [ 2.175140] [] (kthread+0x90/0x9c) from [] (kernel_thread_exit+0x0/0x8)
    [ 2.183898] ---[ end trace d1830ce6e44292f2 ]---

    Fix the warn by changing the unmap parameter.

    Reported-by: Russell King - ARM Linux
    Signed-off-by: Shubhrajyoti D
    Signed-off-by: Mark Brown

    Shubhrajyoti D
     
  • This patch adds support for the I2C-SPI bridge which can be found on the Analog
    Devices AD-FMCOMMS1-EBZ board.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     

19 Jul, 2012

4 commits

  • They have very few users and they're both just doing a single register
    write so the advantage of having the macro is a bit limited. An inline
    function might make sense but it's as easy to just do the writes directly.

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

    Mark Brown
     
  • Saves some error handling and a small amount of code.

    Signed-off-by: Mark Brown
    Reviewed-by: Sylwester Nawrocki
    Acked-by: Linus Walleij
    Signed-off-by: Kukjin Kim

    Mark Brown
     
  • No call was being made by the GPIO driver to put the GPIO into output
    mode meaning that the calls to gpio_set_value() which were being done
    were not valid. A similar issue appears to exist with the DT GPIO
    requests but as they appear to be being used for pinmux it's less clear
    to me that we want to configure them.

    Without this fix Cragganmore systems can't talk to their SPI devices.

    Signed-off-by: Mark Brown
    Signed-off-by: Kukjin Kim

    Mark Brown
     
  • When gpio_request() fails the driver logged the failure but while it'd
    try to print an error code in the non-DT case it didn't pass the error
    code in so garbage would be logged and in the DT case the error wasn't
    logged.

    Further, in the non-DT case the error code was then overwritten with -EBUSY
    depriving the caller of information and breaking automatic probe deferral
    pushing back from the GPIO level. Also reformat the non-DT log message
    so it's not word wrapped and we can grep for it.

    Signed-off-by: Mark Brown
    Signed-off-by: Kukjin Kim

    Mark Brown
     

16 Jul, 2012

1 commit


13 Jul, 2012

8 commits


11 Jul, 2012

1 commit


10 Jul, 2012

2 commits

  • The chip select line was configured as output with the initial value
    being active explicitly. It was later deasserted during
    spi_bitbang_setup() without any clock activity in between. So it makes
    no sense to activate the device at all and the chip select line can
    better start non-active.

    Signed-off-by: Uwe Kleine-König
    Acked-by: Linus Walleij
    Signed-off-by: Mark Brown

    Uwe Kleine-König
     
  • Use the dmaengine based Tegra APB DMA driver for
    data transfer between SPI FIFO and memory in
    place of legacy Tegra APB DMA.

    The new driver is selected if legacy driver is not
    selected and new DMA driver is enabled through config
    file.

    Signed-off-by: Laxman Dewangan
    Acked-by: Stephen Warren
    Signed-off-by: Mark Brown

    Laxman Dewangan
     

07 Jul, 2012

1 commit

  • …it/swarren/linux-tegra into next/clk

    From Stephen Warren <swarren@wwwdotorg.org>:

    This branch contains numerous changes required as a baseline in order to
    convert Tegra to the common clock framework. The intention was to also
    include patches to actually convert Tegra to the common clock framework.
    However, those patches appeared late in the kernel cycle and currently
    cause regressions on some boards, so were dropped for now.

    * 'for-3.6/common-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra:
    ARM: tegra: Provide clock for only one PWM controller
    ARM: tegra: Fix PWM clock programming
    ARM: tegra: dma: rename driver name for clock to "tegra-apbdma"
    ARM: tegra: Remove second instance of uart clk
    crypto: add clk_prepare/clk_unprepare
    ASoC: tegra: add clk_prepare/clk_unprepare
    staging: nvec: add clk_prepare/clk_unprepare
    spi/tegra: add clk_prepare/clk_unprepare
    Input: tegra-kbc - add clk_prepare/clk_unprepare
    USB: ehci-tegra: add clk_prepare/clk_unprepare
    mmc: tegra: add clk_prepare/clk_unprepare
    i2c: tegra: Add clk_prepare/clk_unprepare
    ARM: tegra: add clk_prepare/clk_unprepare

    Signed-off-by: Arnd Bergmann <arnd@arndb.de>

    Arnd Bergmann
     

02 Jul, 2012

3 commits

  • If we're gonna use runtime PM it's a pretty good idea to actually
    enable it in probe() and disable it in remove() too, so it
    gets used for real. Up until now we only fooled around with the
    reference count.

    Cc: Vinit Shenoy
    Signed-off-by: Linus Walleij

    Linus Walleij
     
  • This ASIC variant has been deleted from the ARM tree, no need
    to keep support around.

    Cc: Vinit Shenoy
    Signed-off-by: Linus Walleij

    Linus Walleij
     
  • Commit ffbbdd21329f3e15eeca6df2d4bc11c04d9d91c0
    "spi: create a message queueing infrastructure"
    Accidentally deleted the logic to disable the port
    when unused leading to higher power consumption.
    Fix this up.

    Cc: stable@kernel.org
    Cc: Vinit Shenoy
    Signed-off-by: Virupax Sadashivpetimath
    Signed-off-by: Linus Walleij

    Virupax Sadashivpetimath
     

20 Jun, 2012

1 commit

  • Config operation is separated from request operation in
    DMA common operation. Because spi driver can change the
    DMA config for every transfer. So this patch is using the
    separated DMA config operation.

    Signed-off-by: Boojin Kim
    Signed-off-by: Kyoungil Kim
    Signed-off-by: Kukjin Kim

    Boojin Kim
     

18 Jun, 2012

1 commit

  • 1a77b127ae (OMAP : SPI : use devm_* functions) converted the SPI
    device controller state to use devm_kzalloc(). Unfortunately, this
    is used against an unbound struct device, which results in the
    following when the device is bound to its driver:

    ------------[ cut here ]------------
    WARNING: at /home/rmk/git/linux-rmk/drivers/base/dd.c:257 driver_probe_device+0x78/0x21c()
    Modules linked in:
    Backtrace:
    [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c) r7:00000000 r6:c01ff28c r5:c040050c r4:00000101
    [] (dump_stack+0x0/0x1c) from [] (warn_slowpath_common+0x58/0x70)
    [] (warn_slowpath_common+0x0/0x70) from [] (warn_slowpath_null+0x24/0x2c)
    [] (warn_slowpath_null+0x0/0x2c) from [] (driver_probe_device+0x78/0x21c)
    [] (driver_probe_device+0x0/0x21c) from [] (__driver_attach+0x6c/0x90)
    [] (__driver_attach+0x0/0x90) from [] (bus_for_each_dev+0x58/0x98)
    [] (bus_for_each_dev+0x0/0x98) from [] (driver_attach+0x20/0x28)
    [] (driver_attach+0x0/0x28) from [] (bus_add_driver+0xb4/0x230)
    [] (bus_add_driver+0x0/0x230) from [] (driver_register+0xac/0x138)
    [] (driver_register+0x0/0x138) from [] (spi_register_driver+0x4c/0x60)
    [] (spi_register_driver+0x0/0x60) from [] (ks8851_init+0x14/0x1c)
    [] (ks8851_init+0x0/0x1c) from [] (do_one_initcall+0x9c/0x164)
    [] (do_one_initcall+0x0/0x164) from [] (kernel_init+0x128/0x210)
    [] (kernel_init+0x0/0x210) from [] (do_exit+0x0/0x72c)
    ---[ end trace 4dcda79f5e89dd84 ]---
    ks8851 spi1.0: message enable is 0
    ks8851 spi1.0: eth0: revision 0, MAC 08:00:28:01:4d:c6, IRQ 194, has EEPROM

    Fix this by partially reverting the original commit.

    Signed-off-by: Russell King

    Russell King
     

13 Jun, 2012

1 commit


27 May, 2012

2 commits

  • Pull arm-soc: soc specific changes (part 2) from Olof Johansson:
    "This adds support for the spear13xx platform, which has first been
    under review a long time ago and finally been completed after generic
    spear work has gone into the clock, dt and pinctrl branches.

    Also a number of updates for the samsung socs are part of this branch."

    Fix up trivial conflicts in drivers/gpio/gpio-samsung.c that look much
    worse than they are: the exonys5 init code was refactored in commit
    fd454997d687 ("gpio: samsung: refactor gpiolib init for exynos4/5"), and
    then commit f10590c9836c ("ARM: EXYNOS: add GPC4 bank instance") added a
    new gpio chip define and did tiny updates to the init code.

    So the conflict diff looks like hell, but it's actually a fairly simple
    change.

    * tag 'soc2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (34 commits)
    ARM: exynos: fix building with CONFIG_OF disabled
    ARM: EXYNOS: Add AUXDATA for i2c controllers
    ARM: dts: Update device tree source files for EXYNOS5250
    ARM: EXYNOS: Add device tree support for interrupt combiner
    ARM: EXYNOS: Add irq_domain support for interrupt combiner
    ARM: EXYNOS: Remove a new bus_type instance for EXYNOS5
    ARM: EXYNOS: update irqs for EXYNOS5250 SoC
    ARM: EXYNOS: Add pre-divider and fout mux clocks for bpll and mpll
    ARM: EXYNOS: add GPC4 bank instance
    ARM: EXYNOS: Redefine IRQ_MCT_L0,1 definition
    ARM: EXYNOS: Modify the GIC physical address for static io-mapping
    ARM: EXYNOS: Add watchdog timer clock instance
    pinctrl: SPEAr1310: Fix pin numbers for clcd_high_res
    SPEAr: Update MAINTAINERS and Documentation
    SPEAr13xx: Add defconfig
    SPEAr13xx: Add compilation support
    SPEAr13xx: Add dts and dtsi files
    pinctrl: Add SPEAr13xx pinctrl drivers
    pinctrl: SPEAr: Create macro for declaring GPIO PINS
    SPEAr13xx: Add common clock framework support
    ...

    Linus Torvalds
     
  • Pull arm-soc clock driver changes from Olof Johansson:
    "The new clock subsystem was merged in linux-3.4 without any users,
    this now moves the first three platforms over to it: imx, mxs and
    spear.

    The series also contains the changes for the clock subsystem itself,
    since Mike preferred to have it together with the platforms that
    require these changes, in order to avoid interdependencies and
    conflicts."

    Fix up trivial conflicts in arch/arm/mach-kirkwood/common.c (code
    removed in one branch, added OF support in another) and
    drivers/dma/imx-sdma.c (independent changes next to each other).

    * tag 'clock' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (97 commits)
    clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().
    clk: Provide dummy clk_unregister()
    SPEAr: Update defconfigs
    SPEAr: Add SMI NOR partition info in dts files
    SPEAr: Switch to common clock framework
    SPEAr: Call clk_prepare() before calling clk_enable
    SPEAr: clk: Add General Purpose Timer Synthesizer clock
    SPEAr: clk: Add Fractional Synthesizer clock
    SPEAr: clk: Add Auxiliary Synthesizer clock
    SPEAr: clk: Add VCO-PLL Synthesizer clock
    SPEAr: Add DT bindings for SPEAr's timer
    ARM i.MX: remove now unused clock files
    ARM: i.MX6: implement clocks using common clock framework
    ARM i.MX35: implement clocks using common clock framework
    ARM i.MX5: implement clocks using common clock framework
    ARM: Kirkwood: Replace clock gating
    ARM: Orion: Audio: Add clk/clkdev support
    ARM: Orion: PCIE: Add support for clk
    ARM: Orion: XOR: Add support for clk
    ARM: Orion: CESA: Add support for clk
    ...

    Linus Torvalds
     

25 May, 2012

1 commit

  • Pull SPI changes from Grant Likely:
    "Bug fixes and new features for SPI device drivers. Also move device
    tree support code out of drivers/of and into drivers/spi/spi.c where
    it makes more sense."

    * tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6:
    spi: By default setup spi_masters with 1 chipselect and dynamics bus number
    SPI: PRIMA2: use the newest APIs of PINCTRL to fix compiling errors
    spi/spi-fsl-spi: reference correct pdata in fsl_spi_cs_control
    spi: refactor spi-coldfire-qspi to use SPI queue framework.
    spi/omap2-mcspi: convert to the pump message infrastructure
    spi/rspi: add dmaengine support
    spi/topcliff: use correct __devexit_p annotation
    spi: Dont call prepare/unprepare transfer if not populated
    spi/ep93xx: clean probe/remove routines
    spi/devicetree: Move devicetree support code into spi directory
    spi: use module_pci_driver
    spi/omap2-mcspi: Trivial optimisation
    spi: omap2-mcspi: add support for pm_runtime autosuspend
    spi/omap: Remove bus_num usage for instance index
    OMAP : SPI : use devm_* functions
    spi: omap2-mcspi: convert to module_platform_driver
    spi: omap2-mcspi: make it behave as a module

    Linus Torvalds
     

21 May, 2012

1 commit


20 May, 2012

4 commits

  • Trivial simplification. Instead of requiring spi master drivers to
    always set the bus number (even when a dynamic number is desired),
    this patch modifies spi_alloc_master() to initialize num_chipselect to
    1 (because there will always be at least one CS) and bus_num to -1 for
    dynamic allocation. This simplifies the code needed to be written for
    drivers.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • Fix the compiling errors:
    drivers/spi/spi-sirf.c: In function 'spi_sirfsoc_probe':
    drivers/spi/spi-sirf.c:563: error: implicit declaration of function 'pinmux_get'
    drivers/spi/spi-sirf.c:563: warning: assignment makes pointer from integer without a cast
    drivers/spi/spi-sirf.c:568: error: implicit declaration of function 'pinmux_enable'
    drivers/spi/spi-sirf.c:602: error: implicit declaration of function 'pinmux_disable'
    drivers/spi/spi-sirf.c:603: error: implicit declaration of function 'pinmux_put'
    make[3]: *** [drivers/spi/spi-sirf.o] Error 1

    Signed-off-by: Barry Song
    Cc: Guennadi Liakhovetski
    Acked-by: Linus Walleij
    Signed-off-by: Grant Likely

    Barry Song
     
  • Commit 178db7d3, "spi: Fix device unregistration when unregistering
    the bus master", changed spi device initialization of dev.parent pointer
    to be the master's device pointer instead of his parent.

    This introduced a bug in spi-fsl-spi, since its usage of spi device
    pointer was not updated accordingly. This was later fixed by commit
    5039a86, "spi/mpc83xx: fix NULL pdata dereference bug", but it missed
    another spot on fsl_spi_cs_control function where we also need to update
    usage of spi device pointer. This change address that.

    Cc: stable@vger.kernel.org
    Signed-off-by: Herton Ronaldo Krzesinski
    Acked-by: Joakim Tjernlund
    Signed-off-by: Grant Likely

    Herton Ronaldo Krzesinski
     
  • Use the new SPI queue framework; remove use of workqueue, replace
    mcfqspi_transfer with mcfqspi_transfer_one_message, add
    mcfqspi_prepare_transfer_hw and mcfqspi_unprepare_transfer_hw, update power
    management routines.

    Signed-off-by: Steven King
    Acked-by: Greg Ungerer
    Acked-by: Linus Walleij
    Signed-off-by: Grant Likely

    Steven King