示例#1
0
文件: s5p_mshc.c 项目: monojo/xu3
static void mshci_reset_all(struct mshci_host *host)
{
	int count;

	/* Wait max 100 ms */
	count = 10000;

	/* before reset ciu, it should check DATA0. if when DATA0 is low and
	it resets ciu, it might make a problem */
	while (mshci_readl(host, MSHCI_STATUS) & (1 << 9)) {
		printf("Count: %d\n", count);
		if (count == 0) {
			printf("Controller never released \
				data0 before reset ciu.\n");
			return;
		}
		count--;
		udelay(10);
	}
示例#2
0
static void mshci_dumpregs_err(struct mshci_host *host)
{
    dbg( "mshci: ============== REGISTER DUMP ==============\n");
    dbg( "mshci: MSHCI_CTRL:      0x%08x\n",
         mshci_readl(host, MSHCI_CTRL));
    dbg( "mshci: MSHCI_PWREN:     0x%08x\n",
         mshci_readl(host, MSHCI_PWREN));
    dbg( "mshci: MSHCI_CLKDIV:    0x%08x\n",
         mshci_readl(host, MSHCI_CLKDIV));
    dbg( "mshci: MSHCI_CLKSRC:    0x%08x\n",
         mshci_readl(host, MSHCI_CLKSRC));
    dbg( "mshci: MSHCI_CLKENA:    0x%08x\n",
         mshci_readl(host, MSHCI_CLKENA));
    dbg( "mshci: MSHCI_TMOUT:     0x%08x\n",
         mshci_readl(host, MSHCI_TMOUT));
    dbg( "mshci: MSHCI_CTYPE:     0x%08x\n",
         mshci_readl(host, MSHCI_CTYPE));
    dbg( "mshci: MSHCI_BLKSIZ:    0x%08x\n",
         mshci_readl(host, MSHCI_BLKSIZ));
    dbg( "mshci: MSHCI_BYTCNT:    0x%08x\n",
         mshci_readl(host, MSHCI_BYTCNT));
    dbg( "mshci: MSHCI_INTMSK:    0x%08x\n",
         mshci_readl(host, MSHCI_INTMSK));
    dbg( "mshci: MSHCI_CMDARG:    0x%08x\n",
         mshci_readl(host, MSHCI_CMDARG));
    dbg( "mshci: MSHCI_CMD:       0x%08x\n",
         mshci_readl(host, MSHCI_CMD));
    dbg( "mshci: MSHCI_MINTSTS:   0x%08x\n",
         mshci_readl(host, MSHCI_MINTSTS));
    dbg( "mshci: MSHCI_RINTSTS:   0x%08x\n",
         mshci_readl(host, MSHCI_RINTSTS));
    dbg( "mshci: MSHCI_STATUS:    0x%08x\n",
         mshci_readl(host, MSHCI_STATUS));
    dbg( "mshci: MSHCI_FIFOTH:    0x%08x\n",
         mshci_readl(host, MSHCI_FIFOTH));
    dbg( "mshci: MSHCI_CDETECT:   0x%08x\n",
         mshci_readl(host, MSHCI_CDETECT));
    dbg( "mshci: MSHCI_WRTPRT:    0x%08x\n",
         mshci_readl(host, MSHCI_WRTPRT));
    dbg( "mshci: MSHCI_GPIO:      0x%08x\n",
         mshci_readl(host, MSHCI_GPIO));
    dbg( "mshci: MSHCI_TCBCNT:    0x%08x\n",
         mshci_readl(host, MSHCI_TCBCNT));
    dbg( "mshci: MSHCI_TBBCNT:    0x%08x\n",
         mshci_readl(host, MSHCI_TBBCNT));
    dbg( "mshci: MSHCI_DEBNCE:    0x%08x\n",
         mshci_readl(host, MSHCI_DEBNCE));
    dbg( "mshci: MSHCI_USRID:     0x%08x\n",
         mshci_readl(host, MSHCI_USRID));
    dbg( "mshci: MSHCI_VERID:     0x%08x\n",
         mshci_readl(host, MSHCI_VERID));
    dbg( "mshci: MSHCI_HCON:      0x%08x\n",
         mshci_readl(host, MSHCI_HCON));
    dbg( "mshci: MSHCI_UHS_REG:   0x%08x\n",
         mshci_readl(host, MSHCI_UHS_REG));
    dbg( "mshci: MSHCI_BMOD:      0x%08x\n",
         mshci_readl(host, MSHCI_BMOD));
    dbg( "mshci: MSHCI_PLDMND:   0x%08x\n",
         mshci_readl(host, MSHCI_PLDMND));
    dbg( "mshci: MSHCI_DBADDR:    0x%08x\n",
         mshci_readl(host, MSHCI_DBADDR));
    dbg( "mshci: MSHCI_IDSTS:     0x%08x\n",
         mshci_readl(host, MSHCI_IDSTS));
    dbg( "mshci: MSHCI_IDINTEN:   0x%08x\n",
         mshci_readl(host, MSHCI_IDINTEN));
    dbg( "mshci: MSHCI_DSCADDR:   0x%08x\n",
         mshci_readl(host, MSHCI_DSCADDR));
    dbg( "mshci: MSHCI_BUFADDR:   0x%08x\n",
         mshci_readl(host, MSHCI_BUFADDR));
    dbg( "mshci: MSHCI_WAKEUPCON: 0x%08x\n",
         mshci_readl(host, MSHCI_WAKEUPCON));
    dbg( "mshci: MSHCI_CLOCKCON:  0x%08x\n",
         mshci_readl(host, MSHCI_CLOCKCON));
    dbg( "mshci: MSHCI_FIFODAT:   0x%08x\n",
         mshci_readl(host, MSHCI_FIFODAT(host->data_offset)));
    dbg( "mshci: ===========================================\n");
}