当前位置: 首页>>代码示例>>C++>>正文


C++ dma_rdreg函数代码示例

本文整理汇总了C++中dma_rdreg函数的典型用法代码示例。如果您正苦于以下问题:C++ dma_rdreg函数的具体用法?C++ dma_rdreg怎么用?C++ dma_rdreg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dma_rdreg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: s3c2410_dma_dostop

static int s3c2410_dma_dostop(struct s3c2410_dma_chan *chan)
{
	unsigned long flags;
	unsigned long tmp;

	pr_debug("%s:\n", __func__);

	dbg_showchan(chan);

	local_irq_save(flags);

	s3c2410_dma_call_op(chan,  S3C2410_DMAOP_STOP);

	tmp = dma_rdreg(chan, S3C2410_DMA_DMASKTRIG);
	tmp |= S3C2410_DMASKTRIG_STOP;
	//tmp &= ~S3C2410_DMASKTRIG_ON;
	dma_wrreg(chan, S3C2410_DMA_DMASKTRIG, tmp);

#if 0
	/* should also clear interrupts, according to WinCE BSP */
	tmp = dma_rdreg(chan, S3C2410_DMA_DCON);
	tmp |= S3C2410_DCON_NORELOAD;
	dma_wrreg(chan, S3C2410_DMA_DCON, tmp);
#endif

	/* should stop do this, or should we wait for flush? */
	chan->state      = S3C2410_DMA_IDLE;
	chan->load_state = S3C2410_DMALOAD_NONE;

	local_irq_restore(flags);

	return 0;
}
开发者ID:Lord-Devices,项目名称:cm_kernel_samsung_hlte,代码行数:33,代码来源:dma.c

示例2: s3c_dma_dump

void s3c_dma_dump(int dcon_num, int channel)
{
	unsigned long tmp;
	s3c_dma_controller_t *dma_controller = &s3c_dma_cntlrs[dcon_num];

	tmp = dma_rdreg(dma_controller, S3C_DMAC_INT_STATUS);
	printk("%d dcon_num %d subchnnel INT_STATUS %lx\n", dcon_num, channel, tmp);
	tmp = dma_rdreg(dma_controller, S3C_DMAC_INT_TCSTATUS);
	printk("%d dcon_num %d subchnnel INT_TCSTATUS %lx\n", dcon_num, channel, tmp);

	tmp = dma_rdreg(dma_controller, S3C_DMAC_ENBLD_CHANNELS);
	printk("%d dcon_num %d subchnnel ENBLD_CHANNELS %lx\n", dcon_num, channel, tmp);

	tmp = dma_rdreg(dma_controller, S3C_DMAC_CONFIGURATION);
	printk("%d dcon_num %d subchnnel DMAC_CONFIGUARATION %lx\n", dcon_num, channel, tmp);

	tmp = dma_rdreg(dma_controller, S3C_DMAC_CSRCADDR(channel));
	printk("%d dcon_num %d subchnnel SRCADDRESS %lx\n", dcon_num, channel, tmp);

	tmp = dma_rdreg(dma_controller, S3C_DMAC_CDESTADDR(channel));
	printk("%d dcon_num %d subchnnel DESTADDRESS %lx\n", dcon_num, channel, tmp);

	tmp = dma_rdreg(dma_controller, S3C_DMAC_CLLI(channel));
	printk("%d dcon_num %d subchnnel LLI %lx\n", dcon_num, channel, tmp);

	tmp = dma_rdreg(dma_controller, S3C_DMAC_CCONTROL0(channel));
	printk("%d dcon_num %d subchnnel CCONTROL0 %lx\n", dcon_num, channel, tmp);

	tmp = dma_rdreg(dma_controller, S3C_DMAC_CCONTROL1(channel));
	printk("%d dcon_num %d subchnnel CCONTROL1 %lx\n", dcon_num, channel, tmp);
	tmp = dma_rdreg(dma_controller, S3C_DMAC_CCONFIGURATION(channel));

	printk("%d dcon_num %d subchnnel CH CONFIGUARATION %lx\n", dcon_num, channel, tmp);
}
开发者ID:alsdpf,项目名称:o2droid,代码行数:34,代码来源:dma-pl080.c

