示例#1
0
void hi_ahci_st_dump(void __iomem *port_base)
{
	unsigned int tmp;

	pr_debug("\n**********Dmac status**********\n");
	tmp = readl(port_base + 0x58);
	pr_debug("txdmac_curr_st:0x%2x\n", (tmp>>24) & 0xf);
	tmp = readl(port_base + 0x64);
	pr_debug("rxdmac_curr_st:0x%2x\n", (tmp>>24) & 0xf);
	tmp = readl(port_base + 0x70);
	pr_debug("dmac tx fifo:count-0x%x-empty-%x-ful-%x\n",
			(tmp>>0) & 0xff,
			(tmp>>16) & 0x1, (tmp>>17) & 0x1);
	pr_debug("dmac rx fifo:count-0x%x-empty-%x-ful-%x\n",
			(tmp>>8) & 0xff,
			(tmp>>18) & 0x1, (tmp>>19) & 0x1);

	pr_debug("\n");
	pr_debug("**********HBA status**********\n");
	tmp = readl(port_base + 0x50);
	pr_debug("pxxx_curr_st:0x%2x      ndrx_curr_st:0x%2x\n",
			(tmp>>24) & 0xf,
			(tmp>>16) & 0xff);
	pr_debug("cfis_curr_st:0x%2x      piox_curr_st:0x%2x\n",
			(tmp>>12) & 0xf,
			(tmp>>8) & 0xf);
	pr_debug("pmxx_curr_st:0x%2x      errx_curr_st:0x%2x\n",
			(tmp>>4) & 0xf,
			(tmp>>0) & 0xf);

	pr_debug("\n");
	pr_debug("**********Link status**********\n");
	tmp = readl(port_base + 0x54);
	pr_debug("link_curr_st:0x%2x\n", (tmp>>24) & 0x1f);
	pr_debug("link tx fifo:count-0x%x-empty-%x-ful-%x\n",
			(tmp>>0) & 0x1f,
			(tmp>>5) & 0x1, (tmp>>6) & 0x1);
	pr_debug("link rx fifo:count-0x%x-empty-%x-ful-%x\n",
			(tmp>>8) & 0x1f,
			(tmp>>13) & 0x1, (tmp>>14) & 0x1);
	pr_debug("link df fifo:count-0x%x-empty-%x-ful-%x\n\n",
			(tmp>>16) & 0x1f,
			(tmp>>21) & 0x1, (tmp>>22) & 0x1);

	pr_debug("**********CMD header**********\n");
	tmp = readl(port_base + 0x0);
	__hi_ahci_st_md(phys_to_virt(tmp));
	__hi_ahci_st_md(phys_to_virt(tmp+0x100));
	__hi_ahci_st_md(phys_to_virt(tmp+0x200));
	__hi_ahci_st_md(phys_to_virt(tmp+0x300));
}
示例#2
0
void hi_ahci_st_dump(void __iomem *port_base)
{
	unsigned int tmp;
	
	printk("\n**********Dmac status**********\n");
	tmp = readl(port_base + 0x58);
	printk("txdmac_curr_st:0x%2x\n",(tmp>>24) & 0xf);
	tmp = readl(port_base + 0x64);
	printk("rxdmac_curr_st:0x%2x\n",(tmp>>24) & 0xf);
	tmp = readl(port_base + 0x70);
	printk("dmac tx fifo:count-0x%x-empty-%x-ful-%x\n",(tmp>>0) & 0xff, \
		(tmp>>16) & 0x1,(tmp>>17) & 0x1);	
	printk("dmac rx fifo:count-0x%x-empty-%x-ful-%x\n",(tmp>>8) & 0xff, \
		(tmp>>18) & 0x1,(tmp>>19) & 0x1);

	printk("\n");
	printk("**********HBA status**********\n");
	tmp = readl(port_base + 0x50);
	printk("pxxx_curr_st:0x%2x      ndrx_curr_st:0x%2x\n",(tmp>>24) & 0xf, \
		(tmp>>16) & 0xff);
	printk("cfis_curr_st:0x%2x      piox_curr_st:0x%2x\n",(tmp>>12) & 0xf, \
		(tmp>>8) & 0xf);
	printk("pmxx_curr_st:0x%2x      errx_curr_st:0x%2x\n",(tmp>>4) & 0xf, \
		(tmp>>0) & 0xf);

	printk("\n");	
	printk("**********Link status**********\n");
	tmp = readl(port_base + 0x54);
	printk("link_curr_st:0x%2x\n",(tmp>>24) & 0x1f);
	printk("link tx fifo:count-0x%x-empty-%x-ful-%x\n",(tmp>>0) & 0x1f, \
		(tmp>>5) & 0x1,(tmp>>6) & 0x1);
	printk("link rx fifo:count-0x%x-empty-%x-ful-%x\n",(tmp>>8) & 0x1f, \
		(tmp>>13) & 0x1,(tmp>>14) & 0x1);
	printk("link df fifo:count-0x%x-empty-%x-ful-%x\n\n",(tmp>>16) & 0x1f, \
		(tmp>>21) & 0x1,(tmp>>22) & 0x1);

	printk("**********CMD header**********\n");
	tmp = readl(port_base + 0x0);
        __hi_ahci_st_md(phys_to_virt(tmp));
        __hi_ahci_st_md(phys_to_virt(tmp+0x100));
        __hi_ahci_st_md(phys_to_virt(tmp+0x200));
        __hi_ahci_st_md(phys_to_virt(tmp+0x300));
#if 0        
   for(tmp = 0;tmp < DUMP_LENTH;tmp++){
       printk("----[*cmh ops: %8x  table addr: %8x]----\n",p_dump_cmd_info[tmp].opts,p_dump_cmd_info[tmp].tbl_addr);
       printk("---[*cmd talbe:{%8x} {%8x} {%8x} {%8x} {%8x}]---\n",p_dump_cmd_info[tmp].tab_addr[0],p_dump_cmd_info[tmp].tab_addr[1],p_dump_cmd_info[tmp].tab_addr[2],p_dump_cmd_info[tmp].tab_addr[3],p_dump_cmd_info[tmp].tab_addr[4]);
       printk("*************dump_count = %d*********************\n",p_dump_cmd_info[tmp].dump_count);
   }
#endif
}