14 Feb, 2014

1 commit


04 Dec, 2013

1 commit


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
     

06 Nov, 2013

1 commit


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
     

29 Oct, 2013

1 commit


18 Oct, 2013

1 commit

  • PXA25x also shows some problems when using interrupts during reset
    handling. Thus do not use interrupts on all pxa kinds (to detect codec
    ready state). Instead use a common mdelay-loop on all platforms to
    detect codecs becoming ready.

    Signed-off-by: Dmitry Eremin-Solenikov
    Signed-off-by: Mark Brown

    Dmitry Eremin-Solenikov
     

15 Aug, 2013

1 commit

  • Use snd_dmaengine_dai_dma_data for passing the dma parameters from
    clients to the pxa pcm lib. This does no functional change, it's just an
    intermedia step to migrate the pxa bits over to dmaengine.

    The calculation of dcmd is a transition hack which will be removed again
    in a later patch. It's just there to make the transition more readable.

    Signed-off-by: Daniel Mack
    Acked-by: Mark Brown
    Signed-off-by: Mark Brown

    Daniel Mack
     

16 Jul, 2013

1 commit


29 May, 2013

1 commit


23 May, 2013

1 commit


08 Jan, 2013

3 commits

  • This patch does nothing functionally, it just gives the function a new name and
    modifies the prototype slightly in order to clarify what the function is doing
    (which is not necessarily asserting the reset).
    Some commentary also added.

    Tested on a palm treo 680 machine.

    Signed-off-by: Mike Dunn
    Acked-by: Igor Grinberg
    Signed-off-by: Mark Brown

    Mike Dunn
     
  • This patch fixes some code that implements a work-around to a hardware bug in
    the ac97 controller on the pxa27x. A bug in the controller's warm reset
    functionality requires that the mfp used by the controller as the AC97_nRESET
    line be temporarily reconfigured as a generic output gpio (AF0) and manually
    held high for the duration of the warm reset cycle. This is what was done in
    the original code, but it was broken long ago by commit fb1bf8cd
    ([ARM] pxa: introduce processor specific pxa27x_assert_ac97reset())
    which changed the mfp to a GPIO input instead of a high output.

    The fix requires the ac97 controller to obtain the gpio via gpio_request_one(),
    with arguments that configure the gpio as an output initially driven high.

    Tested on a palm treo 680 machine. Reportedly, this broken code only prevents a
    warm reset on hardware that lacks a pull-up on the line, which appears to be the
    case for me.

    Signed-off-by: Mike Dunn
    Signed-off-by: Igor Grinberg
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Mike Dunn
     
  • Cold reset on the pxa27x currently fails and

    pxa2xx_ac97_try_cold_reset: cold reset timeout (GSR=0x44)

    appears in the kernel log. Through trial-and-error (the pxa270 developer's
    manual is mostly incoherent on the topic of ac97 reset), I got cold reset to
    complete by setting the WARM_RST bit in the GCR register (and later noticed that
    pxa3xx does this for cold reset as well). Also, a timeout loop is needed to
    wait for the reset to complete.

    Tested on a palm treo 680 machine.

    Signed-off-by: Mike Dunn
    Acked-by: Igor Grinberg
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Mike Dunn
     

07 Dec, 2012

2 commits

  • CONFIG_HOTPLUG is going away as an option. As result the __dev*
    markings will be going away.

    Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
    and __devexit.

    Signed-off-by: Bill Pemberton
    Cc: Eric Miao
    Cc: Russell King
    Cc: Haojian Zhuang
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Takashi Iwai

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option. As result the __dev*
    markings will be going away.

    Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
    and __devexit.

    Signed-off-by: Bill Pemberton
    Cc: Russell King
    Signed-off-by: Takashi Iwai

    Bill Pemberton
     

09 Aug, 2012

1 commit


03 Jul, 2012

1 commit


30 Mar, 2012

2 commits

  • Pull "ARM: cleanups of io includes" from Olof Johansson:
    "Rob Herring has done a sweeping change cleaning up all of the
    mach/io.h includes, moving some of the oft-repeated macros to a common
    location and removing a bunch of boiler plate. This is another step
    closer to a common zImage for multiple platforms."

    Fix up various fairly trivial conflicts ( removal vs changes
    around it, tegra localtimer.o is *still* gone, yadda-yadda).

    * tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (29 commits)
    ARM: tegra: Include assembler.h in sleep.S to fix build break
    ARM: pxa: use common IOMEM definition
    ARM: dma-mapping: convert ARCH_HAS_DMA_SET_COHERENT_MASK to kconfig symbol
    ARM: __io abuse cleanup
    ARM: create a common IOMEM definition
    ARM: iop13xx: fix missing declaration of iop13xx_init_early
    ARM: fix ioremap/iounmap for !CONFIG_MMU
    ARM: kill off __mem_pci
    ARM: remove bunch of now unused mach/io.h files
    ARM: make mach/io.h include optional
    ARM: clps711x: remove unneeded include of mach/io.h
    ARM: dove: add explicit include of dove.h to addr-map.c
    ARM: at91: add explicit include of hardware.h to uncompressor
    ARM: ep93xx: clean-up mach/io.h
    ARM: tegra: clean-up mach/io.h
    ARM: orion5x: clean-up mach/io.h
    ARM: davinci: remove unneeded mach/io.h include
    [media] davinci: remove includes of mach/io.h
    ARM: OMAP: Remove remaining includes for mach/io.h
    ARM: msm: clean-up mach/io.h
    ...

    Linus Torvalds
     
  • Pull more ARM updates from Russell King.

    This got a fair number of conflicts with the split, but
    also with some other sparse-irq and header file include cleanups. They
    all looked pretty trivial, though.

    * 'for-linus' of git://git.linaro.org/people/rmk/linux-arm: (59 commits)
    ARM: fix Kconfig warning for HAVE_BPF_JIT
    ARM: 7361/1: provide XIP_VIRT_ADDR for no-MMU builds
    ARM: 7349/1: integrator: convert to sparse irqs
    ARM: 7259/3: net: JIT compiler for packet filters
    ARM: 7334/1: add jump label support
    ARM: 7333/2: jump label: detect %c support for ARM
    ARM: 7338/1: add support for early console output via semihosting
    ARM: use set_current_blocked() and block_sigmask()
    ARM: exec: remove redundant set_fs(USER_DS)
    ARM: 7332/1: extract out code patch function from kprobes
    ARM: 7331/1: extract out insn generation code from ftrace
    ARM: 7330/1: ftrace: use canonical Thumb-2 wide instruction format
    ARM: 7351/1: ftrace: remove useless memory checks
    ARM: 7316/1: kexec: EOI active and mask all interrupts in kexec crash path
    ARM: Versatile Express: add NO_IOPORT
    ARM: get rid of asm/irq.h in asm/prom.h
    ARM: 7319/1: Print debug info for SIGBUS in user faults
    ARM: 7318/1: gic: refactor irq_start assignment
    ARM: 7317/1: irq: avoid NULL check in for_each_irq_desc loop
    ARM: 7315/1: perf: add support for the Cortex-A7 PMU
    ...

    Linus Torvalds
     

