本文整理汇总了C++中request_dma函数的典型用法代码示例。如果您正苦于以下问题:C++ request_dma函数的具体用法?C++ request_dma怎么用?C++ request_dma使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了request_dma函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: znet_request_resources
/* Request needed resources */
static int znet_request_resources (struct net_device *dev)
{
struct znet_private *znet = netdev_priv(dev);
if (request_irq (dev->irq, znet_interrupt, 0, "ZNet", dev))
goto failed;
if (request_dma (znet->rx_dma, "ZNet rx"))
goto free_irq;
if (request_dma (znet->tx_dma, "ZNet tx"))
goto free_rx_dma;
if (!request_region (znet->sia_base, znet->sia_size, "ZNet SIA"))
goto free_tx_dma;
if (!request_region (dev->base_addr, znet->io_size, "ZNet I/O"))
goto free_sia;
return 0; /* Happy ! */
free_sia:
release_region (znet->sia_base, znet->sia_size);
free_tx_dma:
free_dma (znet->tx_dma);
free_rx_dma:
free_dma (znet->rx_dma);
free_irq:
free_irq (dev->irq, dev);
failed:
return -1;
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:29,代码来源:znet.c
示例2: blackfin_dma_init
static int __init blackfin_dma_init(void)
{
int i;
printk(KERN_INFO "Blackfin DMA Controller\n");
#if ANOMALY_05000480
bfin_write_DMAC_TC_PER(0x0111);
#endif
for (i = 0; i < MAX_DMA_CHANNELS; i++) {
atomic_set(&dma_ch[i].chan_status, 0);
dma_ch[i].regs = dma_io_base_addr[i];
}
request_dma(CH_MEM_STREAM0_DEST, "Blackfin dma_memcpy");
request_dma(CH_MEM_STREAM0_SRC, "Blackfin dma_memcpy");
#if defined(CONFIG_DEB_DMA_URGENT)
bfin_write_EBIU_DDRQUE(bfin_read_EBIU_DDRQUE()
| DEB1_URGENT | DEB2_URGENT | DEB3_URGENT);
#endif
return 0;
}
开发者ID:Blackburn29,项目名称:PsycoKernel,代码行数:26,代码来源:bfin_dma.c
示例3: bfin_sir_startup
static int bfin_sir_startup(struct bfin_sir_port *port, struct net_device *dev)
{
#ifdef CONFIG_SIR_BFIN_DMA
dma_addr_t dma_handle;
#endif /* CONFIG_SIR_BFIN_DMA */
if (request_dma(port->rx_dma_channel, "BFIN_UART_RX") < 0) {
dev_warn(&dev->dev, "Unable to attach SIR RX DMA channel\n");
return -EBUSY;
}
if (request_dma(port->tx_dma_channel, "BFIN_UART_TX") < 0) {
dev_warn(&dev->dev, "Unable to attach SIR TX DMA channel\n");
free_dma(port->rx_dma_channel);
return -EBUSY;
}
#ifdef CONFIG_SIR_BFIN_DMA
set_dma_callback(port->rx_dma_channel, bfin_sir_dma_rx_int, dev);
set_dma_callback(port->tx_dma_channel, bfin_sir_dma_tx_int, dev);
port->rx_dma_buf.buf = dma_alloc_coherent(NULL, PAGE_SIZE,
&dma_handle, GFP_DMA);
port->rx_dma_buf.head = 0;
port->rx_dma_buf.tail = 0;
port->rx_dma_nrows = 0;
set_dma_config(port->rx_dma_channel,
set_bfin_dma_config(DIR_WRITE, DMA_FLOW_AUTO,
INTR_ON_ROW, DIMENSION_2D,
DATA_SIZE_8, DMA_SYNC_RESTART));
set_dma_x_count(port->rx_dma_channel, DMA_SIR_RX_XCNT);
set_dma_x_modify(port->rx_dma_channel, 1);
set_dma_y_count(port->rx_dma_channel, DMA_SIR_RX_YCNT);
set_dma_y_modify(port->rx_dma_channel, 1);
set_dma_start_addr(port->rx_dma_channel, (unsigned long)port->rx_dma_buf.buf);
enable_dma(port->rx_dma_channel);
port->rx_dma_timer.data = (unsigned long)(dev);
port->rx_dma_timer.function = (void *)bfin_sir_rx_dma_timeout;
#else
if (request_irq(port->irq, bfin_sir_rx_int, 0, "BFIN_SIR_RX", dev)) {
dev_warn(&dev->dev, "Unable to attach SIR RX interrupt\n");
return -EBUSY;
}
if (request_irq(port->irq+1, bfin_sir_tx_int, 0, "BFIN_SIR_TX", dev)) {
dev_warn(&dev->dev, "Unable to attach SIR TX interrupt\n");
free_irq(port->irq, dev);
return -EBUSY;
}
#endif
return 0;
}
开发者ID:513855417,项目名称:linux,代码行数:58,代码来源:bfin_sir.c
示例4: snd_ad1816a_create
int snd_ad1816a_create(struct snd_card *card,
unsigned long port, int irq, int dma1, int dma2,
struct snd_ad1816a *chip)
{
static struct snd_device_ops ops = {
.dev_free = snd_ad1816a_dev_free,
};
int error;
chip->irq = -1;
chip->dma1 = -1;
chip->dma2 = -1;
if ((chip->res_port = request_region(port, 16, "AD1816A")) == NULL) {
snd_printk(KERN_ERR "ad1816a: can't grab port 0x%lx\n", port);
snd_ad1816a_free(chip);
return -EBUSY;
}
if (request_irq(irq, snd_ad1816a_interrupt, 0, "AD1816A", (void *) chip)) {
snd_printk(KERN_ERR "ad1816a: can't grab IRQ %d\n", irq);
snd_ad1816a_free(chip);
return -EBUSY;
}
chip->irq = irq;
if (request_dma(dma1, "AD1816A - 1")) {
snd_printk(KERN_ERR "ad1816a: can't grab DMA1 %d\n", dma1);
snd_ad1816a_free(chip);
return -EBUSY;
}
chip->dma1 = dma1;
if (request_dma(dma2, "AD1816A - 2")) {
snd_printk(KERN_ERR "ad1816a: can't grab DMA2 %d\n", dma2);
snd_ad1816a_free(chip);
return -EBUSY;
}
chip->dma2 = dma2;
chip->card = card;
chip->port = port;
spin_lock_init(&chip->lock);
if ((error = snd_ad1816a_probe(chip))) {
snd_ad1816a_free(chip);
return error;
}
snd_ad1816a_init(chip);
/* Register device */
if ((error = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
snd_ad1816a_free(chip);
return error;
}
return 0;
}
开发者ID:383530895,项目名称:linux,代码行数:56,代码来源:ad1816a_lib.c
示例5: sport_request_resource
static int sport_request_resource(struct sport_device *sport)
{
struct device *dev = &sport->pdev->dev;
int ret;
ret = peripheral_request_list(sport->pin_req, "soc-audio");
if (ret) {
dev_err(dev, "Unable to request sport pin\n");
return ret;
}
ret = request_dma(sport->tx_dma_chan, "SPORT TX Data");
if (ret) {
dev_err(dev, "Unable to allocate DMA channel for sport tx\n");
goto err_tx_dma;
}
set_dma_callback(sport->tx_dma_chan, sport_tx_irq, sport);
ret = request_dma(sport->rx_dma_chan, "SPORT RX Data");
if (ret) {
dev_err(dev, "Unable to allocate DMA channel for sport rx\n");
goto err_rx_dma;
}
set_dma_callback(sport->rx_dma_chan, sport_rx_irq, sport);
ret = request_irq(sport->tx_err_irq, sport_err_irq,
0, "SPORT TX ERROR", sport);
if (ret) {
dev_err(dev, "Unable to allocate tx error IRQ for sport\n");
goto err_tx_irq;
}
ret = request_irq(sport->rx_err_irq, sport_err_irq,
0, "SPORT RX ERROR", sport);
if (ret) {
dev_err(dev, "Unable to allocate rx error IRQ for sport\n");
goto err_rx_irq;
}
return 0;
err_rx_irq:
free_irq(sport->tx_err_irq, sport);
err_tx_irq:
free_dma(sport->rx_dma_chan);
err_rx_dma:
free_dma(sport->tx_dma_chan);
err_tx_dma:
peripheral_free_list(sport->pin_req);
return ret;
}
开发者ID:020gzh,项目名称:linux,代码行数:50,代码来源:bf6xx-sport.c
示例6: net_open
/* Open/initialize the board. This is called (in the current kernel)
sometime after booting when the 'ifconfig' program is run.
This routine should set everything up anew at each open, even
registers that "should" only need to be set once at boot, so that
there is non-reboot way to recover if something goes wrong.
*/
static int
net_open(struct device *dev)
{
struct net_local *lp = (struct net_local *)dev->priv;
int ioaddr = dev->base_addr;
/* This is used if the interrupt line can turned off (shared).
See 3c503.c for an example of selecting the IRQ at config-time. */
if (request_irq(dev->irq, &net_interrupt)) {
return -EAGAIN;
}
/* Always snarf a DMA channel after the IRQ. */
if (request_dma(dev->dma)) {
free_irq(dev->irq);
return -EAGAIN;
}
irq2dev_map[dev->irq] = dev;
/* Reset the hardware here. */
/*chipset_init(dev, 1);*/
outb(0x00, ioaddr);
lp->open_time = jiffies;
dev->tbusy = 0;
dev->interrupt = 0;
dev->start = 1;
return 0;
}
开发者ID:DreamLiMu,项目名称:Linux-Kernel-Study,代码行数:37,代码来源:skeleton.c
示例7: dma_init
static int dma_init(void) {
int ret;
/* Request DMA channel */
ret = request_dma(CH_PPI, DRIVER_NAME);
if(ret < 0) {
printk(KERN_WARNING DRIVER_NAME ": Could not allocate DMA channel\n");
return ret;
}
/* Disable channel while it is being configured */
disable_dma(CH_PPI);
/* Allocate buffer space for the DMA engine to use */
dma_buffer = __get_dma_pages(GFP_KERNEL, page_alloc_order(BUFFER_SIZE * BUFFER_COUNT));
if(dma_buffer == 0) {
printk(KERN_WARNING DRIVER_NAME ": Could not allocate dma_pages\n");
free_dma(CH_PPI);
return -ENOMEM;
}
/* Invalid caching on the DMA buffer */
invalidate_dcache_range(dma_buffer, dma_buffer + (BUFFER_SIZE * BUFFER_COUNT));
/* Set DMA configuration */
set_dma_start_addr(CH_PPI, dma_buffer);
set_dma_config(CH_PPI, (DMAFLOW_AUTO | WNR | RESTART | DI_EN | WDSIZE_16 | DMA2D | DI_SEL));
set_dma_x_count(CH_PPI, SAMPLES_PER_BUFFER * CHANNELS);
set_dma_x_modify(CH_PPI, SAMPLE_SIZE);
set_dma_y_count(CH_PPI, BUFFER_COUNT);
set_dma_y_modify(CH_PPI, SAMPLE_SIZE);
set_dma_callback(CH_PPI, &buffer_full_handler, NULL);
return 0;
}
开发者ID:ncsurobotics,项目名称:acoustics-old,代码行数:35,代码来源:ppiadc.c
示例8: ccat_dma_init
/**
* ccat_dma_init() - Initialize CCAT and host memory for DMA transfer
* @dma object for management data which will be initialized
* @channel number of the DMA channel
* @ioaddr of the pci bar2 configspace used to calculate the address of the pci dma configuration
* @dev which should be configured for DMA
*/
static int ccat_dma_init(struct ccat_dma_mem *const dma, size_t channel,
void __iomem * const bar2,
struct ccat_eth_fifo *const fifo)
{
void __iomem *const ioaddr = bar2 + 0x1000 + (sizeof(u64) * channel);
const dma_addr_t phys = CCAT_ALIGN_CHANNEL(dma->phys, channel);
const u32 phys_hi = (sizeof(phys) > sizeof(u32)) ? phys >> 32 : 0;
fifo->dma.start = CCAT_ALIGN_CHANNEL(dma->base, channel);
fifo_set_end(fifo, CCAT_ALIGNMENT);
if (request_dma(channel, KBUILD_MODNAME)) {
pr_info("request dma channel %llu failed\n", (u64) channel);
return -EINVAL;
}
/** bit 0 enables 64 bit mode on ccat */
iowrite32((u32) phys | ((phys_hi) > 0), ioaddr);
iowrite32(phys_hi, ioaddr + 4);
pr_debug
("DMA%llu mem initialized\n base: 0x%p\n start: 0x%p\n phys: 0x%09llx\n pci addr: 0x%01x%08x\n size: %llu |%llx bytes.\n",
(u64) channel, dma->base, fifo->dma.start, (u64) dma->phys,
ioread32(ioaddr + 4), ioread32(ioaddr),
(u64) dma->size, (u64) dma->size);
return 0;
}
开发者ID:synapticon,项目名称:Etherlab_EtherCAT_Master,代码行数:33,代码来源:netdev.c
示例9: pvr2_dma_init
static int __init pvr2_dma_init(void)
{
setup_irq(HW_EVENT_PVR2_DMA, &pvr2_dma_irq);
request_dma(PVR2_CASCADE_CHAN, "pvr2 cascade");
return register_dmac(&pvr2_dma_info);
}
开发者ID:150balbes,项目名称:Amlogic_s905-kernel,代码行数:7,代码来源:dma-pvr2.c
示例10: labpc_init_dma_chan
int labpc_init_dma_chan(struct comedi_device *dev, unsigned int dma_chan)
{
struct labpc_private *devpriv = dev->private;
void *dma_buffer;
unsigned long dma_flags;
int ret;
if (dma_chan != 1 && dma_chan != 3)
return -EINVAL;
dma_buffer = kmalloc(dma_buffer_size, GFP_KERNEL | GFP_DMA);
if (!dma_buffer)
return -ENOMEM;
ret = request_dma(dma_chan, dev->board_name);
if (ret) {
kfree(dma_buffer);
return ret;
}
devpriv->dma_buffer = dma_buffer;
devpriv->dma_chan = dma_chan;
devpriv->dma_addr = virt_to_bus(devpriv->dma_buffer);
dma_flags = claim_dma_lock();
disable_dma(devpriv->dma_chan);
set_dma_mode(devpriv->dma_chan, DMA_MODE_READ);
release_dma_lock(dma_flags);
return 0;
}
开发者ID:383530895,项目名称:linux,代码行数:31,代码来源:ni_labpc_isadma.c
示例11: wbsd_init_dma
static void wbsd_init_dma(struct wbsd_host* host)
{
host->dma = -1;
if (dma < 0)
return;
if (request_dma(dma, DRIVER_NAME))
goto err;
/*
* We need to allocate a special buffer in
* order for ISA to be able to DMA to it.
*/
host->dma_buffer = kmalloc(65536,
GFP_NOIO | GFP_DMA | __GFP_REPEAT | __GFP_NOWARN);
if (!host->dma_buffer)
goto free;
/*
* Translate the address to a physical address.
*/
host->dma_addr = isa_virt_to_bus(host->dma_buffer);
/*
* ISA DMA must be aligned on a 64k basis.
*/
if ((host->dma_addr & 0xffff) != 0)
goto kfree;
/*
* ISA cannot access memory above 16 MB.
*/
else if (host->dma_addr >= 0x1000000)
goto kfree;
host->dma = dma;
return;
kfree:
/*
* If we've gotten here then there is some kind of alignment bug
*/
BUG_ON(1);
kfree(host->dma_buffer);
host->dma_buffer = NULL;
free:
free_dma(dma);
err:
printk(KERN_WARNING DRIVER_NAME ": Unable to allocate DMA %d. "
"Falling back on FIFO.\n", dma);
}
开发者ID:prime5711,项目名称:blackbox,代码行数:55,代码来源:wbsd.c
示例12: xd_geninit
static void __init xd_geninit (void)
{
u8 i,controller;
unsigned int address;
for(i=0;i<(XD_MAXDRIVES << 6);i++)
xd_blocksizes[i] = 1024;
blksize_size[MAJOR_NR] = xd_blocksizes;
if (xd_detect(&controller,&address)) {
printk(KERN_INFO "Detected a%s controller (type %d) at address %06x\n",
xd_sigs[controller].name,controller,address);
if (!request_region(xd_iobase,4, "xd")) {
printk(KERN_ERR "xd: Ports at 0x%x are not available\n", xd_iobase);
return;
}
if (controller)
xd_sigs[controller].init_controller(address);
xd_drives = xd_initdrives(xd_sigs[controller].init_drive);
printk(KERN_INFO "Detected %d hard drive%s (using IRQ%d & DMA%d)\n",
xd_drives,xd_drives == 1 ? "" : "s",xd_irq,xd_dma);
for (i = 0; i < xd_drives; i++)
printk(KERN_INFO " xd%c: CHS=%d/%d/%d\n",'a'+i,
xd_info[i].cylinders,xd_info[i].heads,
xd_info[i].sectors);
}
if (xd_drives) {
if (!request_irq(xd_irq,xd_interrupt_handler, 0, "XT hard disk", NULL)) {
if (request_dma(xd_dma,"xd")) {
printk(KERN_ERR "xd: unable to get DMA%d\n",xd_dma);
free_irq(xd_irq, NULL);
}
}
else
printk(KERN_ERR "xd: unable to get IRQ%d\n",xd_irq);
}
/* xd_maxsectors depends on controller - so set after detection */
for(i=0; i<(XD_MAXDRIVES << 6); i++) xd_maxsect[i] = xd_maxsectors;
max_sectors[MAJOR_NR] = xd_maxsect;
for (i = 0; i < xd_drives; i++) {
xd_valid[i] = 1;
register_disk(&xd_gendisk, MKDEV(MAJOR_NR,i<<6), 1<<6, &xd_fops,
xd_info[i].heads * xd_info[i].cylinders *
xd_info[i].sectors);
}
xd_gendisk.nr_real = xd_drives;
}
开发者ID:SnkBitten,项目名称:amithlon4,代码行数:54,代码来源:xd.c
示例13: dac0800_init
void dac0800_init(void)
{
volatile unsigned char *mbarp, *dmap;
unsigned long imr;
unsigned int icr;
int result;
/* Register dac0800 as character device */
result = register_chrdev(DAC0800_MAJOR, "dac0800", &dac0800_fops);
if (result < 0) {
printk(KERN_WARNING "DAC0800: can't get major %d\n",
DAC0800_MAJOR);
return;
}
printk ("DAC0800: Copyright (C) 1999, Greg Ungerer "
"([email protected])\n");
/* Install ISR (interrupt service routine) */
result = request_irq(DAC0800_VEC, dac0800_isr, SA_INTERRUPT,
"DAC0800", NULL);
if (result) {
printk ("DAC0800: IRQ %d already in use\n", DAC0800_VEC);
return;
}
/* Set interrupt vector location */
dmap = (volatile unsigned char *) dma_base_addr[DAC0800_DMA_CHAN];
dmap[MCFDMA_DIVR] = DAC0800_VEC;
/* Set interrupt level and priority */
switch (DAC0800_DMA_CHAN) {
case 1: icr = MCFSIM_DMA1ICR ; imr = MCFSIM_IMR_DMA1; break;
case 2: icr = MCFSIM_DMA2ICR ; imr = MCFSIM_IMR_DMA2; break;
case 3: icr = MCFSIM_DMA3ICR ; imr = MCFSIM_IMR_DMA3; break;
default: icr = MCFSIM_DMA0ICR ; imr = MCFSIM_IMR_DMA0; break;
}
mbarp = (volatile unsigned char *) MCF_MBAR;
mbarp[icr] = MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1;
mcf_setimr(mcf_getimr() & ~imr);
/* Request DMA channel */
printk ("DAC0800: requesting DMA channel %d\n", DAC0800_DMA_CHAN);
result = request_dma(DAC0800_DMA_CHAN, "dac0800");
if (result) {
printk ("DAC0800: dma channel %d already in use\n",
DAC0800_DMA_CHAN);
return;
}
/* Program default timer rate */
dac0800_setclk(8000);
}
开发者ID:robacklin,项目名称:uclinux-linux,代码行数:54,代码来源:dac0800.c
示例14: sscape_pnp_alloc_dma
static int sscape_pnp_alloc_dma(sscape_info* devc)
{
/* printk(KERN_INFO "sscape: requesting dma\n"); */
if (request_dma(devc -> dma, "sscape")) return 0;
/* printk(KERN_INFO "sscape: dma channel allocated\n"); */
if (!sscape_alloc_dma(devc)) {
free_dma(devc -> dma);
return 0;
};
return 1;
}
开发者ID:GunioRobot,项目名称:MI424WR_GEN2_Rev_E-F,代码行数:11,代码来源:sscape.c
示例15: sound_alloc_dma
int
sound_alloc_dma (int chn, char *deviceID)
{
int err;
if ((err = request_dma (chn, deviceID)) != 0)
return err;
dma_alloc_map[chn] = DMA_MAP_FREE;
return 0;
}
开发者ID:rohsaini,项目名称:mkunity,代码行数:12,代码来源:soundcard.c
示例16: blackfin_dma_init
static int __init blackfin_dma_init(void)
{
int i;
printk(KERN_INFO "Blackfin DMA Controller\n");
for (i = 0; i < MAX_DMA_CHANNELS; i++) {
atomic_set(&dma_ch[i].chan_status, 0);
dma_ch[i].regs = dma_io_base_addr[i];
}
/* Mark MEMDMA Channel 0 as requested since we're using it internally */
request_dma(CH_MEM_STREAM0_DEST, "Blackfin dma_memcpy");
request_dma(CH_MEM_STREAM0_SRC, "Blackfin dma_memcpy");
#if defined(CONFIG_DEB_DMA_URGENT)
bfin_write_EBIU_DDRQUE(bfin_read_EBIU_DDRQUE()
| DEB1_URGENT | DEB2_URGENT | DEB3_URGENT);
#endif
return 0;
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:21,代码来源:bfin_dma_5xx.c
示例17: pg_dma_init
static int __init pg_dma_init(void)
{
int ret;
ret = request_dma(dma_channel, "page ops");
if (ret != 0)
return ret;
copy_page = copy_page_dma;
clear_page = clear_page_dma;
return ret;
}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:13,代码来源:pg-dma.c
示例18: pvr2_dma_init
static int __init pvr2_dma_init(void)
{
int i, base;
setup_irq(HW_EVENT_PVR2_DMA, &pvr2_dma_irq);
request_dma(PVR2_CASCADE_CHAN, "pvr2 cascade");
/* PVR2 cascade comes after on-chip DMAC */
base = ONCHIP_NR_DMA_CHANNELS;
for (i = 0; i < PVR2_NR_DMA_CHANNELS; i++)
dma_info[base + i].ops = &pvr2_dma_ops;
return register_dmac(&pvr2_dma_ops);
}
开发者ID:12019,项目名称:hg556a_source,代码行数:15,代码来源:dma-pvr2.c
示例19: dmabrg_init
static int __init dmabrg_init(void)
{
unsigned long or;
int ret;
dmabrg_handlers = kzalloc(10 * sizeof(struct dmabrg_handler),
GFP_KERNEL);
if (!dmabrg_handlers)
return -ENOMEM;
#ifdef CONFIG_SH_DMA
/* request DMAC channel 0 before anyone else can get it */
ret = request_dma(0, "DMAC 0 (DMABRG)");
if (ret < 0)
printk(KERN_INFO "DMABRG: DMAC ch0 not reserved!\n");
#endif
__raw_writel(0, DMABRGCR);
__raw_writel(0, DMACHCR0);
__raw_writel(0x94000000, DMARSRA); /* enable DMABRG in DMAC 0 */
/* enable DMABRG mode, enable the DMAC */
or = __raw_readl(DMAOR);
__raw_writel(or | DMAOR_BRG | DMAOR_DMEN, DMAOR);
ret = request_irq(DMABRGI0, dmabrg_irq, 0,
"DMABRG USB address error", NULL);
if (ret)
goto out0;
ret = request_irq(DMABRGI1, dmabrg_irq, 0,
"DMABRG Transfer End", NULL);
if (ret)
goto out1;
ret = request_irq(DMABRGI2, dmabrg_irq, 0,
"DMABRG Transfer Half", NULL);
if (ret == 0)
return ret;
free_irq(DMABRGI1, NULL);
out1: free_irq(DMABRGI0, NULL);
out0: kfree(dmabrg_handlers);
return ret;
}
开发者ID:adis1313,项目名称:android_kernel_samsung_msm8974,代码行数:45,代码来源:dmabrg.c
示例20: test_request_free_channels
/**
* test_request_free_channels - Tests request_dma for all the channels. It
* assumes all channels are free. It requests all the channels and expect to
* get 0 as return value
*
* returns: 0 - success
* -1 - failure
*/
static int test_request_free_channels(void)
{
int status = 0;
unsigned int i;
int st;
PDBG("inside test_request_free_channels\n");
for (i = 0; i < TEST_MAX_CHANNELS; i++) {
st = request_dma(i, DRIVER_NAME);
if (st == 0) {
PDBG("request_dma(%d) free = %d %s\n", i, st, PASS);
} else {
PDBG("request_dma(%d) free = %d %s\n", i, st, FAIL);
status = -1;
}
}
PINFO("test_request_free_channels %s\n", (status ? FAIL : PASS));
return status;
}
开发者ID:Analias,项目名称:SNOWLeo-SDR-1,代码行数:29,代码来源:pl330_test.c
注:本文中的request_dma函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论