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


C++ dbg_showchan函数代码示例

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


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

示例1: s3c_dma_started

int s3c_dma_started(struct s3c2410_dma_chan *chan)
{
	unsigned long flags;

	local_irq_save(flags);

	dbg_showchan(chan);

	/* if we've only loaded one buffer onto the channel, then chec
	 * to see if we have another, and if so, try and load it so when
	 * the first buffer is finished, the new one will be loaded onto
	 * the channel */

	if (chan->next != NULL) {
		if (chan->load_state == S3C_DMALOAD_1LOADED) {

			if (s3c_dma_waitforload(chan, __LINE__) == 0) {
				pr_debug("%s: buff not yet loaded, no more todo\n",
					 __FUNCTION__);
			} else {
				chan->load_state = S3C_DMALOAD_1RUNNING;
				s3c_dma_loadbuffer(chan, chan->next);
			}

		} else if (chan->load_state == S3C_DMALOAD_1RUNNING) {
			s3c_dma_loadbuffer(chan, chan->next);
		}
	}

	local_irq_restore(flags);

	return 0;

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

示例2: s3c2410_dma_dostop

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

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

	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;
	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

	chan->state      = S3C2410_DMA_IDLE;
	chan->load_state = S3C2410_DMALOAD_NONE;

	local_irq_restore(flags);

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

示例3: s3c2410_dma_request

int s3c2410_dma_request(unsigned int channel,
			struct s3c2410_dma_client *client,
			void *dev)
{
	struct s3c2410_dma_chan *chan;
	unsigned long flags;

	pr_debug("dma%d: s3c2410_request_dma: client=%s, dev=%p\n",
		 channel, client->name, dev);

	local_irq_save(flags);

	chan = s3c64xx_dma_map_channel(channel);
	if (chan == NULL) {
		local_irq_restore(flags);
		return -EBUSY;
	}

	dbg_showchan(chan);

	chan->client = client;
	chan->in_use = 1;
	chan->peripheral = channel;

	local_irq_restore(flags);

	/* need to setup */

	pr_debug("%s: channel initialised, %p\n", __func__, chan);

	return chan->number | DMACH_LOW_LEVEL;
}
开发者ID:AppEngine,项目名称:linux-2.6,代码行数:32,代码来源:dma.c

示例4: s3c64xx_dma_stop

static int s3c64xx_dma_stop(struct s3c2410_dma_chan *chan)
{
	u32 config;
	int timeout;

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

	dbg_showchan(chan);

	config = readl(chan->regs + PL080S_CH_CONFIG);
	config |= PL080_CONFIG_HALT;
	writel(config, chan->regs + PL080S_CH_CONFIG);

	timeout = 1000;
	do {
		config = readl(chan->regs + PL080S_CH_CONFIG);
		pr_debug("%s: %d - config %08x\n", __func__, timeout, config);
		if (config & PL080_CONFIG_ACTIVE)
			udelay(10);
		else
			break;
		} while (--timeout > 0);

	if (config & PL080_CONFIG_ACTIVE) {
		printk(KERN_ERR "%s: channel still active\n", __func__);
		return -EFAULT;
	}

	config = readl(chan->regs + PL080S_CH_CONFIG);
	config &= ~PL080_CONFIG_ENABLE;
	writel(config, chan->regs + PL080S_CH_CONFIG);

	return 0;
}
开发者ID:AppEngine,项目名称:linux-2.6,代码行数:34,代码来源:dma.c

示例5: s3c64xx_dma_flush

static int s3c64xx_dma_flush(struct s3c2410_dma_chan *chan)
{
	struct s3c64xx_dma_buff *buff, *next;
	u32 config;

	dbg_showchan(chan);

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

	config = readl(chan->regs + PL080S_CH_CONFIG);
	config &= ~PL080_CONFIG_ENABLE;
	writel(config, chan->regs + PL080S_CH_CONFIG);

	/* dump all the buffers associated with this channel */

	for (buff = chan->curr; buff != NULL; buff = next) {
		next = buff->next;
		pr_debug("%s: buff %p (next %p)\n", __func__, buff, buff->next);

		s3c64xx_dma_bufffdone(chan, buff, S3C2410_RES_ABORT);
		s3c64xx_dma_freebuff(buff);
	}

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

	return 0;
}
开发者ID:AppEngine,项目名称:linux-2.6,代码行数:27,代码来源:dma.c

示例6: 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:1111saeid,项目名称:jb_kernel_3.0.16_htc_golfu,代码行数:33,代码来源:dma.c

示例7: 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

示例8: s3c64xx_dma_start

static int s3c64xx_dma_start(struct s3c2410_dma_chan *chan)
{
	struct s3c64xx_dmac *dmac = chan->dmac;
	u32 config;
	u32 bit = chan->bit;

	dbg_showchan(chan);

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

	/* clear interrupts */
	writel(bit, dmac->regs + PL080_TC_CLEAR);
	writel(bit, dmac->regs + PL080_ERR_CLEAR);

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

	config = readl(chan->regs + PL080S_CH_CONFIG);
	config |= PL080_CONFIG_ENABLE;
	config &= ~PL080_CONFIG_HALT;

	pr_debug("%s: writing config %08x\n", __func__, config);
	writel(config, chan->regs + PL080S_CH_CONFIG);

	return 0;
}
开发者ID:qnhoang81,项目名称:spica-3.0,代码行数:25,代码来源:dma.c

示例9: 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

示例10: s3c2410_dma_request

int s3c2410_dma_request(unsigned int channel,
                        struct s3c2410_dma_client *client,
                        void *dev)
{
    struct s3c2410_dma_chan *chan;
    unsigned long flags;
    int err;

    pr_debug("dma%d: s3c2410_request_dma: client=%s, dev=%p\n",
             channel, client->name, dev);

    local_irq_save(flags);

    chan = s3c2410_dma_map_channel(channel);
    if (chan == NULL) {
        local_irq_restore(flags);
        return -EBUSY;
    }

    dbg_showchan(chan);

    chan->client = client;
    chan->in_use = 1;

    if (!chan->irq_claimed) {
        pr_debug("dma%d: %s : requesting irq %d\n",
                 channel, __func__, chan->irq);

        chan->irq_claimed = 1;
        local_irq_restore(flags);

        err = request_irq(chan->irq, s3c2410_dma_irq, IRQF_DISABLED,
                          client->name, (void *)chan);

        local_irq_save(flags);

        if (err) {
            chan->in_use = 0;
            chan->irq_claimed = 0;
            local_irq_restore(flags);

            printk(KERN_ERR "%s: cannot get IRQ %d for DMA %d\n",
                   client->name, chan->irq, chan->number);
            return err;
        }

        chan->irq_enabled = 1;
    }

    local_irq_restore(flags);

    /* need to setup */

    pr_debug("%s: channel initialised, %p\n", __func__, chan);

    return chan->number | DMACH_LOW_LEVEL;
}
开发者ID:antonywcl,项目名称:AR-5315u_PLD,代码行数:57,代码来源:dma.c

示例11: s3c2410_dma_request

int s3c2410_dma_request(unsigned int channel, s3c2410_dma_client_t *client,
			void *dev)
{
	s3c2410_dma_chan_t *chan = &s3c2410_chans[channel];
	unsigned long flags;
	int err;

	pr_debug("dma%d: s3c2410_request_dma: client=%s, dev=%p\n",
		 channel, client->name, dev);

	check_channel(channel);

	local_irq_save(flags);

	dbg_showchan(chan);

	if (chan->in_use) {
		if (client != chan->client) {
			printk(KERN_ERR "dma%d: already in use\n", channel);
			local_irq_restore(flags);
			return -EBUSY;
		} else {
			printk(KERN_ERR "dma%d: client already has channel\n", channel);
		}
	}

	chan->client = client;
	chan->in_use = 1;

	if (!chan->irq_claimed) {
		pr_debug("dma%d: %s : requesting irq %d\n",
			 channel, __FUNCTION__, chan->irq);

		err = request_irq(chan->irq, s3c2410_dma_irq, SA_INTERRUPT,
				  client->name, (void *)chan);

		if (err) {
			chan->in_use = 0;
			local_irq_restore(flags);

			printk(KERN_ERR "%s: cannot get IRQ %d for DMA %d\n",
			       client->name, chan->irq, chan->number);
			return err;
		}

		chan->irq_claimed = 1;
		chan->irq_enabled = 1;
	}

	local_irq_restore(flags);

	/* need to setup */

	pr_debug("%s: channel initialised, %p\n", __FUNCTION__, chan);

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

示例12: 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

示例13: 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);


	dbg_showregs(chan);

	local_irq_restore(flags);

	return 0;
}
开发者ID:1703011,项目名称:asuswrt-merlin,代码行数:45,代码来源:dma.c

