18 May, 2012

1 commit


15 May, 2012

1 commit

  • for cyclic dma, dont makr the descriptor as complte. Fix the remaining users of
    cyclic dma which do so

    Signed-off-by: Vinod Koul
    Tested-by: Nicolas Ferre
    Acked-by: Nicolas Ferre
    Tested-by: Mika Westerberg

    Vinod Koul
     

11 May, 2012

1 commit


27 Apr, 2012

1 commit

  • Pull [GIT PULL] slave-dmaengine fixes from Vinod Koul.

    * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
    dmaengine/amba-pl08x : reset phychan_hold on terminate all
    dma: pl330: fix a couple of compilation warnings
    dma/ste_dma40: fix erroneous comparison
    dma/ste_dma40: explicitly include regulator consumer header
    dma40: Improve the logic of stopping logical chan
    dmaengine: at_hdmac: remove clear-on-read in atc_dostart()
    dma: mxs-dma: enable channel in device_issue_pending call
    dmaengine: imx-dma: dont complete descriptor for cyclic dma

    Linus Torvalds
     

25 Apr, 2012

2 commits

  • When a client calls pl08x_control with DMA_TERMINATE_ALL, it is correct
    to terminate and release the phy channel currently in use (if one is in use),
    but the phychan_hold counter must also be reset (otherwise it could get
    trapped in an unbalanced state).

    Signed-off-by: Davide Ciminaghi
    Reviewed-by: Viresh Kumar
    Acked-by: Linus Walleij
    Signed-off-by: Vinod Koul

    Davide Ciminaghi
     
  • Move a couple of tests and do a minor refactor to avoid:

    drivers/dma/pl330.c: In function 'pl330_probe':
    drivers/dma/pl330.c:2929:215: warning: comparison of distinct pointer types lacks a cast [enabled by default]
    drivers/dma/pl330.c: In function 'pl330_tasklet':
    drivers/dma/pl330.c:2250:8: warning: 'pch' may be used uninitialized in this function [-Wuninitialized]
    drivers/dma/pl330.c:2228:25: note: 'pch' was declared here
    drivers/dma/pl330.c:2277:130: warning: 'pch' may be used uninitialized in this function [-Wuninitialized]
    drivers/dma/pl330.c:2260:25: note: 'pch' was declared here

    Signed-off-by: Olof Johansson
    Signed-off-by: Vinod Koul

    Olof Johansson
     

23 Apr, 2012

3 commits

  • A small fallout from Vinod's conversions to dma_transfer_direction,
    this small comparison was done with a dma_data_direction instead.
    Fix it by comparing against the correct enum.

    Signed-off-by: Linus Walleij
    Signed-off-by: Vinod Koul

    Linus Walleij
     
  • The patch "ARM: amba: Remove AMBA level regulator support" breaks
    the DMA40 driver since the header implicitly
    included the regulator consumer header. So include it explicitly
    and fix the build error.

    Cc: Mark Brown
    Signed-off-by: Linus Walleij
    Signed-off-by: Vinod Koul

    Linus Walleij
     
  • can be directly stopped by issuing a SUSPEND_REQ on the EE
    bits. There is no need to suspend the physical channel and
    restart it.

    Also, the support for pre-V2 hw is discontinued.

    EE bits for writing:

    00: disable only if AS=11 or AS=00
    01: enable
    10: suspend_req only if AS=01 & EE=01 or EE=11
    11: round / no change for writing

    Signed-off-by: Narayanan G
    Acked-by: Linus Walleij
    Signed-off-by: Vinod Koul

    Narayanan G
     

20 Apr, 2012

3 commits

  • This loop on EBCISR register was designed to clear IRQ sources before enabling
    a DMA channel. This register is clear-on-read so a race condition can appear if
    another channel is already active and has just finished its transfer.
    Removing this read on EBCISR is fixing the issue as there is no case where an IRQ
    could be pending: we already make sure that this register is drained at probe()
    time and during resume.

    Signed-off-by: Nicolas Ferre
    Cc: stable
    Signed-off-by: Vinod Koul

    Nicolas Ferre
     
  • Enable channel in device_issue_pending call, so that the order between
    cookie assignment and channel enabling can be ensured naturally.

    It fixes the mxs gpmi-nand breakage which is caused by the incorrect
    order of cookie assigning and channel enabling.

    Suggested-by: Russell King
    Signed-off-by: Shawn Guo
    Tested-by: Huang Shijie
    Tested-by
    Signed-off-by: Vinod Koul

    Shawn Guo
     
  • the cookie updates completed the cyclic dma descriptor wrongly. This caused the
    BUG_ON to be hit as submit is called for completed descriptor

    Fix this by not marking the cyclic descriptor as complete

    Tested-by: Javier Martin
    Signed-off-by: Vinod Koul

    Vinod Koul
     

