30 Nov, 2011

2 commits

  • DMA support for MCSPI transfer enabled and removed unwanted flag
    dma_not_enabled as DMA feature is enabled in omap2_mcspi.

    Signed-off-by: Philip, Avinash

    Philip, Avinash
     
  • Support for DMA transmission on MCSPI added.
    1. MCSPI TX and RX registers are not 256-bit aligned address, as
    required for Constant address mode in DAM and SAM in EDMA, causing EDMA
    error generation condition. With this commit SAM and DAM are set to
    Increment address mode.
    2. SPI uses EDMA AB synchronized mode for transmission and EDMA A
    synchronized mode for reception, which can be used to handle large chunk
    of data above 64KB with single EDMA completion interrupt.

    Signed-off-by: Philip, Avinash

    Philip, Avinash
     

04 Nov, 2011

3 commits

  • Currently McSPI driver doesnt follow correct failure fallback steps
    incase of probe & in case of remove() procedure.

    This patch corrects label names to give meaningful labels & also
    corrects fallback & removal procedure

    Signed-off-by: Hebbar, Gururaja

    Hebbar, Gururaja
     
  • omap mcspi probe() doesnt call pm_runtime put & disable functions
    in case of failure. remove() doesnt call pm_runtime disable. This could
    lead to warnings as below on subsequent insmod.

    root@arago-armv7:~# insmod /lib/modules/3.1.0-rc8/spi-omap2-mcspi.ko
    [ 255.383671] omap2_mcspi omap2_mcspi.1: Unbalanced pm_runtime_enable!
    ...

    This patch adds the pm_runtime put() & disable() at aprropriate stages.

    Signed-off-by: Hebbar, Gururaja

    Hebbar, Gururaja
     
  • Current McSPI driver 1st requests memory regions & later adds register
    offset. This causes warning when during module removal as below.

    root@arago-armv7:~# rmmod -v /lib/modules/3.1.0-rc8/spi-omap2-mcspi.ko
    rmmod spi_omap2_mcspi, wait=no
    [ 42.472810] Trying to free nonexistent resource

    [ 42.519178] Trying to free nonexistent resource

    This patch moves the register offset addition before request_mem_region

    Signed-off-by: Hebbar, Gururaja

    Hebbar, Gururaja
     

27 Oct, 2011

2 commits


05 Oct, 2011

5 commits


24 Sep, 2011

1 commit

  • If CPM mode is not used, the fsl_dummy_rx variable is never allocated. When
    the cleanup attempts to free it, the reference count is zero and a WARN is
    generated. The same CPM mode check used in the initialize is applied to the
    free as well.

    Tested on 2.6.33 with the previous spi_mpc8xxx driver. The renamed
    spi-fsl-spi driver looks to have the same problem.

    Signed-off-by: Jeff Harris
    Signed-off-by: Grant Likely

    Jeff Harris
     

16 Sep, 2011