示例3: dmadbg_capture

static void
dmadbg_capture(struct s3c2410_dma_chan *chan, struct s3c2410_dma_regstate *regs)
{
    regs->dcsrc    = dma_rdreg(chan, S3C2410_DMA_DCSRC);
    regs->disrc    = dma_rdreg(chan, S3C2410_DMA_DISRC);
    regs->dstat    = dma_rdreg(chan, S3C2410_DMA_DSTAT);
    regs->dcon     = dma_rdreg(chan, S3C2410_DMA_DCON);
    regs->dmsktrig = dma_rdreg(chan, S3C2410_DMA_DMASKTRIG);
}
开发者ID:antonywcl,项目名称:AR-5315u_PLD,代码行数:9,代码来源:dma.c

示例4: s3c_clear_interrupts

void s3c_clear_interrupts (int dcon_num, int channel)
{
	unsigned long tmp;
	s3c_dma_controller_t *dma_controller = &s3c_dma_cntlrs[dcon_num];
	
	tmp = dma_rdreg(dma_controller, S3C_DMAC_INT_TCCLEAR);
	tmp |= (1 << channel);
	dma_wrreg(dma_controller, S3C_DMAC_INT_TCCLEAR, tmp);

	tmp = dma_rdreg(dma_controller, S3C_DMAC_INT_ERRORCLEAR);
	tmp |= (1 << channel);
	dma_wrreg(dma_controller, S3C_DMAC_INT_ERRORCLEAR, tmp);
}
开发者ID:Asrake,项目名称:m8_android_kernel,代码行数:13,代码来源:dma-pl080.c

示例5: s3c2410_dma_getposition

int s3c2410_dma_getposition(dmach_t channel, dma_addr_t *src, dma_addr_t *dst)
{
 	s3c2410_dma_chan_t *chan = &s3c2410_chans[channel];

 	check_channel(channel);

	if (src != NULL)
 		*src = dma_rdreg(chan, S3C2410_DMA_DCSRC);

 	if (dst != NULL)
 		*dst = dma_rdreg(chan, S3C2410_DMA_DCDST);

 	return 0;
}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:14,代码来源:dma.c

示例6: s3c2410_dma_getposition

/*
 * s3c2410_dma_getposition
 * returns the current transfer points for the dma source and destination
 */
int s3c2410_dma_getposition(dmach_t channel, dma_addr_t *src, dma_addr_t *dst)
{
 	struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);

	if (chan == NULL)
		return -EINVAL;

	if (src != NULL)
 		*src = dma_rdreg(chan->dma_con, S3C_DMAC_SA(chan->number));

 	if (dst != NULL)
 		*dst = dma_rdreg(chan->dma_con, S3C_DMAC_DA(chan->number));

 	return 0;
}
开发者ID:illyah,项目名称:samsung_kernel_volans,代码行数:19,代码来源:dma-pl330.c

示例7: s3c2410_dma_getposition

/* 
 * s3c_dma_getposition
 * returns the current transfer points for the dma source and destination
 */
int s3c2410_dma_getposition(dmach_t channel, dma_addr_t *src, dma_addr_t *dst)
{
 	struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);

	if (chan == NULL)
		return -EINVAL;

	if (src != NULL)
 		*src = dma_rdreg(chan, S3C_DMAC_CxSRCADDR);
	
 	if (dst != NULL)
 		*dst = dma_rdreg(chan, S3C_DMAC_CxDESTADDR);

 	return 0;
}
开发者ID:Asrake,项目名称:m8_android_kernel,代码行数:19,代码来源:dma-pl080.c

示例8: s3c2410_dma_getposition