17 Apr, 2012

1 commit

  • Remove SoC dependency and make it generic for every Atmel ARM AT91. That will
    allow to select this driver for newer chips. Keep dependency on AT91 because of
    the use of an header file located in include/mach directory.
    Modify the comment to reflect this.

    Signed-off-by: Nicolas Ferre
    Acked-by: Vinod Koul

    Nicolas Ferre
     

11 Apr, 2012

1 commit

  • Pull dmaengine fixes from Dan Williams:

    1/ regression fix for Xen as it now trips over a broken assumption
    about the dma address size on 32-bit builds

    2/ new quirk for netdma to ignore dma channels that cannot meet
    netdma alignment requirements

    3/ fixes for two long standing issues in ioatdma (ring size overflow)
    and iop-adma (potential stack corruption)

    * tag 'dmaengine-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine:
    netdma: adding alignment check for NETDMA ops
    ioatdma: DMA copy alignment needed to address IOAT DMA silicon errata
    ioat: ring size variables need to be 32bit to avoid overflow
    iop-adma: Corrected array overflow in RAID6 Xscale(R) test.
    ioat: fix size of 'completion' for Xen

    Linus Torvalds
     

06 Apr, 2012

5 commits

  • Merge batch of fixes from Andrew Morton:
    "The simple_open() cleanup was held back while I wanted for laggards to
    merge things.

    I still need to send a few checkpoint/restore patches. I've been
    wobbly about merging them because I'm wobbly about the overall
    prospects for success of the project. But after speaking with Pavel
    at the LSF conference, it sounds like they're further toward
    completion than I feared - apparently davem is at the "has stopped
    complaining" stage regarding the net changes. So I need to go back
    and re-review those patchs and their (lengthy) discussion."

    * emailed from Andrew Morton : (16 patches)
    memcg swap: use mem_cgroup_uncharge_swap fix
    backlight: add driver for DA9052/53 PMIC v1
    C6X: use set_current_blocked() and block_sigmask()
    MAINTAINERS: add entry for sparse checker
    MAINTAINERS: fix REMOTEPROC F: typo
    alpha: use set_current_blocked() and block_sigmask()
    simple_open: automatically convert to simple_open()
    scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open()
    libfs: add simple_open()
    hugetlbfs: remove unregister_filesystem() when initializing module
    drivers/rtc/rtc-88pm860x.c: fix rtc irq enable callback
    fs/xattr.c:setxattr(): improve handling of allocation failures
    fs/xattr.c:listxattr(): fall back to vmalloc() if kmalloc() failed
    fs/xattr.c: suppress page allocation failure warnings from sys_listxattr()
    sysrq: use SEND_SIG_FORCED instead of force_sig()
    proc: fix mount -t proc -o AAA

    Linus Torvalds
     
  • This is the fallout from adding memcpy alignment workaround for certain
    IOATDMA hardware. NetDMA will only use DMA engine that can handle byte align
    ops.

    Acked-by: David S. Miller
    Signed-off-by: Dave Jiang
    Signed-off-by: Dan Williams

    Dave Jiang
     
  • Many users of debugfs copy the implementation of default_open() when
    they want to support a custom read/write function op. This leads to a
    proliferation of the default_open() implementation across the entire
    tree.

    Now that the common implementation has been consolidated into libfs we
    can replace all the users of this function with simple_open().

    This replacement was done with the following semantic patch:

    @ open @
    identifier open_f != simple_open;
    identifier i, f;
    @@
    -int open_f(struct inode *i, struct file *f)
    -{
    (
    -if (i->i_private)
    -f->private_data = i->i_private;
    |
    -f->private_data = i->i_private;
    )
    -return 0;
    -}

    @ has_open depends on open @
    identifier fops;
    identifier open.open_f;
    @@
    struct file_operations fops = {
    ...
    -.open = open_f,
    +.open = simple_open,
    ...
    };

    [akpm@linux-foundation.org: checkpatch fixes]
    Signed-off-by: Stephen Boyd
    Cc: Greg Kroah-Hartman
    Cc: Al Viro
    Cc: Julia Lawall
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     
  • Silicon errata where when RAID and legacy descriptors are mixed, the legacy
    (memcpy and friends) operation must have alignment of 64 bytes to avoid
    hanging. This effects Intel Xeon C55xx, C35xx, E5-2600.

    Signed-off-by: Dave Jiang
    Signed-off-by: Dan Williams

    Dave Jiang
     
  • The alloc order can be up to 16 and 1 << 16 will over flow the 16bit
    integer. Change the appropriate variables to 16bit to avoid overflow.

    Reported-by: Jim Harris
    Signed-off-by: Dave Jiang
    Signed-off-by: Dan Williams

    Dave Jiang
     