1 commit

  • commit 22a85e4cd51 (spi/imx: add device tree probe support) broke spi-imx usage
    when the SPI chipselect is the one internal to the controller.

    On a mx31pdk board the following error is seen:

    Registering mxc_nand as whole device
    ------------[ cut here ]------------
    WARNING: at drivers/gpio/gpiolib.c:101 gpio_ensure_requested+0x4c/0xf4()
    autorequest GPIO-0
    Modules linked in:
    [] (unwind_backtrace+0x0/0xf4) from [] (warn_slowpath_common+0x4c/0x64)
    [] (warn_slowpath_common+0x4c/0x64) from [] (warn_slowpath_fmt+0x30/0x40)
    [] (warn_slowpath_fmt+0x30/0x40) from [] (gpio_ensure_requested+0x4c/0xf4)
    [] (gpio_ensure_requested+0x4c/0xf4) from [] (gpio_direction_output+0xa0/0x138)
    [] (gpio_direction_output+0xa0/0x138) from [] (spi_imx_setup+0x38/0x4c)
    [] (spi_imx_setup+0x38/0x4c) from [] (spi_setup+0x38/0x50)
    [] (spi_setup+0x38/0x50) from [] (spi_add_device+0x94/0x124)
    [] (spi_add_device+0x94/0x124) from [] (spi_new_device+0x74/0xac)
    [] (spi_new_device+0x74/0xac) from [] (spi_match_master_to_boardinfo+0x20/0x40)
    [] (spi_match_master_to_boardinfo+0x20/0x40) from [] (spi_register_master+0xb0/0x104)
    [] (spi_register_master+0xb0/0x104) from [] (spi_bitbang_start+0x104/0x17c)
    [] (spi_bitbang_start+0x104/0x17c) from [] (spi_imx_probe+0x2fc/0x404)
    [] (spi_imx_probe+0x2fc/0x404) from [] (platform_drv_probe+0x18/0x1c)
    [] (platform_drv_probe+0x18/0x1c) from [] (driver_probe_device+0x78/0x174)
    [] (driver_probe_device+0x78/0x174) from [] (__driver_attach+0x8c/0x90)
    [] (__driver_attach+0x8c/0x90) from [] (bus_for_each_dev+0x60/0x8c)
    [] (bus_for_each_dev+0x60/0x8c) from [] (bus_add_driver+0xa0/0x288)
    [] (bus_add_driver+0xa0/0x288) from [] (driver_register+0x78/0x18c)
    [] (driver_register+0x78/0x18c) from [] (do_one_initcall+0x34/0x178)
    [] (do_one_initcall+0x34/0x178) from [] (kernel_init+0x74/0x118)
    [] (kernel_init+0x74/0x118) from [] (kernel_thread_exit+0x0/0x8)
    ---[ end trace 759f924b30fd5a44 ]---

    Fix this issue by using the original chip select logic and make spi-imx to work again.

    Tested on a mx31pdk that uses the hardware SPI chipselect pins and also
    on a mx27pdk that uses GPIO as SPI chipselect.

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

    Fabio Estevam
     

02 Aug, 2011

1 commit

  • The remove function in the PL022 driver cannot abort the remove
    function any way, so restructure the code so as not to make that
    assumption. Remove will now proceed no matter whether it can
    stop the transfer queue or not.

    Reported-by: Russell King
    Signed-off-by: Linus Walleij
    Signed-off-by: Grant Likely

    Linus Walleij
     

23 Jul, 2011

1 commit

  • * 'spi/next' of git://git.secretlab.ca/git/linux-2.6: (34 commits)
    spi/imx: add device tree probe support
    spi/imx: copy gpio number passed by platform data into driver private data
    spi/imx: use soc name in spi device type naming scheme
    spi/imx: merge type SPI_IMX_VER_0_7 into SPI_IMX_VER_0_4
    spi/imx: do not use spi_imx2_3 to name SPI_IMX_VER_2_3 function and macro
    spi/imx: use mx21 to name SPI_IMX_VER_0_0 function and macro
    spi/imx: do not make copy of spi_imx_devtype_data
    spi/dw: Add spi number into spi irq desc
    spi/tegra: Use engineering names in DT compatible property
    spi/fsl_spi: fix CPM spi driver
    mach-s3c2410: remove unused spi-gpio.h file
    spi: remove obsolete spi-s3c24xx-gpio driver
    mach-gta2: remove unused spi-gpio.h include
    mach-qt2410: convert to spi_gpio
    mach-jive: convert to spi_gpio
    spi/pxa2xx: Remove unavailable ssp_type from documentation
    spi/bfin_spi: uninline fat queue funcs
    spi/bfin_spi: constify pin array
    spi/bfin_spi: use structs for accessing hardware regs
    spi/topcliff-pch: Support new device ML7223 IOH
    ...

    Fix up trivial conflict in arch/arm/mach-ep93xx/Makefile

    Linus Torvalds
     

15 Jul, 2011

