14 Nov, 2013

1 commit

  • Pull DMA mask updates from Russell King:
    "This series cleans up the handling of DMA masks in a lot of drivers,
    fixing some bugs as we go.

    Some of the more serious errors include:
    - drivers which only set their coherent DMA mask if the attempt to
    set the streaming mask fails.
    - drivers which test for a NULL dma mask pointer, and then set the
    dma mask pointer to a location in their module .data section -
    which will cause problems if the module is reloaded.

    To counter these, I have introduced two helper functions:
    - dma_set_mask_and_coherent() takes care of setting both the
    streaming and coherent masks at the same time, with the correct
    error handling as specified by the API.
    - dma_coerce_mask_and_coherent() which resolves the problem of
    drivers forcefully setting DMA masks. This is more a marker for
    future work to further clean these locations up - the code which
    creates the devices really should be initialising these, but to fix
    that in one go along with this change could potentially be very
    disruptive.

    The last thing this series does is prise away some of Linux's addition
    to "DMA addresses are physical addresses and RAM always starts at
    zero". We have ARM LPAE systems where all system memory is above 4GB
    physical, hence having DMA masks interpreted by (eg) the block layers
    as describing physical addresses in the range 0..DMAMASK fails on
    these platforms. Santosh Shilimkar addresses this in this series; the
    patches were copied to the appropriate people multiple times but were
    ignored.

    Fixing this also gets rid of some ARM weirdness in the setup of the
    max*pfn variables, and brings ARM into line with every other Linux
    architecture as far as those go"

    * 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm: (52 commits)
    ARM: 7805/1: mm: change max*pfn to include the physical offset of memory
    ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations
    ARM: 7796/1: scsi: Use dma_max_pfn(dev) helper for bounce_limit calculations
    ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function
    ARM: 7794/1: block: Rename parameter dma_mask to max_addr for blk_queue_bounce_limit()
    ARM: DMA-API: better handing of DMA masks for coherent allocations
    ARM: 7857/1: dma: imx-sdma: setup dma mask
    DMA-API: firmware/google/gsmi.c: avoid direct access to DMA masks
    DMA-API: dcdbas: update DMA mask handing
    DMA-API: dma: edma.c: no need to explicitly initialize DMA masks
    DMA-API: usb: musb: use platform_device_register_full() to avoid directly messing with dma masks
    DMA-API: crypto: remove last references to 'static struct device *dev'
    DMA-API: crypto: fix ixp4xx crypto platform device support
    DMA-API: others: use dma_set_coherent_mask()
    DMA-API: staging: use dma_set_coherent_mask()
    DMA-API: usb: use new dma_coerce_mask_and_coherent()
    DMA-API: usb: use dma_set_coherent_mask()
    DMA-API: parport: parport_pc.c: use dma_coerce_mask_and_coherent()
    DMA-API: net: octeon: use dma_coerce_mask_and_coherent()
    DMA-API: net: nxp/lpc_eth: use dma_coerce_mask_and_coherent()
    ...

    Linus Torvalds
     

31 Oct, 2013

1 commit

  • This code sequence is unsafe in modules:

    static u64 mask = DMA_BIT_MASK(something);
    ...
    if (!dev->dma_mask)
    dev->dma_mask = &mask;

    as if a module is reloaded, the mask will be pointing at the original
    module's mask address, and this can lead to oopses. Moreover, they
    all follow this with:

    if (!dev->coherent_dma_mask)
    dev->coherent_dma_mask = mask;

    where 'mask' is the same value as the statically defined mask, and this
    bypasses the architecture's check on whether the DMA mask is possible.

    Fix these issues by using the new dma_coerce_coherent_and_mask()
    function.

    Acked-by: Mark Brown
    Acked-by: Takashi Iwai
    Signed-off-by: Russell King

    Russell King
     

25 Oct, 2013