04 Apr, 2012

1 commit

  • Pull ARM fixes from Russell King:
    "Nothing too big here, just small fixes."

    * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
    ARM: fix more fallout from 9f97da78bf (Disintegrate asm/system.h for ARM)
    ARM: fix bios32.c build warning
    ARM: 7337/1: ptrace: fix ptrace_read_user for !CONFIG_MMU platforms
    ARM: fix missing bug.h include in arch/arm/kernel/insn.c
    ARM: sa11x0: fix build errors from DMA engine API updates

    Linus Torvalds
     

31 Mar, 2012

1 commit

  • Pull MTD changes from David Woodhouse:
    - Artem's cleanup of the MTD API continues apace.
    - Fixes and improvements for ST FSMC and SuperH FLCTL NAND, amongst
    others.
    - More work on DiskOnChip G3, new driver for DiskOnChip G4.
    - Clean up debug/warning printks in JFFS2 to use pr_.

    Fix up various trivial conflicts, largely due to changes in calling
    conventions for things like dmaengine_prep_slave_sg() (new inline
    wrapper to hide new parameter, clashing with rewrite of previously last
    parameter that used to be an 'append' flag, and is now a bitmap of
    'unsigned long flags').

    (Also some header file fallout - like so many merges this merge window -
    and silly conflicts with sparse fixes)

    * tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6: (120 commits)
    mtd: docg3 add protection against concurrency
    mtd: docg3 refactor cascade floors structure
    mtd: docg3 increase write/erase timeout
    mtd: docg3 fix inbound calculations
    mtd: nand: gpmi: fix function annotations
    mtd: phram: fix section mismatch for phram_setup
    mtd: unify initialization of erase_info->fail_addr
    mtd: support ONFI multi lun NAND
    mtd: sm_ftl: fix typo in major number.
    mtd: add device-tree support to spear_smi
    mtd: spear_smi: Remove default partition information from driver
    mtd: Add device-tree support to fsmc_nand
    mtd: fix section mismatch for doc_probe_device
    mtd: nand/fsmc: Remove sparse warnings and errors
    mtd: nand/fsmc: Add DMA support
    mtd: nand/fsmc: Access the NAND device word by word whenever possible
    mtd: nand/fsmc: Use dev_err to report error scenario
    mtd: nand/fsmc: Use devm routines
    mtd: nand/fsmc: Modify fsmc driver to accept nand timing parameters via platform
    mtd: fsmc_nand: add pm callbacks to support hibernation
    ...

    Linus Torvalds
     

30 Mar, 2012