示例14: s3c_dma_dostop

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

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

	dbg_showchan(chan);

	local_irq_save(flags);

	s3c_dma_call_op(chan, S3C2410_DMAOP_STOP);

	stop_DMA_channel(dma_regaddr(chan->dma_con, S3C_DMAC_DBGSTATUS), chan->number);

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

	local_irq_restore(flags);

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

示例15: s3c2410_dma_irq

static irqreturn_t
s3c2410_dma_irq(int irq, void *devpw)
{
    struct s3c2410_dma_chan *chan = (struct s3c2410_dma_chan *)devpw;
    struct s3c2410_dma_buf  *buf;

    buf = chan->curr;

    dbg_showchan(chan);

    /* modify the channel state */

    switch (chan->load_state) {
    case S3C2410_DMALOAD_1RUNNING:
        /* TODO - if we are running only one buffer, we probably
         * want to reload here, and then worry about the buffer
         * callback */

        chan->load_state = S3C2410_DMALOAD_NONE;
        break;

    case S3C2410_DMALOAD_1LOADED:
        /* iirc, we should go back to NONE loaded here, we
         * had a buffer, and it was never verified as being
         * loaded.
         */

        chan->load_state = S3C2410_DMALOAD_NONE;
        break;

    case S3C2410_DMALOAD_1LOADED_1RUNNING:
        /* we'll worry about checking to see if another buffer is
         * ready after we've called back the owner. This should
         * ensure we do not wait around too long for the DMA
         * engine to start the next transfer
         */

        chan->load_state = S3C2410_DMALOAD_1LOADED;
        break;

    case S3C2410_DMALOAD_NONE:
        printk(KERN_ERR "dma%d: IRQ with no loaded buffer?\n",
               chan->number);
        break;

    default:
        printk(KERN_ERR "dma%d: IRQ in invalid load_state %d\n",
               chan->number, chan->load_state);
        break;
    }

    if (buf != NULL) {
        /* update the chain to make sure that if we load any more
         * buffers when we call the callback function, things should
         * work properly */

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

        if (buf->magic != BUF_MAGIC) {
            printk(KERN_ERR "dma%d: %s: buf %p incorrect magic\n",
                   chan->number, __func__, buf);
            return IRQ_HANDLED;
        }

        s3c2410_dma_buffdone(chan, buf, S3C2410_RES_OK);

        /* free resouces */
        s3c2410_dma_freebuf(buf);
    } else {
    }

    /* only reload if the channel is still running... our buffer done
     * routine may have altered the state by requesting the dma channel
     * to stop or shutdown... */

    /* todo: check that when the channel is shut-down from inside this
     * function, we cope with unsetting reload, etc */

    if (chan->next != NULL && chan->state != S3C2410_DMA_IDLE) {
        unsigned long flags;

        switch (chan->load_state) {
        case S3C2410_DMALOAD_1RUNNING:
            /* don't need to do anything for this state */
            break;

        case S3C2410_DMALOAD_NONE:
            /* can load buffer immediately */
            break;

        case S3C2410_DMALOAD_1LOADED:
            if (s3c2410_dma_waitforload(chan, __LINE__) == 0) {
                /* flag error? */
                printk(KERN_ERR "dma%d: timeout waiting for load (%s)\n",
                       chan->number, __func__);
                return IRQ_HANDLED;
            }

            break;
//.........这里部分代码省略.........
开发者ID:antonywcl,项目名称:AR-5315u_PLD,代码行数:101,代码来源:dma.c


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