int s3c2410_dma_getposition(unsigned int channel, dma_addr_t *src, dma_addr_t *dst)
{
    struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);

    if (chan == NULL)
        return -EINVAL;

    if (src != NULL)
        *src = dma_rdreg(chan, S3C2410_DMA_DCSRC);

    if (dst != NULL)
        *dst = dma_rdreg(chan, S3C2410_DMA_DCDST);

    return 0;
}
开发者ID:antonywcl,项目名称:AR-5315u_PLD,代码行数:15,代码来源:dma.c

示例9: s3c_dma_flush_fifo

/*actively polling for the A bit can block the cpu*/
void s3c_dma_flush_fifo(struct s3c2410_dma_chan *chan)
{
	unsigned long tmp;
	
	tmp = dma_rdreg(chan, S3C_DMAC_CxCONFIGURATION);
	tmp |= S3C_DMACONFIG_HALT;
	dma_wrreg(chan, S3C_DMAC_CxCONFIGURATION, tmp);

	tmp = dma_rdreg(chan, S3C_DMAC_CxCONFIGURATION);
	
	/*this while loop can be very dangerous..may be put the process to sleep rather than waiting till fifo is drained */
	while (tmp & S3C_DMACONFIG_ACTIVE) {
		tmp = dma_rdreg(chan, S3C_DMAC_CxCONFIGURATION);
	}
}
开发者ID:Asrake,项目名称:m8_android_kernel,代码行数:16,代码来源:dma-pl080.c

示例10: s3c_dma_dostop

static int s3c_dma_dostop(struct s3c2410_dma_chan *chan) 
{
	unsigned long tmp;
	unsigned long flags;

	pr_debug("%s: DMA Channel No : %d\n", __FUNCTION__, chan->number);

	dbg_showchan(chan);

	local_irq_save(flags);

	s3c_dma_flush_fifo(chan);
	
	s3c_dma_call_op(chan, S3C2410_DMAOP_STOP);

	tmp = dma_rdreg(chan, S3C_DMAC_CxCONFIGURATION);
	
	tmp &= ~S3C_DMACONFIG_CHANNEL_ENABLE;
	dma_wrreg(chan, S3C_DMAC_CxCONFIGURATION, tmp);
	
	pr_debug("%s: S3C_DMAC_CxCONFIGURATION : %08x\n", __FUNCTION__, tmp);

	chan->state = S3C_DMA_IDLE;
	chan->load_state = S3C_DMALOAD_NONE;

	local_irq_restore(flags);

	return 0;
}
开发者ID:Asrake,项目名称:m8_android_kernel,代码行数:29,代码来源:dma-pl080.c

示例11: s3c_dma_dostop

static int s3c_dma_dostop(struct s3c2410_dma_chan *chan) 
{
	unsigned long tmp;
	unsigned long flags;

	pr_debug("%s: DMA Channel No : %d\n", __FUNCTION__, chan->number);

	dbg_showchan(chan);

	local_irq_save(flags);

    //Commenting out this function call(as its causing freeze) and even without this it adheres to  
    //ARM Primecell 080's disabling a DMA channel and losing data in the FIFO method 
	//s3c_dma_flush_fifo(chan);
	
	s3c_dma_call_op(chan, S3C2410_DMAOP_STOP);

	tmp = dma_rdreg(chan, S3C_DMAC_CxCONFIGURATION);
	
	tmp &= ~S3C_DMACONFIG_CHANNEL_ENABLE;
	dma_wrreg(chan, S3C_DMAC_CxCONFIGURATION, tmp);
	
	pr_debug("%s: S3C_DMAC_CxCONFIGURATION : %08x\n", __FUNCTION__, tmp);

	chan->state = S3C_DMA_IDLE;
	chan->load_state = S3C_DMALOAD_NONE;

	local_irq_restore(flags);

	return 0;
}
开发者ID:antibyte,项目名称:Samdroid-Turbo-Kernel,代码行数:31,代码来源:dma-pl080.c

示例12: s3c_disable_dmac