2 commits

  • The recent merge of the sa11x0 code into mainline had silent conflicts
    with further development of the DMA engine API, leading to build errors
    and warnings:

    drivers/net/irda/sa1100_ir.c: In function 'sa1100_irda_dma_start':
    drivers/net/irda/sa1100_ir.c:151: error: too few arguments to function 'chan->device->device_prep_slave_sg'
    drivers/dma/sa11x0-dma.c: In function 'sa11x0_dma_probe':
    drivers/dma/sa11x0-dma.c:950: warning: assignment from incompatible pointer type

    Fix these.

    Signed-off-by: Russell King

    Russell King
     
  • Pull slave-dmaengine update from Vinod Koul:
    "This includes the cookie cleanup by Russell, the addition of context
    parameter for dmaengine APIs, more arm dmaengine driver cleanup by
    moving code to dmaengine, this time for imx by Javier and pl330 by
    Boojin along with the usual driver fixes."

    Fix up some fairly trivial conflicts with various other cleanups.

    * 'next' of git://git.infradead.org/users/vkoul/slave-dma: (67 commits)
    dmaengine: imx: fix the build failure on x86_64
    dmaengine: i.MX: Fix merge of cookie branch.
    dmaengine: i.MX: Add support for interleaved transfers.
    dmaengine: imx-dma: use 'dev_dbg' and 'dev_warn' for messages.
    dmaengine: imx-dma: remove 'imx_dmav1_baseaddr' and 'dma_clk'.
    dmaengine: imx-dma: remove unused arg of imxdma_sg_next.
    dmaengine: imx-dma: remove internal structure.
    dmaengine: imx-dma: remove 'resbytes' field of 'internal' structure.
    dmaengine: imx-dma: remove 'in_use' field of 'internal' structure.
    dmaengine: imx-dma: remove sg member from internal structure.
    dmaengine: imx-dma: remove 'imxdma_setup_sg_hw' function.
    dmaengine: imx-dma: remove 'imxdma_config_channel_hw' function.
    dmaengine: imx-dma: remove 'imxdma_setup_mem2mem_hw' function.
    dmaengine: imx-dma: remove dma_mode member of internal structure.
    dmaengine: imx-dma: remove data member from internal structure.
    dmaengine: imx-dma: merge old dma-v1.c with imx-dma.c
    dmaengine: at_hdmac: add slave config operation
    dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic
    dmaengine/dma_slave: introduce inline wrappers
    dma: imx-sdma: Treat firmware messages as warnings instead of erros
    ...

    Linus Torvalds
     

28 Mar, 2012

3 commits

  • Bug: cppcheck reported overflow in array assignment (for loop walks
    0 to IOP_ADMA_NUM_SRC_TEST+2, array size is IOP_ADMA_NUM_SRC_TEST).

    Reported as: https://bugzilla.kernel.org/show_bug.cgi?id=42677

    Test code pq_src array was grown by two elements to correspond with actual
    usage (IOP_ADMA_NUM_SRC_TEST+2), stack consumption was kept constant by
    modifying the pq_dest two element array which is only used when pq_src
    is referenced up to IOP_ADMA_NUM_SRC_TEST elements into the address
    of the new last two elements of the pq_src array. This is presumed to
    be the original intent but would be reliant on compilers always having
    pq_dest contiguous with the final element of pq_src.

    Note: This is a re-send of a request for review from two weeks ago.
    Looking for review (or shootdown), adding LKML to list for a wider
    audience. Thanks.

    Updated per review comments of Sergei Shtylyov

    Signed-off-by: Don Morris
    Signed-off-by: Dan Williams

    Don Morris
     
  • Pull ARM platform updates from Russell King:
    "This covers platform stuff for platforms I have a direct interest in
    (iow, I have the hardware). Essentially:
    - as we no longer support any other Acorn platforms other than RiscPC
    anymore, we can collect all that code into mach-rpc.
    - convert Acorn expansion card stuff to use IRQ allocation functions,
    and get rid of NO_IRQ from there.
    - cleanups to the ebsa110 platform to move some private stuff out of
    its header files.
    - large amount of SA11x0 updates:
    - conversion of private DMA implementation to DMA engine support
    (this actually gives us greater flexibility in drivers over the old
    API.)
    - re-worked ucb1x00 updates - convert to genirq, remove sa11x0
    dependencies, fix various minor issues
    - move platform specific sa11x0 framebuffer data into platform files
    in arch/arm instead of keeping this in the driver itself
    - update sa11x0 IrDA driver for DMA engine, and allow it to use DMA
    for SIR transmissions as well as FIR
    - rework sa1111 support for genirq, and irq allocation
    - fix sa1111 IRQ support so it works again
    - use sparse IRQ support

    After this, I have one more pull request remaining from my current
    set, which I think is going to be the most problematical as it
    generates 8 conflicts."

    Fixed up the trivial conflict in arch/arm/mach-rpc/Makefile as per
    Russell.

    * 'platforms' of git://git.linaro.org/people/rmk/linux-arm: (125 commits)
    ARM: 7343/1: sa11x0: convert to sparse IRQ
    ARM: 7342/2: sa1100: prepare for sparse irq conversion
    ARM: 7341/1: input: prepare jornada720 keyboard and ts for sa11x0 sparse irq
    ARM: 7340/1: rtc: sa1100: include mach/irqs.h instead of asm/irq.h
    ARM: sa11x0: remove unused DMA controller definitions
    ARM: sa11x0: remove old SoC private DMA driver
    USB: sa1111: add hcd .reset method
    USB: sa1111: add OHCI shutdown methods
    USB: sa1111: reorganize ohci-sa1111.c
    USB: sa1111: get rid of nasty printk(KERN_DEBUG "%s: ...", __FILE__)
    USB: sa1111: sparse and checkpatch cleanups
    ARM: sa11x0: don't static map sa1111
    ARM: sa1111: use dev_err() rather than printk()
    ARM: sa1111: cleanup sub-device registration and unregistration
    ARM: sa1111: only setup DMA for DMA capable devices
    ARM: sa1111: register sa1111 devices with dmabounce in bus notifier
    ARM: sa1111: move USB interface register definitions to ohci-sa1111.c
    ARM: sa1111: move PCMCIA interface register definitions to sa1111_generic.c
    ARM: sa1111: move PS/2 interface register definitions to sa1111p2.c
    ARM: sa1111: delete unused physical GPIO register definitions
    ...

    Linus Torvalds
     
  • commit 6bd081277ea0 "dmaengine: imx-dma: merge old dma-v1.c with
    imx-dma.c" removed the dependency in config for the imx dma driver,
    whereas it should depend on ARCH_MXS

    Signed-off-by: Vinod Koul

    Vinod Koul
     