26 Mar, 2012

1 commit

  • pxa was missed in the moving of IOMEM to a common definition, so lots of
    IOMEM redefined warnings were introduced. So remove pxa IOMEM definition
    and fix all the fallout.

    Reported-by: Paul Gortmaker
    Signed-off-by: Rob Herring
    Cc: Eric Miao
    Cc: Russell King
    Cc: Haojian Zhuang
    Cc: Alessandro Zummo
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: rtc-linux@googlegroups.com
    Cc: alsa-devel@alsa-project.org

    Rob Herring
     

17 Mar, 2012

1 commit


26 Jan, 2012

1 commit


13 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (526 commits)
    ASoC: twl6040 - Add method to query optimum PDM_DL1 gain
    ALSA: hda - Fix the lost power-setup of seconary pins after PM resume
    ALSA: usb-audio: add Yamaha MOX6/MOX8 support
    ALSA: virtuoso: add S/PDIF input support for all Xonars
    ALSA: ice1724 - Support for ooAoo SQ210a
    ALSA: ice1724 - Allow card info based on model only
    ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations
    ALSA: hdspm - Provide unique driver id based on card serial
    ASoC: Dynamically allocate the rtd device for a non-empty release()
    ASoC: Fix recursive dependency due to select ATMEL_SSC in SND_ATMEL_SOC_SSC
    ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs
    ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs
    ALSA: hda - Use auto-parser for HP laptops with cx20459 codec
    ALSA: asihpi - Fix potential Oops in snd_asihpi_cmode_info()
    ALSA: hdsp - Fix potential Oops in snd_hdsp_info_pref_sync_ref()
    ALSA: hda/cirrus - support for iMac12,2 model
    ASoC: cx20442: add bias control over a platform provided regulator
    ALSA: usb-audio - Avoid flood of frame-active debug messages
    ALSA: snd-usb-us122l: Delete calls to preempt_disable
    mfd: Put WM8994 into cache only mode when suspending
    ...

    Fix up trivial conflicts in:
    - arch/arm/mach-s3c64xx/mach-crag6410.c:
    renamed speyside_wm8962 to tobermory, added littlemill right
    next to it
    - drivers/base/regmap/{regcache.c,regmap.c}:
    duplicate diff that had already come in with other changes in
    the regmap tree

    Linus Torvalds
     

28 Nov, 2011

1 commit


22 Nov, 2011

1 commit


01 Nov, 2011

1 commit


22 Sep, 2011

1 commit

  • Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled],
    We run all interrupt handlers with interrupts disabled
    and we even check and yell when an interrupt handler
    returns with interrupts enabled (see commit [b738a50a:
    genirq: Warn when handler enables interrupts]).

    So now this flag is a NOOP and can be removed.

    Signed-off-by: Yong Zhang
    Acked-by: Peter Ujfalusi
    Acked-by: Mark Brown
    Signed-off-by: Takashi Iwai

    Yong Zhang
     

03 Apr, 2011

2 commits


17 Mar, 2011

1 commit


24 Feb, 2011

1 commit


07 Feb, 2011

1 commit

  • The AACI TRM requires the MAINCR enable bit to be held zero for two
    bitclk cycles plus three apb_pclk cycles. Use a delay of 1us to
    ensure this.

    Ensure that writes to MAINCR to change the addressed codec only happen
    when required, and that they take effect in a similar manner to the
    above, otherwise we seem to occasionally have stuck slot busy bits.

    Signed-off-by: Russell King

    Russell King
     

27 Jan, 2011

5 commits


26 Jan, 2011

2 commits

  • AC'97 codecs only support two channels for recording, so we shouldn't
    advertize that there are up to six channels available. Limit the
    selection of 4 and 6 channel audio to playback only.

    As this adds additional SNDRV_PCM_STREAM_PLAYBACK conditionals, we can
    combine some resulting in the elimination of __aaci_pcm_open() entirely,
    and making the code easier to read.

    Signed-off-by: Russell King

    Russell King
     
  • Claiming the IRQ each time a playback or capture interface is opened
    is wasteful; the second copy of the registered handler is identical to
    the first and just wastes resources. Track the number of opens and
    only register the handler when necessary.

    Signed-off-by: Russell King

    Russell King