1 commit

  • ASoC: Updates for v3.13

    - Further work on the dmaengine helpers, including support for
    configuring the parameters for DMA by reading the capabilities of the
    DMA controller which removes some guesswork and magic numbers fromm
    drivers.
    - A refresh of the documentation.
    - Conversions of many drivers to direct regmap API usage in order to
    allow the ASoC level register I/O code to be removed, this will
    hopefully be completed by v3.14.
    - Support for using async register I/O in DAPM, reducing the time taken
    to implement power transitions on systems that support it.

    Takashi Iwai
     

17 Oct, 2013

1 commit


14 Oct, 2013

2 commits


26 Sep, 2013

1 commit

  • i386 allmodconfig:

    sound/soc/atmel/atmel-pcm.c: In function 'atmel_pcm_preallocate_dma_buffer':
    sound/soc/atmel/atmel-pcm.c:52: warning: cast to pointer from integer of different size

    Signed-off-by: Andrew Morton
    Signed-off-by: Mark Brown

    Andrew Morton
     

04 Sep, 2013

1 commit

  • As once the error interrupt is triggered, it can not be cleared.
    So, disable it.

    No side effect found while testing on sama5d3xek and at91sam9x5ek
    boards.

    Signed-off-by: Bo Shen
    Acked-by: Nicolas Ferre
    Signed-off-by: Mark Brown

    Bo Shen
     

22 Aug, 2013

1 commit


07 Aug, 2013

1 commit

  • Description of the Asoc machine driver for an at91sam9x5 based board
    with a wm8731 audio DAC. Wm8731 is clocked by a crystal and used as a
    master on the SSC/I2S interface. Its connections are a headphone jack
    and an Line input jack.

    [Richard: this is based on an old patch from Nicolas that I forward
    ported and reworked to use only device tree]

    Signed-off-by: Nicolas Ferre
    Signed-off-by: Richard Genoud
    Signed-off-by: Mark Brown

    Nicolas Ferre
     

20 Jul, 2013

1 commit


16 Jul, 2013

1 commit


15 Jul, 2013

4 commits


13 May, 2013

1 commit


18 Apr, 2013

1 commit


17 Apr, 2013

1 commit

  • Refactor the dmaengine PCM library to allow the DMA channel to be requested
    before opening a PCM substream. snd_dmaengine_pcm_open() now expects a DMA
    channel instead of a filter function and filter parameter as its parameters.
    snd_dmaengine_pcm_close() is updated to not release the DMA channel. This allows
    a dmaengine based PCM driver to request its channels before the substream is
    opened.

    The patch also introduces two new functions, snd_dmaengine_pcm_open_request_chan()
    and snd_dmaengine_pcm_close_release_chan(), which have the same signature and
    behaviour of the old snd_dmaengine_pcm_{open,close}() and internally use the new
    variants of these functions. All users of snd_dmaengine_pcm_{open,close}() are
    updated to use snd_dmaengine_pcm_open_request_chan() and
    snd_dmaengine_pcm_close_release_chan().

    Signed-off-by: Lars-Peter Clausen
    Tested-by: Stephen Warren
    Tested-by: Shawn Guo
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     

12 Apr, 2013

2 commits


04 Apr, 2013

1 commit


27 Mar, 2013

1 commit


26 Mar, 2013

2 commits


04 Mar, 2013

1 commit


05 Feb, 2013

4 commits


24 Dec, 2012

1 commit


09 Dec, 2012

1 commit


02 Dec, 2012

2 commits

  • Specify overrun bit in interrupt mask
    Add dmaengine specific routines

    Signed-off-by: Nicolas Ferre
    [voice.shen@atmel.com: adapt to soc dmaengine framework]
    Signed-off-by: Bo Shen
    Signed-off-by: Mark Brown

    Bo Shen
     
  • This patch is split original atmel-pcm.c into new atmel-pcm.c and
    atmel-pcm-pdc.c two files. The new atmel-pcm.c is the share routine
    while will be used for pdc or dma transfer.

    Using SND_ATMEL_SOC_PDC to select using PDC for audio transfer

    Signed-off-by: Bo Shen
    Signed-off-by: Mark Brown

    Bo Shen
     

16 Nov, 2012

3 commits


06 Nov, 2012

1 commit


02 Feb, 2012

2 commits