7 commits

  • It adds device tree probe support for spi-imx driver.

    Signed-off-by: Shawn Guo
    Cc: Grant Likely
    Signed-off-by: Grant Likely

    Shawn Guo
     
  • It copies gpio number passed via platform data embedded pointer into
    driver private data, so that we do not need to refer to this embedded
    pointer passed by platform data after probe function exits.

    Signed-off-by: Shawn Guo
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Cc: Grant Likely
    Signed-off-by: Grant Likely

    Shawn Guo
     
  • Software defined version number is not stable enough to be used
    in device type naming scheme. The patch changes it to use implicit
    soc name for spi device type definition. In this way, we can easily
    align the naming scheme with device tree binding, which comes later.

    It removes fifosize from spi_imx_data and adds devtype there, so that
    fifosize can be set in an inline function according to devtype.
    Also, cpu_is_mx can be replaced by inline functions checking devtype.

    Signed-off-by: Shawn Guo
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Cc: Grant Likely
    Signed-off-by: Grant Likely

    Shawn Guo
     
  • The only difference between SPI_IMX_VER_0_7 and SPI_IMX_VER_0_4 is
    .config function. The patch uses cpu_is_mx35 (to be removed) as the
    temporary solution to consolidate functions spi_imx0_4_config and
    spi_imx0_7_config into mx31_config. As a result, type SPI_IMX_VER_0_7
    can be merged into SPI_IMX_VER_0_4.

    It also renames function spi_imx0_4_reset to mx31_reset to keep
    consistency with other function naming.

    A couple of redundant macros, MX3_CSPISTAT and MX3_CSPISTAT_RR,
    together with the useless type SPI_IMX_VER_0_5 also get cleaned up.

    Signed-off-by: Shawn Guo
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Cc: Grant Likely
    Signed-off-by: Grant Likely

    Shawn Guo
     
  • It's confusing to use spi_imx2_3 to name SPI_IMX_VER_2_3 function
    and macro, as it easily make people think of imx2 and imx3. It's
    better to use specific soc name just like what other SPI_IMX_VER
    do. For SPI_IMX_VER_2_3 case, it will be mx51. To distinguish it
    from CSPI on mx51, mx51_ecspi might be a good choice.

    Signed-off-by: Shawn Guo
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Cc: Grant Likely
    Signed-off-by: Grant Likely

    Shawn Guo
     
  • SPI_IMX_VER_0_0 covers i.mx21 and i.mx27. It makes more sense to
    use mx21 rather than mx27 to name SPI_IMX_VER_0_0 function and
    macro, since i.mx21 comes out ealier than i.mx27.

    Signed-off-by: Shawn Guo
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Cc: Grant Likely
    Signed-off-by: Grant Likely

    Shawn Guo
     
  • spi_imx_devtype_data has already been driver private data. There is
    really no need to make a copy in spi_imx_data. Instead, a reference
    pointer works perfectly fine.

    Signed-off-by: Shawn Guo
    Signed-off-by: Grant Likely

    Shawn Guo
     

09 Jul, 2011

1 commit


06 Jul, 2011

3 commits

  • The existing macro fails for following scenarios.
    1) S5P64X0 channel 1
    2) S5PV210 channel 1

    The FIFO data level supported in the above SoCs either 64 or
    256 bytes depending on the channel. Because of this the TX_DONE
    is the 25 bit in the status register.

    The existing macro works for the following scenarios
    1) S3C6410 all channels
    2) S5PC100 all channels

    The FIFO data level supported in the above SoCs 64 bytes
    on all the channels. Because of this the TX_DONE is the 21 bit
    in the status register.

    So when we use the existing macro for the non-working SoCs
    it is not anding with the TX_DONE bit for transmission status check.

    Signed-off-by: Padmavathi Venna
    Acked-by: Jassi Brar
    Acked-by: Grant Likely
    Signed-off-by: Kukjin Kim

    Padmavathi Venna
     
  • Engineering names are more stable than marketing names. Hence, use them
    for Device Tree compatible properties instead.

    Signed-off-by: Stephen Warren
    Signed-off-by: Grant Likely

    Stephen Warren
     
  • This patch fixes the freescale spi driver for CPM. Without this
    patch SPI on CPM failed because cpm_muram_alloc_fixed tries to
    allocate muram in an preserved area. The error reported was:

    mpc8xxx_spi f0011a80.spi: can't allocate spi parameter ram
    mpc8xxx_spi: probe of f0011a80.spi failed with error -12

    Now the driver uses of_iomap to get access to this area
    similar to i2c driver driver in the i2c-cpm.c which has a
    similar device tree node. This is tested on a MPC8247 with CPM2.

    Signed-off-by: Holger Brunck
    Signed-off-by: Grant Likely

    Holger Brunck
     

05 Jul, 2011

1 commit


17 Jun, 2011

6 commits


16 Jun, 2011

4 commits


13 Jun, 2011

1 commit


11 Jun, 2011

1 commit