Exemple #1
0
u32 mite_bytes_in_transit(struct mite_channel *mite_chan)
{
	struct mite_struct *mite = mite_chan->mite;

	return readl(mite->mite_io_addr +
		     MITE_FCR(mite_chan->channel)) & 0x000000FF;
}
static unsigned mite_fifo_size(struct mite_struct *mite, unsigned channel)
{
	unsigned fcr_bits = readl(mite->mite_io_addr + MITE_FCR(channel));
	unsigned empty_count = (fcr_bits >> 16) & 0xff;
	unsigned full_count = fcr_bits & 0xff;
	return empty_count + full_count;
}
Exemple #3
0
void mite_dump_regs(struct mite_channel *mite_chan)
{
    unsigned long mite_io_addr =
        (unsigned long)mite_chan->mite->mite_io_addr;
    unsigned long addr = 0;
    unsigned long temp = 0;

    printk(KERN_DEBUG "mite_dump_regs ch%i\n", mite_chan->channel);
    printk(KERN_DEBUG "mite address is  =0x%08lx\n", mite_io_addr);

    addr = mite_io_addr + MITE_CHOR(channel);
    printk(KERN_DEBUG "mite status[CHOR]at 0x%08lx =0x%08lx\n", addr,
           temp = readl(addr));
    mite_decode(mite_CHOR_strings, temp);
    addr = mite_io_addr + MITE_CHCR(channel);
    printk(KERN_DEBUG "mite status[CHCR]at 0x%08lx =0x%08lx\n", addr,
           temp = readl(addr));
    mite_decode(mite_CHCR_strings, temp);
    addr = mite_io_addr + MITE_TCR(channel);
    printk(KERN_DEBUG "mite status[TCR] at 0x%08lx =0x%08x\n", addr,
           readl(addr));
    addr = mite_io_addr + MITE_MCR(channel);
    printk(KERN_DEBUG "mite status[MCR] at 0x%08lx =0x%08lx\n", addr,
           temp = readl(addr));
    mite_decode(mite_MCR_strings, temp);

    addr = mite_io_addr + MITE_MAR(channel);
    printk(KERN_DEBUG "mite status[MAR] at 0x%08lx =0x%08x\n", addr,
           readl(addr));
    addr = mite_io_addr + MITE_DCR(channel);
    printk(KERN_DEBUG "mite status[DCR] at 0x%08lx =0x%08lx\n", addr,
           temp = readl(addr));
    mite_decode(mite_DCR_strings, temp);
    addr = mite_io_addr + MITE_DAR(channel);
    printk(KERN_DEBUG "mite status[DAR] at 0x%08lx =0x%08x\n", addr,
           readl(addr));
    addr = mite_io_addr + MITE_LKCR(channel);
    printk(KERN_DEBUG "mite status[LKCR]at 0x%08lx =0x%08lx\n", addr,
           temp = readl(addr));
    mite_decode(mite_LKCR_strings, temp);
    addr = mite_io_addr + MITE_LKAR(channel);
    printk(KERN_DEBUG "mite status[LKAR]at 0x%08lx =0x%08x\n", addr,
           readl(addr));
    addr = mite_io_addr + MITE_CHSR(channel);
    printk(KERN_DEBUG "mite status[CHSR]at 0x%08lx =0x%08lx\n", addr,
           temp = readl(addr));
    mite_decode(mite_CHSR_strings, temp);
    addr = mite_io_addr + MITE_FCR(channel);
    printk(KERN_DEBUG "mite status[FCR] at 0x%08lx =0x%08x\n\n", addr,
           readl(addr));
}
void mite_dump_regs(struct mite_channel *mite_chan)
{
	void __iomem *mite_io_addr = mite_chan->mite->mite_io_addr;
	unsigned int offset;
	unsigned int value;
	int channel = mite_chan->channel;

	pr_debug("mite_dump_regs ch%i\n", channel);
	pr_debug("mite address is  =%p\n", mite_io_addr);

	offset = MITE_CHOR(channel);
	value = readl(mite_io_addr + offset);
	pr_debug("mite status[CHOR] at 0x%08x =0x%08x\n", offset, value);
	mite_decode(mite_CHOR_strings, value);
	offset = MITE_CHCR(channel);
	value = readl(mite_io_addr + offset);
	pr_debug("mite status[CHCR] at 0x%08x =0x%08x\n", offset, value);
	mite_decode(mite_CHCR_strings, value);
	offset = MITE_TCR(channel);
	value = readl(mite_io_addr + offset);
	pr_debug("mite status[TCR] at 0x%08x =0x%08x\n", offset, value);
	offset = MITE_MCR(channel);
	value = readl(mite_io_addr + offset);
	pr_debug("mite status[MCR] at 0x%08x =0x%08x\n", offset, value);
	mite_decode(mite_MCR_strings, value);
	offset = MITE_MAR(channel);
	value = readl(mite_io_addr + offset);
	pr_debug("mite status[MAR] at 0x%08x =0x%08x\n", offset, value);
	offset = MITE_DCR(channel);
	value = readl(mite_io_addr + offset);
	pr_debug("mite status[DCR] at 0x%08x =0x%08x\n", offset, value);
	mite_decode(mite_DCR_strings, value);
	offset = MITE_DAR(channel);
	value = readl(mite_io_addr + offset);
	pr_debug("mite status[DAR] at 0x%08x =0x%08x\n", offset, value);
	offset = MITE_LKCR(channel);
	value = readl(mite_io_addr + offset);
	pr_debug("mite status[LKCR] at 0x%08x =0x%08x\n", offset, value);
	mite_decode(mite_LKCR_strings, value);
	offset = MITE_LKAR(channel);
	value = readl(mite_io_addr + offset);
	pr_debug("mite status[LKAR] at 0x%08x =0x%08x\n", offset, value);
	offset = MITE_CHSR(channel);
	value = readl(mite_io_addr + offset);
	pr_debug("mite status[CHSR] at 0x%08x =0x%08x\n", offset, value);
	mite_decode(mite_CHSR_strings, value);
	offset = MITE_FCR(channel);
	value = readl(mite_io_addr + offset);
	pr_debug("mite status[FCR] at 0x%08x =0x%08x\n", offset, value);
}