/* * at91-pcm.h - ALSA PCM interface for the Atmel AT91 SoC. * * Copyright (C) 2005 SAN People * Copyright (C) 2008 Atmel * * Authors: Sedji Gaouaou * * Based on at91-pcm. by: * Frank Mandarino * Copyright 2006 Endrelia Technologies Inc. * * Based on pxa2xx-pcm.c by: * * Author: Nicolas Pitre * Created: Nov 30, 2004 * Copyright: (C) 2004 MontaVista Software, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ATMEL_PCM_H #define _ATMEL_PCM_H #include #define ATMEL_SSC_DMABUF_SIZE (64 * 1024) /* * Registers and status bits that are required by the PCM driver. */ struct atmel_pdc_regs { unsigned int xpr; /* PDC recv/trans pointer */ unsigned int xcr; /* PDC recv/trans counter */ unsigned int xnpr; /* PDC next recv/trans pointer */ unsigned int xncr; /* PDC next recv/trans counter */ unsigned int ptcr; /* PDC transfer control */ }; struct atmel_ssc_mask { u32 ssc_enable; /* SSC recv/trans enable */ u32 ssc_disable; /* SSC recv/trans disable */ u32 ssc_error; /* SSC error conditions */ u32 ssc_endx; /* SSC ENDTX or ENDRX */ u32 ssc_endbuf; /* SSC TXBUFE or RXBUFF */ u32 pdc_enable; /* PDC recv/trans enable */ u32 pdc_disable; /* PDC recv/trans disable */ }; /* * This structure, shared between the PCM driver and the interface, * contains all information required by the PCM driver to perform the * PDC DMA operation. All fields except dma_intr_handler() are initialized * by the interface. The dma_intr_handler() pointer is set by the PCM * driver and called by the interface SSC interrupt handler if it is * non-NULL. */ struct atmel_pcm_dma_params { char *name; /* stream identifier */ int pdc_xfer_size; /* PDC counter increment in bytes */ struct ssc_device *ssc; /* SSC device for stream */ struct atmel_pdc_regs *pdc; /* PDC receive or transmit registers */ struct atmel_ssc_mask *mask; /* SSC & PDC status bits */ struct snd_pcm_substream *substream; void (*dma_intr_handler)(u32, struct snd_pcm_substream *); }; /* * SSC register access (since ssc_writel() / ssc_readl() require literal name) */ #define ssc_readx(base, reg) (__raw_readl((base) + (reg))) #define ssc_writex(base, reg, value) __raw_writel((value), (base) + (reg)) #if defined(CONFIG_SND_ATMEL_SOC_PDC) || \ defined(CONFIG_SND_ATMEL_SOC_PDC_MODULE) int atmel_pcm_pdc_platform_register(struct device *dev); void atmel_pcm_pdc_platform_unregister(struct device *dev); #else static inline int atmel_pcm_pdc_platform_register(struct device *dev) { return 0; } static inline void atmel_pcm_pdc_platform_unregister(struct device *dev) { } #endif #if defined(CONFIG_SND_ATMEL_SOC_DMA) || \ defined(CONFIG_SND_ATMEL_SOC_DMA_MODULE) int atmel_pcm_dma_platform_register(struct device *dev); void atmel_pcm_dma_platform_unregister(struct device *dev); #else static inline int atmel_pcm_dma_platform_register(struct device *dev) { return 0; } static inline void atmel_pcm_dma_platform_unregister(struct device *dev) { } #endif #endif /* _ATMEL_PCM_H */ e='context' onchange='this.form.submit();'>space:mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-06 19:36:04 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-06 19:36:04 -0800
commit8b1b41ee74f9712c355d66dc105bbea663ae0afd (patch)
tree4c3f410f3cb01c7b00b474e376a60f27a7ff99a8 /drivers/usb/isp1760
parentf7d6040aa45df6ffd9e891114125dc919f18b96b (diff)
parentbfb34527a32a1a576d9bfb7026d3ab0369a6cd60 (diff)
Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull libnvdimm fixes from Dan Williams: "None of these are showstoppers for 4.10 and could wait for 4.11 merge window, but they are low enough risk for this late in the cycle and the fixes have waiting users . They have received a build success notification from the 0day robot, pass the latest ndctl unit tests, and appeared in next: - Fix a crash that can result when SIGINT is sent to a process that is awaiting completion of an address range scrub command. We were not properly cleaning up the workqueue after wait_event_interruptible(). - Fix a memory hotplug failure condition that results from not reserving enough space out of persistent memory for the memmap. By default we align to 2M allocations that the memory hotplug code assumes, but if the administrator specifies a non-default 4K-alignment then we can fail to correctly size the reservation. - A one line fix to improve the predictability of libnvdimm block device names. A common operation is to reconfigure /dev/pmem0 into a different mode. For example, a reconfiguration might set a new mode that reserves some of the capacity for a struct page memmap array. It surprises users if the device name changes to "/dev/pmem0.1" after the mode change and then back to /dev/pmem0 after a reboot. - Add 'const' to some function pointer tables" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: libnvdimm, pfn: fix memmap reservation size versus 4K alignment acpi, nfit: fix acpi_nfit_flush_probe() crash libnvdimm, namespace: do not delete namespace-id 0 nvdimm: constify device_type structures
Diffstat (limited to 'drivers/usb/isp1760')