27 Mar, 2012

2 commits

  • [1] Background :
    The GPMI does ECC read page operation with a DMA chain consist of three DMA
    Command Structures. The middle one of the chain is used to enable the BCH,
    and read out the NAND page.

    The WAIT4END(wait for command end) is a comunication signal between
    the GPMI and MXS-DMA.

    [2] The current DMA code sets the WAIT4END bit at the last one, such as:

    +-----+ +-----+ +-----+
    | cmd | ------------> | cmd | ------------------> | cmd |
    +-----+ +-----+ +-----+
    ^
    |
    |
    set WAIT4END here

    This chain works fine in the mx23/mx28.

    [3] But in the new GPMI version (used in MX50/MX60), the WAIT4END bit should
    be set not only at the last DMA Command Structure,
    but also at the middle one, such as:

    +-----+ +-----+ +-----+
    | cmd | ------------> | cmd | ------------------> | cmd |
    +-----+ +-----+ +-----+
    ^ ^
    | |
    | |
    set WAIT4END here too set WAIT4END here

    If we do not set WAIT4END, the BCH maybe stalls in "ECC reading page" state.
    In the next ECC write page operation, a DMA-timeout occurs.
    This has been catched in the MX6Q board.

    [4] In order to fix the bug, rewrite the last parameter of mxs_dma_prep_slave_sg(),
    and use the dma_ctrl_flags:
    ---------------------------------------------------------
    DMA_PREP_INTERRUPT : append a new DMA Command Structrue.
    DMA_CTRL_ACK : set the WAIT4END bit for this DMA Command Structure.
    ---------------------------------------------------------

    [5] changes to the relative drivers:
    For mxs-mmc driver, just use the new flags, do not change any logic.
    For gpmi-nand driver, and use the new flags to set the DMA
    chain, especially for ecc read page.

    Acked-by: Shawn Guo
    Signed-off-by: Huang Shijie
    Acked-by: Vinod Koul
    Signed-off-by: David Woodhouse

    Huang Shijie
     
  • Move the header to a more common place.
    The mxs dma engine is not only used in mx23/mx28, but also used
    in mx50/mx6q. It will also be used in the future chips.

    Rename it to mxs-dma.h, and create a new folder include/linux/fsl/ to
    store the Freescale's header files.

    change mxs-dma driver, mxs-mmc driver, gpmi-nand driver, mxs-saif driver
    to the new header file.

    Acked-by: Shawn Guo
    Acked-by: Mark Brown
    Signed-off-by: Huang Shijie
    Acked-by: Vinod Koul
    Acked-by: Chris Ball
    Signed-off-by: David Woodhouse

    Huang Shijie
     

26 Mar, 2012

12 commits