void s3c_disable_dmac(unsigned int dcon_num)
{
	unsigned long tmp;
	s3c_dma_controller_t *dma_controller = &s3c_dma_cntlrs[dcon_num];
	tmp = dma_rdreg(dma_controller, S3C_DMAC_CONFIGURATION);
	tmp &= ~S3C_DMA_CONTROLLER_ENABLE;
	dma_wrreg(dma_controller, S3C_DMAC_CONFIGURATION, tmp);
}
开发者ID:Asrake,项目名称:m8_android_kernel,代码行数:8,代码来源:dma-pl080.c

示例13: dma_test

void dma_test (int dcon_num, int channel)
{
	int tmp;
	
	s3c_dma_controller_t *dma_controller = &s3c_dma_cntlrs[dcon_num];

	dma_wrreg(dma_controller, S3C_DMAC_CONFIGURATION, S3C_DMA_CONTROLLER_ENABLE);
	tmp = dma_rdreg(dma_controller, S3C_DMAC_CONFIGURATION);
	printk("reg val %d\n", tmp);
	dma_wrreg(dma_controller, S3C_DMAC_CCONFIGURATION(channel), 0x01);
	tmp = dma_rdreg(dma_controller, S3C_DMAC_CCONFIGURATION(channel));

	printk("reg conf %x\n", tmp);
	dma_wrreg(dma_controller, S3C_DMAC_CCONTROL0(channel), 0x8ff02064);

	tmp = dma_rdreg(dma_controller, S3C_DMAC_CCONTROL0(channel));
	printk("reg ctrl %x\n", tmp);
}
开发者ID:Asrake,项目名称:m8_android_kernel,代码行数:18,代码来源:dma-pl080.c

示例14: s3c2410_dma_flush

static int s3c2410_dma_flush(struct s3c2410_dma_chan *chan)
{
    struct s3c2410_dma_buf *buf, *next;
    unsigned long flags;

    pr_debug("%s: chan %p (%d)\n", __func__, chan, chan->number);

    dbg_showchan(chan);

    local_irq_save(flags);

    if (chan->state != S3C2410_DMA_IDLE) {
        pr_debug("%s: stopping channel...\n", __func__ );
        s3c2410_dma_ctrl(chan->number, S3C2410_DMAOP_STOP);
    }

    buf = chan->curr;
    if (buf == NULL)
        buf = chan->next;

    chan->curr = chan->next = chan->end = NULL;

    if (buf != NULL) {
        for ( ; buf != NULL; buf = next) {
            next = buf->next;

            pr_debug("%s: free buffer %p, next %p\n",
                     __func__, buf, buf->next);

            s3c2410_dma_buffdone(chan, buf, S3C2410_RES_ABORT);
            s3c2410_dma_freebuf(buf);
        }
    }

    dbg_showregs(chan);

    s3c2410_dma_waitforstop(chan);

#if 0
    /* should also clear interrupts, according to WinCE BSP */
    {
        unsigned long tmp;

        tmp = dma_rdreg(chan, S3C2410_DMA_DCON);
        tmp |= S3C2410_DCON_NORELOAD;
        dma_wrreg(chan, S3C2410_DMA_DCON, tmp);
    }
#endif

    dbg_showregs(chan);

    local_irq_restore(flags);

    return 0;
}
开发者ID:antonywcl,项目名称:AR-5315u_PLD,代码行数:55,代码来源:dma.c

示例15: s3c2410_dma_waitforstop

static void s3c2410_dma_waitforstop(struct s3c2410_dma_chan *chan)
{
    unsigned long tmp;
    unsigned int timeout = 0x10000;

    while (timeout-- > 0) {
        tmp = dma_rdreg(chan, S3C2410_DMA_DMASKTRIG);

        if (!(tmp & S3C2410_DMASKTRIG_ON))
            return;
    }

    pr_debug("dma%d: failed to stop?\n", chan->number);
}
开发者ID:antonywcl,项目名称:AR-5315u_PLD,代码行数:14,代码来源:dma.c


注:本文中的dma_rdreg函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。